Click or drag to resize
Reader3dsNamedObjects Property

Gets the Dictionary that can be used to access all the objects in 3ds file by its name as defined in 3d modeling application.

Namespace: Ab3d
Assembly: Ab3d.Reader3ds (in Ab3d.Reader3ds.dll) Version: 9.0.5590.1040
Syntax
C#
public Dictionary<string, Object> NamedObjects { get; }

Property Value

Type: DictionaryString, Object
Remarks

This dictionary contains object names as keys and their corresponding GeometryModel3D as values. So if you wish to change the specific object, its material or add a custom transformation you can access the GeometryModel3D with its name that is defined in 3D modeling application.

Caution note Caution
In 3ds file the names can be only 10 characters long - so if you have defined names longer than 10 characters it is recommended to use DumpNamedObjects() in immediate window to see the names as in 3ds file.
Note Note
If the object has been split because multiple materials are used for one mesh object, new objects have been added and can be accessed with the key: [original_object_name]_[material_name] - for example: "head" object can be split into: "head_material1", "head_material2".

The simplest way to get all the named objects is place a breakpoint after the 3ds file has been read and in Visual Studio in immediate window execute the DumpNamedObjects method on the Reader3ds instance.

Examples
This example firstly gets a GeometryModel3D named as "head". Than the light with name "main light" is get. And finally the collection of all modes without lights is get:
GeometryModel3D objectHead = humanReader3ds.NamedObjects["Head"] as GeometryModel3D;
SpotLight objectHead = humanReader3ds.NamedObjects["MainLight"] as SpotLight;
Model3DGroup objectHead = humanReader3ds.NamedObjects[Reader3ds.AllModelsGroupName] as Model3DGroup;
See Also