InstanceObject represents an instance object in Cinema 4D. Such an instance object references another scene object. Additionally, it can store multiple matrices for multi-instances.
InstanceObject objects are an instance of Oinstance
.
InstanceObject objects are created with the usual tools (Entity Creation and Destruction Manual (Classic)):
The parameters of an InstanceObject are edited as usual using C4DAtom::GetParameter() and C4DAtom::SetParameter(). The parameter IDs are defined in Oinstance.h
.
The referenced object can be accessed with the INSTANCEOBJECT_LINK parameter or with these functions:
An InstanceObject can store multiple instance positions. So it can represent not only one but many instances. To turn on the multi-instance mode set the parameter INSTANCEOBJECT_RENDERINSTANCE_MODE to INSTANCEOBJECT_RENDERINSTANCE_MODE_MULTIINSTANCE.
For each multi-instance a matrix and a color (maxon::Color64) is stored:
The InstanceObject can also store unique IPs to identify an instance (see Generating).
Multi-instance information can also be accessed with a MultiInstanceData object: