Gets the Dictionary that can be used to access all the objects in 3ds file by its name as defined in 3d modeling application.
Assembly: Ab3d.Reader3ds (in Ab3d.Reader3ds)
Version: 4.2.0.0 (4.2.0.0)
Syntax
| C# |
|---|
public Dictionary<string, Object> NamedObjects { get; } |
| Visual Basic (Declaration) |
|---|
Public ReadOnly Property NamedObjects As Dictionary(Of String, Object) |
| Visual C++ |
|---|
public: property Dictionary<String^, Object^>^ NamedObjects { Dictionary<String^, Object^>^ get (); } |
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.
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 Reader3ds..::.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 finaly the collection of all modes without lights is get:
CopyC#
GeometryModel3D objectHead = humanReader3ds.NamedObjects["Head"] as GeometryModel3D; SpotLight objectHead = humanReader3ds.NamedObjects["MainLight"] as SpotLight; Model3DGroup objectHead = humanReader3ds.NamedObjects[Reader3ds.AllModelsGroupName] as Model3DGroup;