BaseObject Class Reference

#include <c4d_baseobject.h>

Inheritance diagram for BaseObject:

Public Types

typedef BaseList4D SUPER
 
- Public Types inherited from BaseList4D
typedef BaseList2D SUPER
 
- Public Types inherited from BaseList2D
typedef GeListNode SUPER
 
- Public Types inherited from GeListNode
typedef PrivateChunk SUPER
 

Public Member Functions

virtual Bool IsInstanceOf (cineware::Int32 id) const
 
- Public Member Functions inherited from BaseList4D
BaseList4DGetUp ()
 
BaseList4DGetDown ()
 
BaseList4DGetDownLast ()
 
void InsertBefore (BaseList4D *bl)
 
void InsertAfter (BaseList4D *bl)
 
void InsertUnder (BaseList4D *bl)
 
void InsertUnderLast (BaseList4D *bl)
 
virtual void Remove ()
 
- Public Member Functions inherited from BaseList2D
 BaseList2D ()
 
virtual ~BaseList2D ()
 
BaseList2DGetNext ()
 
BaseList2DGetPred ()
 
NodeDataGetNodeData ()
 
void SetNodeData (NodeData *data)
 
void SetBit (Int32 mask)
 
Bool GetBit (Int32 mask)
 
void DelBit (Int32 mask)
 
void ToggleBit (Int32 mask)
 
Int32 GetAllBits ()
 
void SetAllBits (Int32 bits)
 
BaseContainer GetData ()
 
BaseContainerGetDataInstance ()
 
BaseContainerGetDataInstanceRef ()
 
const StringGetName ()
 
void SetName (const String &new_name)
 
const GeMarkerGetMarker () const
 
void SetMarker (const GeMarker &m)
 
Bool AddUniqueID (Int32 appid, const Char *const mem, Int bytes)
 
Bool FindUniqueID (Int32 appid, const Char *&mem, Int &bytes) const
 
Int32 GetUniqueIDCount () const
 
Bool GetUniqueIDIndex (Int32 idx, Int32 &id, const Char *&mem, Int &bytes) const
 
BaseShaderGetFirstShader ()
 
Bool InsertShader (BaseShader *shader, BaseShader *pred=nullptr)
 
Bool InsertShaderLast (BaseShader *shader)
 
RootCTrackGetCTrackRoot ()
 
CTrackGetFirstCTrack ()
 
CTrackFindCTrack (const DescID &id)
 
Bool AppendCTrack (CTrack *t)
 
void InsertTrackSorted (CTrack *track)
 
virtual Int32 GetType () const
 
LayerObjectGetLayerObject ()
 
void SetLayerObject (LayerObject *layer)
 
const LayerDataGetLayerData (BaseDocument *doc, Bool rawdata=false)
 
Bool SetLayerData (BaseDocument *doc, const LayerData &data)
 
DynamicDescriptionGetDynamicDescription ()
 
virtual Bool IsBaseList ()
 
Bool SetDescIDState (const DescID &id, DESCIDSTATE descidstate)
 
DESCIDSTATE GetDescIDState (const DescID &id, Bool tolerant) const
 
RootPluginNodeGetOverrideRoot ()
 
BaseOverrideGetFirstOverride ()
 
virtual Bool TranslateDescID (const DescID &id, DescID &res_id, GeListNode *&res_at)
 
- Public Member Functions inherited from GeListNode
 GeListNode ()
 
 ~GeListNode ()
 
virtual Bool GetNBit (Int32 bit) const
 
virtual Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
 
BaseDocumentGetDocument ()
 
virtual Int32 GetInfo ()
 
GeListNodeGetPred ()
 
GeListNodeGetNext ()
 
GeListNodeGetUp ()
 
GeListNodeGetDown ()
 
GeListNodeGetDownLast ()
 
void InsertBefore (GeListNode *op)
 
void InsertAfter (GeListNode *op)
 
void Remove ()
 
void InsertUnder (GeListNode *op)
 
void InsertUnderLast (GeListNode *op)
 
RootList2DGetListHead ()
 
Int32 GetNodeID (Int32 index=0) const
 
- Public Member Functions inherited from PrivateChunk
 PrivateChunk ()
 
Bool ReadChunk (HyperFile *hf, Bool keepin=false, Bool noheader=false)
 
virtual Bool IsListHead ()
 
Bool ReadObject (HyperFile *hf, Bool readheader)
 
Bool WriteObject (HyperFile *hf, Int32 type)
 
Bool CopyTo (PrivateChunk *dest, COPYFLAGS flags, AliasTrans *trans)
 
Bool GetParameter (Int32 id, GeData &data)
 
Bool SetParameter (Int32 id, const GeData &data)
 
Bool GetParameter (const DescID &id, GeData &data)
 
Bool SetParameter (const DescID &id, const GeData &data)
 
virtual Int32 GetChunkLevel ()
 
- Public Member Functions inherited from GeTempPublicNode2D< PrivateChunk >
PrivateChunkGetNext () const
 
PrivateChunkGetPrev () const
 
void InsertBefore (PrivateChunk *n)
 
void InsertAfter (PrivateChunk *n)
 
void Remove ()
 

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 ()
 
- Protected Member Functions inherited from BaseList4D
 BaseList4D ()
 
 ~BaseList4D ()
 
- Protected Member Functions inherited from BaseList2D
void SetID (Int32 id)
 

Private Member Functions

NodeDataAllocObjectData (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)
 
BaseObjectGetCloneObject (const Bool childs, const COPYFLAGS flags=COPYFLAGS_0, AliasTrans *trans=nullptr)
 

Private Attributes

Matrix ml_cache
 
Bool ml_changed
 
Vector t_pos
 
Vector t_rot
 
Vector t_scale
 
Vector f_pos
 
Vector f_scale
 
Vector f_rot
 
Vector tf_rot
 
Vector tf_pos
 
Vector tf_scale
 
Matrix frozenm
 
Matrix ifrozenm
 
UInt32 boflags
 
ROTATIONORDER t_rotation_order
 
Matrix intern
 
Matrix comp
 
Matrix m_ModelingAxis
 
RootTag m_tags
 
Int32 e_mode
 
Int32 r_mode
 
Int32 t_mode
 
Bool t_xray
 
Vector t_color
 
Int32 t_usecolor
 
Int32 t_shadingcolormode
 
Vector t_shadingcolor
 
RootObjectm_deformcacheobjects
 
RootObjectm_cacheobjects
 
Int32 _disktype
 

Friends

class RootObject
 
class BaseDraw
 
class BaseDocument
 
class NodeData
 

Alloc/Free

static BaseObjectAlloc (Int32 type)
 
static void Free (BaseObject *&bl)
 

Navigation

BaseObjectGetNext ()
 
BaseObjectGetPred ()
 
BaseObjectGetUp ()
 
BaseObjectGetDown ()
 
BaseObjectGetDownLast ()
 

Clone

virtual BaseList2DGetClone (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 MatrixGetMl () 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

BaseTagGetFirstTag ()
 
BaseTagGetTag (Int32 type, Int32 nr=0)
 
BaseTagMakeTag (Int32 type, BaseTag *pred=nullptr)
 
void InsertTag (BaseTag *tp, BaseTag *pred=nullptr)
 
void KillTag (Int32 type, Int32 nr=0)
 

Cache

BaseObjectGetCache ()
 
BaseObjectGetDeformCache ()
 

Color Properties

void GetColorProperties (ObjectColorProperties *prop)
 
void SetColorProperties (ObjectColorProperties *prop)
 

Execute

virtual Bool Execute ()
 

Miscellaneous

Bool HasChanged ()
 

Additional Inherited Members

- Protected Attributes inherited from BaseList2D
Int32 m_id
 
RootShader mp_rootshader
 
RootShader mp_rootshader_hidden
 
RootShader root_shader_repository
 
Int32 l_bitfeld
 
RootCTrack mp_rootctrack
 
RootPluginNode root_override
 
NotifyListnotify_events
 
DescIdStorekeyframestore
 
DescIdStorepropstore
 
BaseContainer m_bc
 
NodeDatam_data
 
- Protected Attributes inherited from GeListNode
GeAliasGoal m_xgoal
 
UInt32 m_bits [4]
 
RootList2Dt_rootlist_parent
 
RootList2Dm_children
 
BaseDocumentparent_doc
 
void * unknownData
 
Int unknownDataSize
 
Int32 unknownDataLevel
 
Int32 pluginID
 

Detailed Description

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).

Note
Has to be created with Alloc() and destroyed with Free().

Member Typedef Documentation

◆ SUPER

typedef BaseList4D SUPER

Constructor & Destructor Documentation

◆ BaseObject() [1/2]

BaseObject ( )
protected

◆ BaseObject() [2/2]

BaseObject ( Int32  id)
protected

◆ ~BaseObject()

virtual ~BaseObject ( )
protectedvirtual

Member Function Documentation

◆ IsInstanceOf()

virtual Bool IsInstanceOf ( cineware::Int32  id) const
virtual

Reimplemented from BaseList4D.

Reimplemented in SplineObject, PolygonObject, and PointObject.

◆ AllocObjectData()

NodeData* AllocObjectData ( Int32  type,
Bool known 
)
private

◆ GetLastCrc()

UInt32 GetLastCrc ( )
private

◆ SetLastCrc()

void SetLastCrc ( UInt32  chkSum)
private

◆ CalculateCrc()

void CalculateCrc ( Crc32 chkSum)
private

◆ UpdateInternalCrc()

void UpdateInternalCrc ( )
private

◆ _GetMl()

const Matrix& _GetMl ( ) const
private

◆ GetDiskType()

virtual Int32 GetDiskType ( ) const
privatevirtual

Gets the unique disk type of the base list.

Note
Normally this is the same as GetType() but there are exceptions.
Returns
The disk type, for example Ocube.

Reimplemented from BaseList2D.

Reimplemented in SplineObject, PointObject, and PolygonObject.

◆ GetDParameter()

virtual Bool GetDParameter ( const DescID id,
GeData data 
)
privatevirtual

Reimplemented from BaseList2D.

◆ SetDParameter()

virtual Bool SetDParameter ( const DescID id,
const GeData data 
)
privatevirtual

Reimplemented from BaseList2D.

◆ CopyToX()

virtual Bool CopyToX ( PrivateChunk dst,
COPYFLAGS  flags,
AliasTrans trans 
)
privatevirtual

Reimplemented from BaseList2D.

◆ GetCloneObject()

BaseObject* GetCloneObject ( const Bool  childs,
const COPYFLAGS  flags = COPYFLAGS_0,
AliasTrans trans = nullptr 
)
private

◆ HandleSubChunk()

virtual Bool HandleSubChunk ( HyperFile hf,
Int32  id,
Int32  level 
)
protectedvirtual

Private.

Reimplemented from BaseList4D.

Reimplemented in SplineObject.

◆ Write()

virtual Bool Write ( HyperFile hf)
protectedvirtual

Private.

Reimplemented from BaseList4D.

Reimplemented in SplineObject.

◆ GetInstanceType()

virtual Int32 GetInstanceType ( ) const
protectedvirtual

Reimplemented from BaseList2D.

◆ Alloc()

static BaseObject* Alloc ( Int32  type)
static

Allocates a base object. Destroy the allocated base object with Free().

Parameters
[in]typeThe object type.
Returns
The allocated base object, or nullptr if the allocation failed.

◆ Free()

static void Free ( BaseObject *&  bl)
static

Destructs base objects allocated with Alloc().

Parameters
[in,out]blThe base object to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆ GetNext()

BaseObject* GetNext ( )

Gets the next object in the list.

Returns
The next object, or nullptr if there is none. Cineware SDK owns the pointed object.

◆ GetPred()

BaseObject* GetPred ( )

Gets the previous object in the list.

Returns
The previous base object, or nullptr if there is none. Cineware SDK owns the pointed object.

◆ GetUp()

BaseObject* GetUp ( )

Gets the parent object of the list node.

Returns
The parent object, or nullptr if there is none. Cineware SDK owns the pointed object.

◆ GetDown()

BaseObject* GetDown ( )

Gets the first child object of the list node.

Returns
The first child object, or nullptr if there is none. Cineware SDK owns the pointed object.

◆ GetDownLast()

BaseObject* GetDownLast ( )

Gets the last child base object of the list node.

Returns
The last child object, or nullptr if there is none. Cineware SDK owns the pointed object.

◆ GetClone()

virtual BaseList2D* GetClone ( COPYFLAGS  flags,
AliasTrans trans 
)
virtual

Gets a clone/copy of the object.

Parameters
[in]flagsFlags for the clone.
[in]transAn alias translator for the operation. Can be nullptr. The caller owns the pointed layer.
Returns
The cloned object. The caller owns the pointed object.

Reimplemented from BaseList2D.

◆ GetAbsPos()

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.

See also
The article Freeze Transformation
Returns
The object's absolute position.

◆ SetAbsPos()

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.

See also
The article Freeze Transformation
Parameters
[in]vThe object's absolute position to set.

◆ GetAbsScale()

Vector GetAbsScale ( ) const

Gets the absolute scale of the object.
This is relative to the object's parent if it has one.

See also
The article Freeze Transformation
Returns
The object's absolute scale.

◆ SetAbsScale()

void SetAbsScale ( const Vector v)

Sets the absolute scale of the object.
This is relative to the object's parent if it has one.

See also
The article Freeze Transformation
Parameters
[in]vThe object's absolute scale to set.

◆ GetAbsRot()

Vector GetAbsRot ( ) const

Gets the absolute HPB rotation of the object.
This is relative to the object's parent if it has one.

See also
The article Freeze Transformation
Returns
The object's absolute HPB rotation.

◆ SetAbsRot()

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.

See also
The article Freeze Transformation
Parameters
[in]vThe object's absolute HPB rotation to set.

◆ GetFrozenPos()

Vector GetFrozenPos ( ) const

Gets the frozen position of the object.

See also
The article Freeze Transformation
Returns
The object's frozen position.

◆ SetFrozenPos()

void SetFrozenPos ( const Vector v)

Sets the frozen position of the object.

See also
The article Freeze Transformation
Parameters
[in]vThe object's frozen position to set.

◆ GetFrozenScale()

Vector GetFrozenScale ( ) const

Gets the frozen scale of the object.

See also
The article Freeze Transformation
Returns
The object's frozen scale.

◆ SetFrozenScale()

void SetFrozenScale ( const Vector v)

Sets the frozen scale of the object.

See also
The article Freeze Transformation
Parameters
[in]vThe object's frozen scale to set.

◆ GetFrozenRot()

Vector GetFrozenRot ( ) const

Gets the frozen HPB rotation of the object.

See also
The article Freeze Transformation
Returns
The object's frozen HPB rotation.

◆ SetFrozenRot()

void SetFrozenRot ( const Vector v)

Sets the frozen HPB rotation of the object.

See also
The article Freeze Transformation
Parameters
[in]vThe object's frozen HPB rotation to set.

◆ GetRelPos()

Vector GetRelPos ( ) const

Gets the relative position of the object.

See also
The article Freeze Transformation
Returns
The object's relative position.

◆ SetRelPos()

void SetRelPos ( const Vector v)

Sets the relative position of the object.

See also
The article Freeze Transformation
Parameters
[in]vThe object's relative position to set.

◆ GetRelScale()

Vector GetRelScale ( ) const

Gets the relative scale of the object.

See also
The article Freeze Transformation
Returns
The object's relative scale.

◆ SetRelScale()

void SetRelScale ( const Vector v)

Sets the relative scale of the object.

See also
The article Freeze Transformation
Parameters
[in]vThe object's relative scale to set.

◆ GetRelRot()

Vector GetRelRot ( ) const

Gets the relative HPB rotation of the object.

See also
The article Freeze Transformation
Returns
The object's relative scale.

◆ SetRelRot()

void SetRelRot ( const Vector v)

Sets the relative HPB rotation of the object.

See also
The article Freeze Transformation
Parameters
[in]vThe object's relative rotation to set.

◆ GetMl()

const Matrix& GetMl ( ) const

Gets the local matrix representing the object's position, scale and rotation.

Returns
The object's local matrix.

◆ SetMl()

void SetMl ( const Matrix m)

Sets the local matrix representing the object's position, scale and rotation.

Parameters
[in]mThe object's local matrix to set.

◆ GetFrozenMln()

Matrix GetFrozenMln ( ) const

Gets the frozen and normalized matrix of the object.

See also
The article Freeze Transformation
Returns
The object's frozen and normalized matrix.

◆ GetRelMln()

Matrix GetRelMln ( ) const

Gets the relative and normalized matrix of the object.

See also
The article Freeze Transformation
Returns
The object's relative and normalized matrix.

◆ GetRelMl()

Matrix GetRelMl ( ) const

Gets the relative matrix of the object.

See also
The article Freeze Transformation
Returns
The object's relative matrix.

◆ SetRelMl()

void SetRelMl ( const Matrix m)

Sets the relative matrix of the object.

See also
The article Freeze Transformation
Parameters
[in]mThe object's relative matrix to set.

◆ GetMg()

Matrix GetMg ( )

Gets the world (global) matrix representing the object's position, scale and rotation.

Warning
Only valid if the object is attached to a document. Virtual objects in caches and deform caches are not attached to a document, so this cannot be used for those objects.
Returns
The object's world matrix.

◆ SetMg()

void SetMg ( const Matrix m)

Sets the world (global) matrix representing the object's position, scale and rotation.

Parameters
[in]mThe object's world matrix to set.

◆ GetMln()

Matrix GetMln ( ) const

Gets the local normalized matrix representing the object's position, scale and rotation.

Returns
The object's normalized local matrix.

◆ GetMgn()

Matrix GetMgn ( )

Gets the world (global) normalized matrix representing the object's position, scale and rotation.

Returns
The object's normalized world matrix.

◆ GetUpMg()

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.

Returns
The parent object's world matrix.

◆ CopyMatrixTo()

void CopyMatrixTo ( BaseObject dest)

Copies the object's matrix to another object.

Parameters
[in,out]destThe destination object to copy the matrix to.

◆ SetRotationOrder()

void SetRotationOrder ( ROTATIONORDER  order)

Sets the rotation order of the object.

Parameters
[in]orderThe rotation order to set for the object: ROTATIONORDER

◆ GetRotationOrder()

ROTATIONORDER GetRotationOrder ( ) const

Gets the rotation order of the object.

Returns
The rotation order of the object: ROTATIONORDER

◆ SetQuaternionRotationMode()

void SetQuaternionRotationMode ( Bool  active)

Sets the Synchronized Rotation Mode of the object.

Since
18.002
Parameters
[in]activeEnable/Disable the Synchronized Rotation mode for the object

◆ IsQuaternionRotationMode()

Bool IsQuaternionRotationMode ( )

Checks if Object Rotation is interpolated in Quaternion Mode.

Since
18.002
Returns
true if Rotation Interpolation is Quaternion, otherwise false.

◆ SynchronizeVectorTrackKeys()

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.

Since
18.002
Parameters
[in]vectorTrackIDid of the Vector Track to synchronize
[in]startRange(optional)Start operation at given time
[in]endRange(optional)End operation at given time
Returns
true if Track Synchronization was successfull, otherwise false.

◆ FindBestEulerAngle()

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.

Since
18.002
Parameters
[in]rotationTrackIDRotation Track ID to manage (Relative, global, absolute, frozen)
[in]bAdjustTangentTry 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
Returns
true if Rotation Synchronization was successfull, otherwise false.

◆ GetEditorMode()

Int32 GetEditorMode ( )

Gets the mode of the editor dot for the object.

Returns
The editor mode.

◆ SetEditorMode()

void SetEditorMode ( Int32  mode)

Sets the mode for of editor dot for the object.

Parameters
[in]modeThe editor mode to set.

◆ GetRenderMode()

Int32 GetRenderMode ( )

Gets the mode of the render dot for the object.

Returns
The render mode.

◆ SetRenderMode()

void SetRenderMode ( Int32  mode)

Sets the mode of the render dot for the object.

Parameters
[in]modeThe render mode to set.

◆ GetDeformMode()

Bool GetDeformMode ( )

Gets the enabled mode of the deformation/generator tick.

Returns
true if the deformer/generator is enabled, otherwise false.

◆ SetDeformMode()

void SetDeformMode ( Bool  mode)

Sets the enabled mode of the deformation/generator tick.

Parameters
[in]modetrue to enable the generator/deformer object, otherwise false.

◆ GetFirstTag()

BaseTag* GetFirstTag ( )

Gets the first tag associated with the object.

Returns
The first tag, or nullptr if no tags available. The object owns the pointed tag.

◆ GetTag()

BaseTag* GetTag ( Int32  type,
Int32  nr = 0 
)

Gets a tag of a certain type associated with the object.

Parameters
[in]typeThe type of tag to fetch from the object.
[in]nrOptionally 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.
Returns
The requested tag, or nullptr if no tags of the requested type are available. The object owns the pointed tag.

◆ MakeTag()

BaseTag* MakeTag ( Int32  type,
BaseTag pred = nullptr 
)

Creates and associates a tag with the object.

Parameters
[in]typeThe type of tag to create.
[in]predThe 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.
Returns
The new tag, or nullptr if failed. The object owns the pointed tag.

◆ InsertTag()

void InsertTag ( BaseTag tp,
BaseTag pred = nullptr 
)

Inserts tag into the object's tag list.

Parameters
[in]tpThe tag to insert. The object takes over the ownership of the pointed tag.
[in]predThe 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

◆ KillTag()

void KillTag ( Int32  type,
Int32  nr = 0 
)

Removes a tag from the object and frees its resources.

Since
18.002
Parameters
[in]typeThe type of tag to remove.
[in]nrOptionally specify a starting tag index to begin the search.

◆ GetCache()

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:

void DoRecursion(BaseObject *op)
{
BaseObject* tp = op->GetDeformCache();
if (tp)
{
DoRecursion(tp);
}
else
{
tp = op->GetCache(nullptr);
if (tp)
{
DoRecursion(tp);
}
else
{
if (!op->GetBit(BIT_CONTROLOBJECT))
{
if (op->IsInstanceOf(Opolygon))
{
...
}
}
}
}
for (tp = op->GetDown(); tp; tp=tp->GetNext())
{
DoRecursion(tp);
}
}

Remember:
Use the above routine only if the caches are already built.

See also
GetDeformCache()
Returns
The object's previously built cache or nullptr. The object owns the pointed object's cache.
May return nullptr if the cache is not available or is not yet built.

◆ GetDeformCache()

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.

Returns
The objects previously built deformed cache or nullptr. The object owns the pointed object's cache.
May return nullptr if the cache is not available or is not yet built.

◆ GetColorProperties()

void GetColorProperties ( ObjectColorProperties prop)

Gets the object's color properties and fill prop.

Parameters
[in]propFilled with the color properties. The caller owns the pointed color properties.

◆ SetColorProperties()

void SetColorProperties ( ObjectColorProperties prop)

Sets the object's color properties from prop.

Parameters
[in]propThe color properties to set. The caller owns the pointed color properties.

◆ Execute()

virtual Bool Execute ( )
virtual

Overload this method for self defined objects.

Returns
true if the object type is supported by the external application (e.g. no polygonal cache is returned), otherwise false.

Reimplemented in SplineObject.

◆ HasChanged()

Bool HasChanged ( )

Checks if the object data has changed.

Returns
true if the object data has changed, otherwise false.

Friends And Related Function Documentation

◆ RootObject

friend class RootObject
friend

◆ BaseDraw

friend class BaseDraw
friend

◆ BaseDocument

friend class BaseDocument
friend

◆ NodeData

friend class NodeData
friend

Member Data Documentation

◆ ml_cache

Matrix ml_cache
mutableprivate

◆ ml_changed

Bool ml_changed
mutableprivate

◆ t_pos

Vector t_pos
private

◆ t_rot

Vector t_rot
private

◆ t_scale

Vector t_scale
private

◆ f_pos

Vector f_pos
private

◆ f_scale

Vector f_scale
private

◆ f_rot

Vector f_rot
private

◆ tf_rot

Vector tf_rot
private

◆ tf_pos

Vector tf_pos
private

◆ tf_scale

Vector tf_scale
private

◆ frozenm

Matrix frozenm
private

◆ ifrozenm

Matrix ifrozenm
private

◆ boflags

UInt32 boflags
private

◆ t_rotation_order

ROTATIONORDER t_rotation_order
private

◆ intern

Matrix intern
private

◆ comp

Matrix comp
private

◆ m_ModelingAxis

Matrix m_ModelingAxis
private

◆ m_tags

RootTag m_tags
private

◆ e_mode

Int32 e_mode
private

◆ r_mode

Int32 r_mode
private

◆ t_mode

Int32 t_mode
private

◆ t_xray

Bool t_xray
private

◆ t_color

Vector t_color
private

◆ t_usecolor

Int32 t_usecolor
private

◆ t_shadingcolormode

Int32 t_shadingcolormode
private

◆ t_shadingcolor

Vector t_shadingcolor
private

◆ m_deformcacheobjects

RootObject* m_deformcacheobjects
private

◆ m_cacheobjects

RootObject* m_cacheobjects
private

◆ _disktype

Int32 _disktype
private
Opolygon
#define Opolygon
Polygon - PolygonObject.
Definition: c4d_parameter_ids.h:623
cineware::BaseObject::BaseObject
BaseObject()
BIT_CONTROLOBJECT
#define BIT_CONTROLOBJECT
Internal bit set by generators.
Definition: private_symbols.h:295