c4d.C4DAtom

The base class of many other classes.

Definition

class c4d. C4DAtom

Inheritance

Members

C4DAtom. __eq__ ( self , other )
C4DAtom. __ne__ ( self , other )

Check if two different objects point to the same object.

Note

Does not compare if two different objects are equal.

Return type: bool
Returns: True if the objects point to the same object, otherwise False .
C4DAtom. __call__ ( )

Returns the atom if it is alive or None if the atom is dead. This is a convenient way to know if you can still use the object.

Return type: c4d.C4DAtom
Returns: The atom if it is still alive, otherwise None .
C4DAtom. SetDirty ( flags )

Sets the dirty checksum, the one returned by GetDirty() .

Parameters: flags ( int ) –

Flags:

DIRTYFLAGS_0 None.
DIRTYFLAGS_MATRIX Matrix changed.
DIRTYFLAGS_DATA Container changed.
DIRTYFLAGS_SELECT Checks all valid selections of the object, e.g. points, edge, polys.
DIRTYFLAGS_CACHE Checks if the cache of an object has been changed (rebuilt).
DIRTYFLAGS_CHILDREN Checks if the children are dirty.
DIRTYFLAGS_SELECTION_OBJECTS For BaseDocument , object selections have changed.
DIRTYFLAGS_SELECTION_TAGS For BaseDocument , tag selections have changed.
DIRTYFLAGS_SELECTION_MATERIALS For BaseDocument , material selections have changed.
C4DAtom. GetDirty ( flags )

Gets the dirty checksum for the object. This can be used to check if the object has been changed.

Parameters: flags ( int ) –

Flags:

DIRTYFLAGS_0 None.
DIRTYFLAGS_MATRIX Matrix changed.
DIRTYFLAGS_DATA Container changed.
DIRTYFLAGS_SELECT Checks all valid selections of the object, e.g. points, edge, polys.
DIRTYFLAGS_CACHE Checks if the cache of an object has been changed (rebuilt).
DIRTYFLAGS_CHILDREN Checks if the children are dirty.
DIRTYFLAGS_SELECTION_OBJECTS For BaseDocument , object selections have changed.
DIRTYFLAGS_SELECTION_TAGS For BaseDocument , tag selections have changed.
DIRTYFLAGS_SELECTION_MATERIALS For BaseDocument , material selections have changed.
Return type: int
Returns: The checksum.
C4DAtom. GetHDirty ( mask )

New in version R19.

Returns the dirty count for the specified mask .

Parameters: mask ( int ) –

The dirty flags:

HDIRTYFLAGS_0 None.
HDIRTYFLAGS_ANIMATION Animation mask.
HDIRTYFLAGS_OBJECT Object data mask.
HDIRTYFLAGS_OBJECT_MATRIX Object matrix mask.
HDIRTYFLAGS_OBJECT_HIERARCHY Object hierarchy mask.
HDIRTYFLAGS_TAG Tag data mask.
HDIRTYFLAGS_MATERIAL Material data mask.
HDIRTYFLAGS_SHADER Shader data mask.
HDIRTYFLAGS_RENDERSETTINGS Render settings mask.
HDIRTYFLAGS_VP Videopost mask.
HDIRTYFLAGS_FILTER Filter data mask.
HDIRTYFLAGS_NBITS N-bits data mask.
HDIRTYFLAGS_ALL All.
Return type: int
Returns: The dirty count.
C4DAtom. SetHDirty ( mask )

New in version R19.

Sets the dirty flags for the specified mask .

Parameters: mask ( int ) –

The dirty flags:

HDIRTYFLAGS_0 None.
HDIRTYFLAGS_ANIMATION Animation mask.
HDIRTYFLAGS_OBJECT Object data mask.
HDIRTYFLAGS_OBJECT_MATRIX Object matrix mask.
HDIRTYFLAGS_OBJECT_HIERARCHY Object hierarchy mask.
HDIRTYFLAGS_TAG Tag data mask.
HDIRTYFLAGS_MATERIAL Material data mask.
HDIRTYFLAGS_SHADER Shader data mask.
HDIRTYFLAGS_RENDERSETTINGS Render settings mask.
HDIRTYFLAGS_VP Videopost mask.
HDIRTYFLAGS_FILTER Filter data mask.
HDIRTYFLAGS_NBITS N-bits data mask.
HDIRTYFLAGS_ALL All.
C4DAtom. IsAlive ( )

Even though a reference to an object still exists, the object might be freed by an user interaction. Normally not needed.

Return type: bool
Returns: True if the object is still alive, otherwise False
C4DAtom. CheckType ( id )

Checks if this atom is an instance of a base type.

Parameters: id ( int ) – The base type ID, for example Ocube .
Return type: int
Returns: True if the atom is an instance of the type id , otherwise False .
C4DAtom. IsInstanceOf ( )

New in version R16.021.

Checks if this atom is an instance of a base type.

Parameters: id ( int ) – The base type ID, for example Ocube .
Return type: int
Returns: True if the atom is an instance of the type id , otherwise False .
C4DAtom. GetType ( )

Get the type of the atom. This must be used to make sure that the derived object really is of the right type before trying to access its members.

Return type: int
Returns: The type, for example Ocube .
C4DAtom. GetRealType ( )

New in version R15.037.

Get the real type of the atom. This is similar to GetType() , but for multinodes the ID of the last linked part is returned. E.g. XPresso nodes have the type ID_GV_GROUPDATA or ID_GV_NODEDATA . With GetRealType() you will get the ID of the operator as a return value.

Return type: int
Returns: The real type, for example Ocube .
C4DAtom. GetClassification ( )

Returns the base type of the object, e.g. for all objects Obase , for all materials Mmat , for all tags Tbase etc.

Return type: int
Returns: The base type.
C4DAtom. Message ( type [ , data ] )

Sends a message to the atom only.

Note

Some notification messages are automatically passed along to branches: MSG_POINTS_CHANGED , MSG_POLYGONS_CHANGED and MSG_SEGMENTS_CHANGED . This is for convenience and historical reasons.

Parameters:
  • type ( int ) –

    The message ID, one of the following:

    MSG_POINTS_CHANGED The points have changed. The corresponding data is VariableChanged .
    MSG_POLYGONS_CHANGED The polygons have changed. The corresponding data is VariableChanged .
    MSG_UPDATE Must be sent if the bounding box has to be recalculated. (Otherwise you can use MSG_CHANGE .)
    MSG_SMALLUPDATE Part of the object has changed that needs no cache rebuilding. Note : This message should be used very carefully, it is there for (small) performance enhancements, for example if a polygon selection is changed then the caches needn’t be rebuilt, so MSG_SMALLUPDATE can be sent.
    MSG_CHANGE Must be sent if any object data (except for the matrix) has been changed.
    MSG_BASECONTAINER Message with a container, for example from a C.O.F.F.E.E. plugin. The corresponding data is BaseContainer .
    MSG_SEGMENTS_CHANGED The segments have changed. The corresponding data is VariableChanged .
    MSG_FILTER A message filter that lets you block C4DAtom.MultiMessage() calls. The corresponding data is MessageFilter. Return True to let the message pass and False to block it!
    MSG_TRANSFERGOALS Internal message!
    MSG_DESCRIPTION_INITUNDO Allows elements to create undo actions for the following parameter changes in the attributes manager. This is already automatically handled for keys, tags, objects etc. The corresponding data is DescriptionInitUndo .
    MSG_DESCRIPTION_CHECKUPDATE Allows elements to determine the type of refresh after a parameter has been changed in the Active manager. This is already automatically handled for keys, tags, objects etc. The corresponding data is DescriptionCheckUpdate . Note : Currently this message is completely handled by all baseclasses. Most plugins won’t need to modify the message data. it is more interesting to start some update action - e.g. deleting data that will be rebuilt with the next access.
    MSG_DESCRIPTION_CHECKUPDATE_AUTOTAKE

    New in version R17.032.

    Element supports automatic Take overrides.

    MSG_DESCRIPTION_CHECKUPDATE_BASELISTEDIT

    New in version R17.032.

    Edit node is updating the current Take override value.

    MSG_DESCRIPTION_COMMAND Sent by for example BUTTON (description element). See example below.
    MSG_DESCRIPTION_POPUP Allows popup menu handling in the Attribute Manager. The corresponding data is DescriptionPopup .
    MSG_DESCRIPTION_POSTSETPARAMETER After a SetParameter() call to an atom element this message is sent to the object. The corresponding data is DescriptionPostSetValue .
    MSG_DESCRIPTION_VALIDATE Allows you to update dependencies or to check for invalid values after a parameter has been changed (For example: the light’s inner radius always must be smaller than the light’s outer radius - so this routine checks for it and corrects it). The corresponding data is DescriptionValidate .
    MSG_EDIT Allows elements to do some action if the user edits the element (doubleclick e.g. in object manager).
    MSG_MENUPREPARE Allows tags, objects, shaders etc. to do some setup work when called from the menu. The corresponding data is the current BaseDocument .
    MSG_RETRIEVEPRIVATEDATA A generic private message to retrieve data from an object. Specific for every type of object so no public documentation available. The corresponding data is RetrievePrivateData .
    MSG_DESCRIPTION_REMOVE_ENTRY Tells the node to remove a description entry. The corresponding data is DescriptionCommand .
    MSG_DESCRIPTION_EDIT_ENTRY Tells the node to edit a description entry. The corresponding data is DescriptionCommand .
    MSG_DESCRIPTION_CHECKDRAGANDDROP Asks the node if a drag and drop onto for example a LINK (description element) field should be accepted. The corresponding data is DescriptionCheckDragAndDrop .
    MSG_DESCRIPTION_GETBITMAP Queries the object for updated bitmaps for BitmapButtonCustomGui elements in the description. (E.g. the lens flare preview.) The corresponding data is DescriptionGetBitmap .
    MSG_DESCRIPTION_GETOBJECTS Private.
    MSG_DESCRIPTION_USERINTERACTION_END End of user interaction.
    MSG_DESCRIPTION_GETINLINEOBJECT Sent by the Attribute Manager to the object. The object can check for a description ID and return the linked objects in the atom array. The corresponding data is DescriptionInlineObjectMsg .
    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION

    New in version R19.

    Sent by a custom GUI to the parent NodeData .

    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION_ID

    New in version R19.

    The custom GUI ID in the message container for MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION .

    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION_CONTENT

    New in version R19.

    The user data in the message container for MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION .

    MSG_DESCRIPTION_ALLOWOVERRIDE

    New in version R17.032.

    Sent before a Take override is added to allow it or not. The corresponding data is DescriptionAllowOverride .

    MSG_DESCRIPTION_TAKECHANGED

    New in version R17.032.

    Sent to each overridden node when the user changes the current Take. Sent to both the node storing the data in the Take and the node releasing the data to the document. The corresponding data is DescriptionTakeChanged .

    MSG_MOVE_FINISHED Sent after a handle or the object has been moved.
    MSG_MOVE_START Sent before a handle or the object has been moved.
    MSG_EDITABLE_END Private.
    MSG_GETCUSTOMICON Every atom can return a custom icon with this message. The corresponding data is GetCustomIconData .
    MSG_MATERIALDRAGANDDROP Received by a material upon dropping an instance of the material onto an object. The material can choose to create a tag of its own, or trigger other actions, instead of letting Cinema 4D create a normal material assignment. The corresponding data is MaterialDragAndDrop . For example Sketch and Toon creates its own type of tag and returns it in result. Cinema 4D creates the undo for it and activates it. Inserting the tag is done by the material.
    MSG_DRAGANDDROP Received when something is dropped on it. The corresponding data is DragAndDrop .
    MSG_INITIALCHANNEL See HandleInitialChannel().
    MSG_DOCUMENTINFO Sent as broadcast message to the document when it its loaded, saved etc. The corresponding data is DocumentInfoData . (See the type member for more information about when the message is sent.)
    MSG_GETSELECTION Private.
    MSG_MULTI_RENDERNOTIFICATION A document and all of its elements receive this message before a render starts. The corresponding data is RenderNotificationData .
    MSG_MULTI_MARKMATERIALS When data is None this is sent to plugin nodes to let them mark the materials that they use. Otherwise the message is sent to let you translate you material links, for example when a material is replaced, and then the corresponding structure is MarkMaterials. (An example for both cases is included on the MarkMaterials page.)
    MSG_MULTI_DOCUMENTCLONED The document has been cloned.
    MSG_MULTI_DOCUMENTIMPORTED After a Cinema 4D document has been loaded this message is sent to the document (and all children structures). The corresponding data is DocumentImported .
    MSG_MULTI_SETNEWMARKERS Private.
    MSG_MULTI_CLEARSUGGESTEDFOLDER Objects have to remove absolute paths (only if they support MSG_GETALLASSETS ). Both are important for SaveProject to work and to collect all items.
    MSG_TOOL_SWITCHACTION

    New in version R17.032.

    Sent to tools on mouse input and cursor info if they have the flag PLUGINFLAG_TOOL_SWITCHACTION set to allow to change action on modifier key.

    MSG_TRANSLATE_POINTS Sent by the modeling core to let tags etc. update after point changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_POLYGONS Sent by the modeling core to let tags etc. update after polygon changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_NGONS Sent by the modeling core to let tags etc. update after N-gon changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_SEGMENTS Sent by the modeling core to let tags etc. update after segment changes. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_POINTS Sent before MSG_TRANSLATE_POINTS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_POLYGONS Sent before MSG_TRANSLATE_POLYGONS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_NGONS Sent before MSG_TRANSLATE_NGONS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_SEGMENTS Sent before MSG_TRANSLATE_SEGMENTS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_UPDATE_NGONS Should be sent if points are changed and any N-gons need updating. Cinema 4D will then update the N-gons, if the user has this option enabled.
    MSG_DOCUMENT_MODE_CHANGED Sent to the active tool plugin during BaseDocument.SetMode() .
    MSG_TOOL_RESTART Private. (Handles the tool description apply behaviour after mouse clicks.)
    MSG_DEFORMMODECHANGED Private.
    MSG_ANIMATE Sent to objects after they have been animated.
    MSG_CALCMEMUSAGE Private.
    MSG_SCALEDOCUMENT Tells the document that another document with different scale has been merged. The corresponding data is MessageScaleDocument .
    MSG_GET_INHERITANCECONTAINER Private.
    MSG_SOFTTAG_UPDATE Private.
  • data ( any ) – The message data. Depends on the message type.
Return type:

bool

Returns:

Depends on the message type.

C4DAtom. MultiMessage ( flags , type [ , data ] )

Sends a message to the atom and to its children, parents or branches, depending on flags .

Parameters:
  • flags ( int ) –

    A combination of the following:

    MULTIMSG_ROUTE_NONE None.
    MULTIMSG_ROUTE_UP Send to parents.
    MULTIMSG_ROUTE_ROOT Send to root object.
    MULTIMSG_ROUTE_DOWN Send to children.
    MULTIMSG_ROUTE_BROADCAST Broadcast the message, i.e. distribute it to all branches given by GeListNode.GetBranchInfo() .
  • type ( int ) –

    The message ID, one of the following:

    MSG_POINTS_CHANGED The points have changed. The corresponding data is VariableChanged .
    MSG_POLYGONS_CHANGED The polygons have changed. The corresponding data is VariableChanged .
    MSG_UPDATE Must be sent if the bounding box has to be recalculated. (Otherwise you can use MSG_CHANGE .)
    MSG_SMALLUPDATE Part of the object has changed that needs no cache rebuilding. Note : This message should be used very carefully, it is there for (small) performance enhancements, for example if a polygon selection is changed then the caches needn’t be rebuilt, so MSG_SMALLUPDATE can be sent.
    MSG_CHANGE Must be sent if any object data (except for the matrix) has been changed.
    MSG_BASECONTAINER Message with a container, for example from a C.O.F.F.E.E. plugin. The corresponding data is BaseContainer .
    MSG_SEGMENTS_CHANGED The segments have changed. The corresponding data is VariableChanged .
    MSG_FILTER A message filter that lets you block C4DAtom.MultiMessage() calls. The corresponding data is MessageFilter. Return True to let the message pass and False to block it!
    MSG_TRANSFERGOALS Internal message!
    MSG_DESCRIPTION_INITUNDO Allows elements to create undo actions for the following parameter changes in the attributes manager. This is already automatically handled for keys, tags, objects etc. The corresponding data is DescriptionInitUndo .
    MSG_DESCRIPTION_CHECKUPDATE Allows elements to determine the type of refresh after a parameter has been changed in the Active manager. This is already automatically handled for keys, tags, objects etc. The corresponding data is DescriptionCheckUpdate . Note : Currently this message is completely handled by all baseclasses. Most plugins won’t need to modify the message data. it is more interesting to start some update action - e.g. deleting data that will be rebuilt with the next access.
    MSG_DESCRIPTION_CHECKUPDATE_AUTOTAKE

    New in version R17.032.

    Element supports automatic Take overrides.

    MSG_DESCRIPTION_CHECKUPDATE_BASELISTEDIT

    New in version R17.032.

    Edit node is updating the current Take override value.

    MSG_DESCRIPTION_COMMAND Sent by for example BUTTON (description element). See example below.
    MSG_DESCRIPTION_POPUP Allows popup menu handling in the Attribute Manager. The corresponding data is DescriptionPopup .
    MSG_DESCRIPTION_POSTSETPARAMETER After a SetParameter() call to an atom element this message is sent to the object. The corresponding data is DescriptionPostSetValue .
    MSG_DESCRIPTION_VALIDATE Allows you to update dependencies or to check for invalid values after a parameter has been changed (For example: the light’s inner radius always must be smaller than the light’s outer radius - so this routine checks for it and corrects it). The corresponding data is DescriptionValidate .
    MSG_EDIT Allows elements to do some action if the user edits the element (doubleclick e.g. in object manager).
    MSG_MENUPREPARE Allows tags, objects, shaders etc. to do some setup work when called from the menu. The corresponding data is the current BaseDocument .
    MSG_RETRIEVEPRIVATEDATA A generic private message to retrieve data from an object. Specific for every type of object so no public documentation available. The corresponding data is RetrievePrivateData .
    MSG_DESCRIPTION_REMOVE_ENTRY Tells the node to remove a description entry. The corresponding data is DescriptionCommand .
    MSG_DESCRIPTION_EDIT_ENTRY Tells the node to edit a description entry. The corresponding data is DescriptionCommand .
    MSG_DESCRIPTION_CHECKDRAGANDDROP Asks the node if a drag and drop onto for example a LINK (description element) field should be accepted. The corresponding data is DescriptionCheckDragAndDrop .
    MSG_DESCRIPTION_GETBITMAP Queries the object for updated bitmaps for BitmapButtonCustomGui elements in the description. (E.g. the lens flare preview.) The corresponding data is DescriptionGetBitmap .
    MSG_DESCRIPTION_GETOBJECTS Private.
    MSG_DESCRIPTION_USERINTERACTION_END End of user interaction.
    MSG_DESCRIPTION_GETINLINEOBJECT Sent by the Attribute Manager to the object. The object can check for a description ID and return the linked objects in the atom array. The corresponding data is DescriptionInlineObjectMsg .
    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION

    New in version R19.

    Sent by a custom GUI to the parent NodeData .

    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION_ID

    New in version R19.

    The custom GUI ID in the message container for MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION .

    MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION_CONTENT

    New in version R19.

    The user data in the message container for MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION .

    MSG_DESCRIPTION_ALLOWOVERRIDE

    New in version R17.032.

    Sent before a Take override is added to allow it or not. The corresponding data is DescriptionAllowOverride .

    MSG_DESCRIPTION_TAKECHANGED

    New in version R17.032.

    Sent to each overridden node when the user changes the current Take. Sent to both the node storing the data in the Take and the node releasing the data to the document. The corresponding data is DescriptionTakeChanged .

    MSG_MOVE_FINISHED Sent after a handle or the object has been moved.
    MSG_MOVE_START Sent before a handle or the object has been moved.
    MSG_EDITABLE_END Private.
    MSG_GETCUSTOMICON Every atom can return a custom icon with this message. The corresponding data is GetCustomIconData .
    MSG_MATERIALDRAGANDDROP Received by a material upon dropping an instance of the material onto an object. The material can choose to create a tag of its own, or trigger other actions, instead of letting Cinema 4D create a normal material assignment. The corresponding data is MaterialDragAndDrop . For example Sketch and Toon creates its own type of tag and returns it in result. Cinema 4D creates the undo for it and activates it. Inserting the tag is done by the material.
    MSG_DRAGANDDROP Received when something is dropped on it. The corresponding data is DragAndDrop .
    MSG_INITIALCHANNEL See HandleInitialChannel().
    MSG_DOCUMENTINFO Sent as broadcast message to the document when it its loaded, saved etc. The corresponding data is DocumentInfoData . (See the type member for more information about when the message is sent.)
    MSG_GETSELECTION Private.
    MSG_MULTI_RENDERNOTIFICATION A document and all of its elements receive this message before a render starts. The corresponding data is RenderNotificationData .
    MSG_MULTI_MARKMATERIALS When data is None this is sent to plugin nodes to let them mark the materials that they use. Otherwise the message is sent to let you translate you material links, for example when a material is replaced, and then the corresponding structure is MarkMaterials. (An example for both cases is included on the MarkMaterials page.)
    MSG_MULTI_DOCUMENTCLONED The document has been cloned.
    MSG_MULTI_DOCUMENTIMPORTED After a Cinema 4D document has been loaded this message is sent to the document (and all children structures). The corresponding data is DocumentImported .
    MSG_MULTI_SETNEWMARKERS Private.
    MSG_MULTI_CLEARSUGGESTEDFOLDER Objects have to remove absolute paths (only if they support MSG_GETALLASSETS ). Both are important for SaveProject to work and to collect all items.
    MSG_TOOL_SWITCHACTION

    New in version R17.032.

    Sent to tools on mouse input and cursor info if they have the flag PLUGINFLAG_TOOL_SWITCHACTION set to allow to change action on modifier key.

    MSG_TRANSLATE_POINTS Sent by the modeling core to let tags etc. update after point changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_POLYGONS Sent by the modeling core to let tags etc. update after polygon changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_NGONS Sent by the modeling core to let tags etc. update after N-gon changes. The corresponding data is TranslationMaps .
    MSG_TRANSLATE_SEGMENTS Sent by the modeling core to let tags etc. update after segment changes. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_POINTS Sent before MSG_TRANSLATE_POINTS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_POLYGONS Sent before MSG_TRANSLATE_POLYGONS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_NGONS Sent before MSG_TRANSLATE_NGONS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_PRETRANSLATE_SEGMENTS Sent before MSG_TRANSLATE_SEGMENTS , before the changes are actually carried out. The corresponding data is TranslationMaps .
    MSG_UPDATE_NGONS Should be sent if points are changed and any N-gons need updating. Cinema 4D will then update the N-gons, if the user has this option enabled.
    MSG_DOCUMENT_MODE_CHANGED Sent to the active tool plugin during BaseDocument.SetMode() .
    MSG_TOOL_RESTART Private. (Handles the tool description apply behaviour after mouse clicks.)
    MSG_DEFORMMODECHANGED Private.
    MSG_ANIMATE Sent to objects after they have been animated.
    MSG_CALCMEMUSAGE Private.
    MSG_SCALEDOCUMENT Tells the document that another document with different scale has been merged. The corresponding data is MessageScaleDocument .
    MSG_GET_INHERITANCECONTAINER Private.
    MSG_SOFTTAG_UPDATE Private.
  • data ( any ) – The message data. It must match the message ID type .
Return type:

bool

Returns:

Depends on the message type .

C4DAtom. CopyTo ( dst , flags [ , trn=None ] )

Copies all values from self to dst . The atoms must be of the same type!

Parameters:
  • dst ( c4d.C4DAtom ) – The destination.
  • flags ( int ) –

    Optional flags for the copy:

    COPYFLAGS_0 None
    COPYFLAGS_NO_HIERARCHY Copy without children.
    COPYFLAGS_NO_ANIMATION Copy without tracks, sequences or keys.
    COPYFLAGS_NO_BITS Do not copy BaseList2D bits.
    COPYFLAGS_NO_MATERIALPREVIEW Do not create a new material preview.
    COPYFLAGS_NO_BRANCHES Do not copy branches, for example tags on an object. Automatically implies COPYFLAGS_NO_ANIMATION , as animation is a branch.
    COPYFLAGS_DOCUMENT This is a read-only flag that’s set when a complete document is copied.
    COPYFLAGS_NO_NGONS Do not copy N-gons.
    COPYFLAGS_CACHE_BUILD Build caches.
    COPYFLAGS_RECURSIONCHECK Checks and avoids instances to cause recursions.
    COPYFLAGS_PRIVATE_IDENTMARKER Private.
    COPYFLAGS_PRIVATE_NO_INTERNALS Private.
    COPYFLAGS_PRIVATE_NO_PLUGINLAYER Private.
    COPYFLAGS_PRIVATE_UNDO Private.
    COPYFLAGS_PRIVATE_CONTAINER_COPY_DIRTY Private.
    COPYFLAGS_PRIVATE_CONTAINER_COPY_IDENTICAL Private.
    COPYFLAGS_PRIVATE_BODYPAINT_NODATA Private.
    COPYFLAGS_PRIVATE_BODYPAINT_CONVERTLAYER Private.
  • trn ( c4d.AliasTrans ) –

    New in version R17.032.

    An optional alias translator for the operation.

Return type:

bool

Returns:

True if the atom was copied.

C4DAtom. GetClone ( [ flags=c4d.COPYFLAGS_0 , trn=None ] )

Clones the object and returns the reference.

Parameters:
  • flags ( int ) –

    Optional flags for the clone:

    COPYFLAGS_0 None
    COPYFLAGS_NO_HIERARCHY Copy without children.
    COPYFLAGS_NO_ANIMATION Copy without tracks, sequences or keys.
    COPYFLAGS_NO_BITS Do not copy BaseList2D bits.
    COPYFLAGS_NO_MATERIALPREVIEW Do not create a new material preview.
    COPYFLAGS_NO_BRANCHES Do not copy branches, for example tags on an object. Automatically implies COPYFLAGS_NO_ANIMATION , as animation is a branch.
    COPYFLAGS_DOCUMENT This is a read-only flag that’s set when a complete document is copied.
    COPYFLAGS_NO_NGONS Do not copy N-gons.
    COPYFLAGS_CACHE_BUILD Build caches.
    COPYFLAGS_RECURSIONCHECK Checks and avoids instances to cause recursions.
    COPYFLAGS_PRIVATE_IDENTMARKER Private.
    COPYFLAGS_PRIVATE_NO_INTERNALS Private.
    COPYFLAGS_PRIVATE_NO_PLUGINLAYER Private.
    COPYFLAGS_PRIVATE_UNDO Private.
    COPYFLAGS_PRIVATE_CONTAINER_COPY_DIRTY Private.
    COPYFLAGS_PRIVATE_CONTAINER_COPY_IDENTICAL Private.
    COPYFLAGS_PRIVATE_BODYPAINT_NODATA Private.
    COPYFLAGS_PRIVATE_BODYPAINT_CONVERTLAYER Private.
  • trn ( c4d.AliasTrans ) –

    New in version R17.032.

    An optional alias translator for the operation.

Return type:

c4d.C4DAtom

Returns:

Minimum of type atom.

C4DAtom. Write ( hf )

Writes the atom to a HyperFile .

Note

This is the function to use if you have opened the hyper file yourself and are writing the object manually. If writing within a plugin function where Cinema 4D has passed the hyper file you should use WriteObject() .

Note

The methods Read() , Write() , ReadObject() and WriteObject() are generally not recommended for plugins.

Parameters: hf ( c4d.storage.HyperFile ) – The hyperfile to write to.
Return type: bool
Returns: True if the atom was written, otherwise False .
C4DAtom. Read ( hf , id , level )

Reads to this atom from a HyperFile , manually specifying ID and level.

Note

This is the function to use if you have opened the hyper file yourself and are reading the object separately. If reading within a plugin function where Cinema 4D has passed the hyper file you should use ReadObject() .

Note

The methods Read() , Write() , ReadObject() and WriteObject() are generally not recommended for plugins.

Parameters:
  • hf ( c4d.storage.HyperFile ) – The hyperfile to read from.
  • id ( int ) – The ID of the atom to read.
  • level ( int ) – The disklevel of the atom to read.
Return type:

bool

Returns:

True if the atom was read, otherwise False .

C4DAtom. WriteObject ( hf )

Writes this atom to a HyperFile , within another write operation.

Note

This is the function to use where Cinema 4D has passed the hyper file you should use, for example in a plugin hook. Otherwise you should use Write() .

Note

The methods Read() , Write() , ReadObject() and WriteObject() are generally not recommended for plugins.

Parameters: hf ( c4d.storage.HyperFile ) – The hyperfile to write to.
Return type: bool
Returns: True if the atom was written, otherwise False .
C4DAtom. ReadObject ( hf , readheader )

Reads to this atom from a HyperFile within another read operation.

Note

This is the function to use where Cinema 4D has passed the hyper file you should use, for example in a plugin hook. Otherwise you should use Read() .

Note

The methods Read() , Write() , ReadObject() and WriteObject() are generally not recommended for plugins.

Parameters:
  • hf ( c4d.storage.HyperFile ) – The hyperfile to read from.
  • readheader ( bool ) – Normally True . Should only be False if you have manually read the file header yourself.
Return type:

bool

Returns:

True if the atom was read, otherwise False .

C4DAtom. GetDescription ( flags )

New in version R15.037.

Gets the description for this atom.

Warning

Every caller of GetDescription() gets a copy of the object’s description, including the Attribute Manager. The only way to customize the description is to override NodeData.GetDDescription() , which is not implemented in the Python API.

Parameters: flags ( int ) –

Flags:

DESCFLAGS_DESC_0 None.
DESCFLAGS_DESC_RESOLVEMULTIPLEDATA Private and unused.
DESCFLAGS_DESC_LOADED Set if elements have been added to the description, either by loading or manual addition.
DESCFLAGS_DESC_RECURSIONLOCK Private.
DESCFLAGS_DESC_DONTLOADDEFAULT Don’t load defaults. Used internally for old plugin tools.
DESCFLAGS_DESC_MAPTAGS If this is specified the object description will also contain the tag’s descriptions (as subcontainers).
DESCFLAGS_DESC_NEEDDEFAULTVALUE Set if “Reset to Default” was called by the user.
Return type: c4d.Description
Returns: The atom’s description.
C4DAtom. GetParameter ( id , flags )

New in version R16.021.

Gets a description parameter of this atom.

Parameters:
  • id ( c4d.DescID ) – The ID of the parameter.
  • flags ( int ) –

    Flags:

    DESCFLAGS_GET_0 None.
    DESCFLAGS_GET_PARAM_GET Parameter retrieved.
    DESCFLAGS_GET_NO_GLOBALDATA Private.
    DESCFLAGS_GET_NO_GEDATADEFAULTVALUE The GeData default type will not be initialized for GetParameter() if this flag is set.
Return type:

any

Returns:

The parameter data, or None if an error occured.

C4DAtom. SetParameter ( id , data , flags )

New in version R16.021.

Sets a description parameter of this atom.

Parameters:
  • id ( c4d.DescID ) – The ID of the parameter.
  • data ( any ) – The parameter data to set.
  • flags ( int ) –

    Flags:

    DESCFLAGS_SET_0 None.
    DESCFLAGS_SET_PARAM_SET Parameter set.
    DESCFLAGS_SET_USERINTERACTION Set when the GUI is calling SetParameter() . This is the only time when SetParameter() is allowed to use user interaction elements (e.g. open dialogs, display messages etc.).
    DESCFLAGS_SET_DONTCHECKMINMAX No check is internally done if the parameter passed is within the [min,max] range of the description, to save some time.
    DESCFLAGS_SET_DONTAFFECTINHERITANCE No parameter inheritance, for render settings and post effects only.
    DESCFLAGS_SET_FORCESET Force the set value without GetParameter() /Compare. Use only for calls where you for sure changed the value!
Return type:

bool

Returns:

True if the parameter was set, otherwise False .

C4DAtom. FindUniqueID ( appid )

New in version R16.021.

Checks for a specific unique application ID.

Parameters: appid ( int ) – A unique application ID, has to be registered at MAXON, at least it should be obtained from http://www.plugincafe.com
Return type: c4d.storage.ByteSeq
Returns: The unique application ID data, or None if it could not be found.
C4DAtom. AddUniqueID ( appid , mem )

New in version R16.021.

Adds unique application ID to the object.

Parameters:
  • appid ( int ) – A unique application ID, has to be registered at MAXON, at least it should be obtained from http://www.plugincafe.com
  • mem ( c4d.storage.ByteSeq ) – The unique application ID data. Used for instance to store the name of a software vendor.
Return type:

bool

Returns:

True if successful, otherwise False .

C4DAtom. GetUniqueIDCount ( )

New in version R16.021.

Retrieves the number of unique application IDs.

Return type: int
Returns: The number of unique application IDs.
C4DAtom. GetUniqueIDIndex ( idx )

New in version R16.050.

Gets the idx -th unique application ID data.

Parameters: idx ( int ) – The unique ID index: 0<=idx< GetUniqueIDCount()
Return type: tuple(int, ByteSeq )
Returns: The unique application ID and its data. Used for instance to read the name of a software vendor.

None if it could not be found.

Table Of Contents