#include <c4d_baseobject.h>
Public Types | |
typedef BaseList4D | SUPER |
![]() | |
typedef BaseList2D | SUPER |
![]() | |
typedef GeListNode | SUPER |
![]() | |
typedef PrivateChunk | SUPER |
Protected Member Functions | |
virtual Bool | HandleSubChunk (HyperFile *hf, Int32 id, Int32 level) |
virtual Bool | Write (HyperFile *hf) |
virtual Int32 | GetInstanceType () const |
BaseObject () | |
BaseObject (Int32 id) | |
virtual | ~BaseObject () |
![]() | |
BaseList4D () | |
~BaseList4D () | |
![]() | |
void | SetID (Int32 id) |
Private Member Functions | |
NodeData * | AllocObjectData (Int32 type, Bool &known) |
UInt32 | GetLastCrc () |
void | SetLastCrc (UInt32 chkSum) |
void | CalculateCrc (Crc32 &chkSum) |
void | UpdateInternalCrc () |
const Matrix & | _GetMl () const |
virtual Int32 | GetDiskType () const |
virtual Bool | GetDParameter (const DescID &id, GeData &data) |
virtual Bool | SetDParameter (const DescID &id, const GeData &data) |
virtual Bool | CopyToX (PrivateChunk *dst, COPYFLAGS flags, AliasTrans *trans) |
BaseObject * | GetCloneObject (const Bool childs, const COPYFLAGS flags=COPYFLAGS_0, AliasTrans *trans=nullptr) |
Friends | |
class | RootObject |
class | BaseDraw |
class | BaseDocument |
class | NodeData |
Alloc/Free | |
static BaseObject * | Alloc (Int32 type) |
static void | Free (BaseObject *&bl) |
Navigation | |
BaseObject * | GetNext () |
BaseObject * | GetPred () |
BaseObject * | GetUp () |
BaseObject * | GetDown () |
BaseObject * | GetDownLast () |
Clone | |
virtual BaseList2D * | GetClone (COPYFLAGS flags, AliasTrans *trans) |
Abs Pos/Scale/Rot | |
Vector | GetAbsPos () const |
void | SetAbsPos (const Vector &v) |
Vector | GetAbsScale () const |
void | SetAbsScale (const Vector &v) |
Vector | GetAbsRot () const |
void | SetAbsRot (const Vector &v) |
Frozen Pos/Scale/Rot | |
Vector | GetFrozenPos () const |
void | SetFrozenPos (const Vector &v) |
Vector | GetFrozenScale () const |
void | SetFrozenScale (const Vector &v) |
Vector | GetFrozenRot () const |
void | SetFrozenRot (const Vector &v) |
Rel Pos/Scale/Rot | |
Vector | GetRelPos () const |
void | SetRelPos (const Vector &v) |
Vector | GetRelScale () const |
void | SetRelScale (const Vector &v) |
Vector | GetRelRot () const |
void | SetRelRot (const Vector &v) |
Ml/Mg Matrix | |
const Matrix & | GetMl () const |
void | SetMl (const Matrix &m) |
Matrix | GetFrozenMln () const |
Matrix | GetRelMln () const |
Matrix | GetRelMl () const |
void | SetRelMl (const Matrix &m) |
Matrix | GetMg () |
void | SetMg (const Matrix &m) |
Matrix | GetMln () const |
Matrix | GetMgn () |
Matrix | GetUpMg () |
void | CopyMatrixTo (BaseObject *dest) |
Rotation Order | |
void | SetRotationOrder (ROTATIONORDER order) |
ROTATIONORDER | GetRotationOrder () const |
Synchronized Rotation Mode | |
void | SetQuaternionRotationMode (Bool active) |
Bool | IsQuaternionRotationMode () |
Bool | SynchronizeVectorTrackKeys (Int32 vectorTrackID, BaseTime startRange=BaseTime(-108000, 1), BaseTime endRange=BaseTime(108000, 1)) |
Bool | FindBestEulerAngle (Int32 rotationTrackID, Bool bAdjustTangent, BaseTime startRange=BaseTime(-108000, 1), BaseTime endRange=BaseTime(108000, 1)) |
Editor/Render/Deform Mode | |
Int32 | GetEditorMode () |
void | SetEditorMode (Int32 mode) |
Int32 | GetRenderMode () |
void | SetRenderMode (Int32 mode) |
Bool | GetDeformMode () |
void | SetDeformMode (Bool mode) |
Tag | |
BaseTag * | GetFirstTag () |
BaseTag * | GetTag (Int32 type, Int32 nr=0) |
BaseTag * | MakeTag (Int32 type, BaseTag *pred=nullptr) |
void | InsertTag (BaseTag *tp, BaseTag *pred=nullptr) |
void | KillTag (Int32 type, Int32 nr=0) |
Cache | |
BaseObject * | GetCache () |
BaseObject * | GetDeformCache () |
Color Properties | |
void | GetColorProperties (ObjectColorProperties *prop) |
void | SetColorProperties (ObjectColorProperties *prop) |
Execute | |
virtual Bool | Execute () |
Miscellaneous | |
Bool | HasChanged () |
Additional Inherited Members | |
![]() | |
Int32 | m_id |
RootShader | mp_rootshader |
RootShader | mp_rootshader_hidden |
RootShader | root_shader_repository |
Int32 | l_bitfeld |
RootCTrack | mp_rootctrack |
RootPluginNode | root_override |
NotifyList * | notify_events |
DescIdStore * | keyframestore |
DescIdStore * | propstore |
BaseContainer | m_bc |
NodeData * | m_data |
![]() | |
GeAliasGoal | m_xgoal |
UInt32 | m_bits [4] |
RootList2D * | t_rootlist_parent |
RootList2D * | m_children |
BaseDocument * | parent_doc |
void * | unknownData |
Int | unknownDataSize |
Int32 | unknownDataLevel |
Int32 | pluginID |
All objects in Cinema 4D are derived from the BaseObject class.
Contains methods for the object's position, scale and rotation, as well as for accessing the sub-items of the object (e.g. tags and animation tracks).
typedef BaseList4D SUPER |
|
protected |
|
protected |
|
protectedvirtual |
|
virtual |
Reimplemented from BaseList4D.
Reimplemented in SplineObject, PolygonObject, and PointObject.
|
private |
|
private |
|
private |
|
private |
|
private |
|
privatevirtual |
Gets the unique disk type of the base list.
Reimplemented from BaseList2D.
Reimplemented in SplineObject, PointObject, and PolygonObject.
Reimplemented from BaseList2D.
Reimplemented from BaseList2D.
|
privatevirtual |
Reimplemented from BaseList2D.
|
private |
|
protectedvirtual |
Reimplemented from BaseList2D.
|
static |
Allocates a base object. Destroy the allocated base object with Free().
[in] | type | The object type. |
|
static |
Destructs base objects allocated with Alloc().
[in,out] | bl | The base object to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
BaseObject* GetNext | ( | ) |
Gets the next object in the list.
BaseObject* GetPred | ( | ) |
Gets the previous object in the list.
BaseObject* GetUp | ( | ) |
Gets the parent object of the list node.
BaseObject* GetDown | ( | ) |
Gets the first child object of the list node.
BaseObject* GetDownLast | ( | ) |
Gets the last child base object of the list node.
|
virtual |
Gets a clone/copy of the object.
[in] | flags | Flags for the clone. |
[in] | trans | An alias translator for the operation. Can be nullptr. The caller owns the pointed layer. |
Reimplemented from BaseList2D.
Vector GetAbsPos | ( | ) | const |
Gets the absolute position of the object.
These are the absolute local coordinates within the parent object.
If the object has no parent then these are world coordinates.
void SetAbsPos | ( | const Vector & | v | ) |
Sets the absolute local position of the object within its parent.
These are the absolute local coordinates within the parent object.
If the object has no parent then these are world coordinates.
[in] | v | The object's absolute position to set. |
Vector GetAbsScale | ( | ) | const |
Gets the absolute scale of the object.
This is relative to the object's parent if it has one.
void SetAbsScale | ( | const Vector & | v | ) |
Sets the absolute scale of the object.
This is relative to the object's parent if it has one.
[in] | v | The object's absolute scale to set. |
Vector GetAbsRot | ( | ) | const |
Gets the absolute HPB rotation of the object.
This is relative to the object's parent if it has one.
void SetAbsRot | ( | const Vector & | v | ) |
Sets the absolute HPB rotation of the object.
This is relative to the object's parent if it has one.
[in] | v | The object's absolute HPB rotation to set. |
Vector GetFrozenPos | ( | ) | const |
Gets the frozen position of the object.
void SetFrozenPos | ( | const Vector & | v | ) |
Sets the frozen position of the object.
[in] | v | The object's frozen position to set. |
Vector GetFrozenScale | ( | ) | const |
Gets the frozen scale of the object.
void SetFrozenScale | ( | const Vector & | v | ) |
Sets the frozen scale of the object.
[in] | v | The object's frozen scale to set. |
Vector GetFrozenRot | ( | ) | const |
Gets the frozen HPB rotation of the object.
void SetFrozenRot | ( | const Vector & | v | ) |
Sets the frozen HPB rotation of the object.
[in] | v | The object's frozen HPB rotation to set. |
Vector GetRelPos | ( | ) | const |
Gets the relative position of the object.
void SetRelPos | ( | const Vector & | v | ) |
Sets the relative position of the object.
[in] | v | The object's relative position to set. |
Vector GetRelScale | ( | ) | const |
Gets the relative scale of the object.
void SetRelScale | ( | const Vector & | v | ) |
Sets the relative scale of the object.
[in] | v | The object's relative scale to set. |
Vector GetRelRot | ( | ) | const |
Gets the relative HPB rotation of the object.
void SetRelRot | ( | const Vector & | v | ) |
Sets the relative HPB rotation of the object.
[in] | v | The object's relative rotation to set. |
const Matrix& GetMl | ( | ) | const |
Gets the local matrix representing the object's position, scale and rotation.
void SetMl | ( | const Matrix & | m | ) |
Sets the local matrix representing the object's position, scale and rotation.
[in] | m | The object's local matrix to set. |
Matrix GetFrozenMln | ( | ) | const |
Gets the frozen and normalized matrix of the object.
Matrix GetRelMln | ( | ) | const |
Gets the relative and normalized matrix of the object.
Matrix GetRelMl | ( | ) | const |
Gets the relative matrix of the object.
void SetRelMl | ( | const Matrix & | m | ) |
Sets the relative matrix of the object.
[in] | m | The object's relative matrix to set. |
Matrix GetMg | ( | ) |
Gets the world (global) matrix representing the object's position, scale and rotation.
void SetMg | ( | const Matrix & | m | ) |
Sets the world (global) matrix representing the object's position, scale and rotation.
[in] | m | The object's world matrix to set. |
Matrix GetMln | ( | ) | const |
Gets the local normalized matrix representing the object's position, scale and rotation.
Matrix GetMgn | ( | ) |
Gets the world (global) normalized matrix representing the object's position, scale and rotation.
Matrix GetUpMg | ( | ) |
Gets the world (global) matrix of the parent object representing the parent's position, scale and rotation.
If the object has no parent object then the method returns a unit matrix.
void CopyMatrixTo | ( | BaseObject * | dest | ) |
Copies the object's matrix to another object.
[in,out] | dest | The destination object to copy the matrix to. |
void SetRotationOrder | ( | ROTATIONORDER | order | ) |
Sets the rotation order of the object.
[in] | order | The rotation order to set for the object: ROTATIONORDER |
ROTATIONORDER GetRotationOrder | ( | ) | const |
Gets the rotation order of the object.
void SetQuaternionRotationMode | ( | Bool | active | ) |
Sets the Synchronized Rotation Mode of the object.
[in] | active | Enable/Disable the Synchronized Rotation mode for the object |
Bool IsQuaternionRotationMode | ( | ) |
Checks if Object Rotation is interpolated in Quaternion Mode.
Bool SynchronizeVectorTrackKeys | ( | Int32 | vectorTrackID, |
BaseTime | startRange = BaseTime(-108000, 1) , |
||
BaseTime | endRange = BaseTime(108000, 1) |
||
) |
Makes sure that the track Curves component are synchronized (keys on each component). If a component track is found, the other track components will be synchronized.
[in] | vectorTrackID | id of the Vector Track to synchronize |
[in] | startRange | (optional)Start operation at given time |
[in] | endRange | (optional)End operation at given time |
Bool FindBestEulerAngle | ( | Int32 | rotationTrackID, |
Bool | bAdjustTangent, | ||
BaseTime | startRange = BaseTime(-108000, 1) , |
||
BaseTime | endRange = BaseTime(108000, 1) |
||
) |
Tries to find the best Euler Angle according to the previous key. The object must have keys on each component.
[in] | rotationTrackID | Rotation Track ID to manage (Relative, global, absolute, frozen) |
[in] | bAdjustTangent | Try to adjust the tangent with new value, if false auto is used |
[in] | startRange | (optional)Start operation at given time |
[in] | endRange | (optional)End operation at given time |
Int32 GetEditorMode | ( | ) |
Gets the mode of the editor dot for the object.
void SetEditorMode | ( | Int32 | mode | ) |
Sets the mode for of editor dot for the object.
[in] | mode | The editor mode to set. |
Int32 GetRenderMode | ( | ) |
Gets the mode of the render dot for the object.
void SetRenderMode | ( | Int32 | mode | ) |
Sets the mode of the render dot for the object.
[in] | mode | The render mode to set. |
Bool GetDeformMode | ( | ) |
Gets the enabled mode of the deformation/generator tick.
void SetDeformMode | ( | Bool | mode | ) |
Sets the enabled mode of the deformation/generator tick.
[in] | mode | true to enable the generator/deformer object, otherwise false. |
BaseTag* GetFirstTag | ( | ) |
Gets the first tag associated with the object.
Gets a tag of a certain type associated with the object.
[in] | type | The type of tag to fetch from the object. |
[in] | nr | Optionally specify a starting tag index to begin the search. Since 17.008 If the requested number is not available then nullptr will be returned even if there is a tag of that type with a different index. |
Creates and associates a tag with the object.
[in] | type | The type of tag to create. |
[in] | pred | The previous tag to insert the tag after, or nullptr if the tag should be inserted at the start of the tag list. The caller owns the pointed tag. |
Inserts tag into the object's tag list.
[in] | tp | The tag to insert. The object takes over the ownership of the pointed tag. |
[in] | pred | The previous tag to insert the tag after, or nullptr if the tag should be inserted at the start of the tag list. The caller owns the pointed tag. Since 18.002 |
Removes a tag from the object and frees its resources.
[in] | type | The type of tag to remove. |
[in] | nr | Optionally specify a starting tag index to begin the search. |
BaseObject* GetCache | ( | ) |
Gets the object from the previously built cache.
Situations can be quite complex in Cinema 4D. For instance GetCache() could return a list of objects.
For example the default Sweep Generator internally has some built-in caches for the sweep surface and for the caps.
The following helper routine can be used to make things easier. It browses through this rather complex hierarchy of objects and caches recursively:
Remember:
Use the above routine only if the caches are already built.
BaseObject* GetDeformCache | ( | ) |
Gets the previously built cache that has been deformed by an active deformer.
It is important to understand the concept how the deformer cache operates.
For each object in the hierarchy that generates a polygonal cache a deformer cache could also have been created by an active deformer object.
A simple example will help to see how this works:
Take the simple hierarchy shown above, the array generator object creates a virtual hierarchy in the cache, this can be retrieved using GetCache().
This hierarchy is:
From each of the Cube objects a further cache is generated, this time polygonal:
From these the deformer object generates a deformed polygon cache:
So the final hierarchy is:
When a deformer becomes active every object/cache object gets a deform cache (if it was a polygonal object). The deformer cache is always polygonal and is only ever a single object.
Important:
The caches are always built after all plugins and expressions have been called.
void GetColorProperties | ( | ObjectColorProperties * | prop | ) |
Gets the object's color properties and fill prop.
[in] | prop | Filled with the color properties. The caller owns the pointed color properties. |
void SetColorProperties | ( | ObjectColorProperties * | prop | ) |
Sets the object's color properties from prop.
[in] | prop | The color properties to set. The caller owns the pointed color properties. |
|
virtual |
Overload this method for self defined objects.
Reimplemented in SplineObject.
Bool HasChanged | ( | ) |
Checks if the object data has changed.
|
friend |
|
friend |
|
friend |
|
friend |
|
mutableprivate |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |