10-13-2010, 04:03 PM
In the current version there is no lights collection (as it is for Cameras). But you can simply get all the light with the following code:
If the 3ds file contains lights they are stored into a new Model3DGroup that is named with Ab3d.Reader3ds.AllLightsGroupName ("__AllLightsGroup") name. It can be easily accessed with NamedObjects dictionary.
I am currently working on new version of Reader3ds and will also add a Lights collection to simplify getting the lights.
Code:
Model3DGroup lightsGroup = null;
if (_current3dsReader.NamedObjects.ContainsKey(Ab3d.Reader3ds.AllLightsGroupName))
lightsGroup = _current3dsReader.NamedObjects[Ab3d.Reader3ds.AllLightsGroupName] as Model3DGroup;If the 3ds file contains lights they are stored into a new Model3DGroup that is named with Ab3d.Reader3ds.AllLightsGroupName ("__AllLightsGroup") name. It can be easily accessed with NamedObjects dictionary.
I am currently working on new version of Reader3ds and will also add a Lights collection to simplify getting the lights.
Andrej Benedik

