I’m trying to write Lightmap generation script, but I’m stuck at “No Image to Bake To” Error and aborting execution of further code.
On official page is written that I have to use AO bake first, but I don’t know how to change the bake_type property by script.
When I manualy run the script two times, the second time it works, but I need to run Blender from external application with project file and script to be executed on it, so I don’t have chance to change the property or run script twice manually.
I’m also struggling with changing another properties like type of shadow and numerical values, enabling Ambient occlusion, Indirect lighting etc.
I don’t know how to access and change them. Those, which I finded in API are read-only and I can’t find set function or something like that.
I’m developing application with Windows UI(standalone application) which can through Blender create lighting in the input file, create lightmaps for every Mesh and save them to disk for further usage. Its bachelor thesis and I have to submit it soon.
So can somebody please help me with the script and explain how to access blender properties?
I’m using Blender 2.57b because of UV Lightmap pack, which I’m using in this script.