On 16/10/2015 at 15:44, xxxxxxxx wrote:
I'm attempting to write a SceneLoaderData plugin for IES files that automatically adds them as new light objects to the scene. I'm able to successfully create a light object, set it's type to Photometric, and load in the IES file, however loading the IES file programmatically doesn't auto-fill the Photometric Intensity and Luminaire information as happens when you manually load the IES file in C4D.
Here's the code I'm using to load the IES files into a new light:
light = c4d.BaseObject(c4d.Olight) light_bc = light.GetDataInstance() doc.InsertObject(light) light[c4d.LIGHT_TYPE] = c4d.LIGHT_TYPE_PHOTOMETRIC light[c4d.LIGHT_PHOTOMETRIC_DATA] = True light_bc.SetFilename(c4d.LIGHT_PHOTOMETRIC_FILE, name)
I'd rather not write my own IES parser to get at this information. Any recommendations on how to get C4D to auto-extract the info from the IES file?
When C4D does it:
When I do it: