Application Data
Application-specific data may be attached to any Animatable
in the scene using application data chunks. Application data chunks are represented using AppDataChunk
. With the related APIs any 3ds Max object (controller, object, node, modifier, material, etc.) can have custom data attached by other objects. These chunks are saved in the .MAX file and can be accessed through the object they are attached to.
The following methods used to create and retrieve application data are from class Animatable
. The data is accessed using three owner identifiers: The SuperClassID
and the Class_ID
of the owner, and a sub-index.
Animatable::AddAppDataChunk()
- This method is used to add anAppDataChunk
to this Animatable. The chunk is identified using theClass_ID
, andSuperClassID
of the owner, and an ID for sub-chunks.Animatable::GetAppDataChunk()
- This method is used to retrieve a pointer to anAppDataChunk
.Animatable::RemoveAppDataChunk()
- This method is used to delete anAppDataChunk
.
Sample code using these APIs can be found in \\maxsdk\\samples\\utilities\\appdata.cpp
.
Developers who have 3D Studio / DOS IPAS application data associated with nodes being imported into 3ds Max have APIs available in 3ds Max to help process this imported data. Application data was used by IPAS plug-ins to store special data with nodes. This was used for example by IK and spline patches. These APIs allow a 3ds Max plug-in to request incoming application data from an IPAS plug-in and use it. plug-ins can register a callback that gets called when application data is loaded. The callback can then interpret the data and create a new object that will be used instead of the usual triangle mesh. For more details see the ObjectDataReaderCallback
.