C4DAtom and Plugin Messages¶
The following messages can be send with C4DAtom.Message()
and received in the Message
methods of CommandData
, FalloffData
, NodeData
, SculptBrushToolData
, and ToolData
and their derived interfaces.
Warning
Only messages that have an explicit Broadcast to Atoms
section in their description are supported to be send with C4DAtom.Message()
, and only messages that have an explicit Handle in Plugins
section are supported to be received with plugin interfaces. Attempting to send which are not supported in Python will have no effect, or in some cases might even crash Cinema 4D.
Symbol |
Numeric Value |
Description |
---|---|---|
300001037 |
Sent to objects after they have been animated. |
|
9 |
Sent to pass arbitrary data in a container to a node. |
|
7 |
Sent if any data except for the matrix has been changed. |
|
440000221 |
Sent to atoms that might contain a falloff. |
|
300001001 |
Sent to retrieve command information. |
|
431000094 |
Sent to check if take override operation is allowed. |
|
26 |
Sent to ask an atom if a drag and drop operation is accepted. |
|
17 |
Sent to allow elements to determine the type of refresh after a parameter has been changed. |
|
18 |
Sent for button description elements. |
|
431000175 |
Sent by a custom GUI to its parent node. |
|
25 |
Sent to tell an atom to edit a description entry. |
|
27 |
Sent to query a description for a |
|
16 |
Sent to allows elements to create undo actions for the following parameter changes. |
|
300001046 |
Sent to handle description popup menus in the Attribute Manager. |
|
19 |
Sent after a |
|
24 |
Sent to tell an atom to remove a description entry. |
|
20 |
Sent to update dependencies or to check for invalid values after a parameter change. |
|
200000091 |
Sent to the active tool plugin when document mode is changed. |
|
1001078 |
Sent when a document has been loaded, saved, merged or other document related actions occurred. |
|
1018756 |
Sent to elements in the Object Manager when something is dropped on it. |
|
21 |
Sent to perform an action when element is being edited. |
|
14 |
Sent to allow or block |
|
1021339 |
Sent to retrieve the data of MoGraph selection tags. |
|
440000230 |
Sent to retrieve the data for MoGraph weights tags. |
|
112004 |
Sent to retrieve all assets from an object. |
|
1001090 |
Sent to retrieve a custom icon. |
|
1041699 |
Sent to retrieve the custom icon settings of an object. |
|
1028476 |
Sent to get a real camera object from a generator. |
|
1036447 |
Sent to get the real tag object from a virtual ‘generator’ tag. |
|
22 |
Sent to allow tags, objects, shaders etc. to do some setup work when called from the menu. |
|
200000040 |
Sent to nodes to convert absolute paths to filename. |
|
11 |
Sent when a document is being cloned. |
|
1001071 |
Sent to a document and all of its elements before a render starts. |
|
1 |
Sent to notify an object its points have changed. |
|
2 |
Sent to notify an object its polygons have changed. |
|
23 |
Sent to retrieve private data from an atom. |
|
300001069 |
Sent to signal that another document with different scale has been merged with the current document. |
|
10 |
Sent to notify an object that its segments have changed. |
|
6 |
Sent if part of an object has changed and does not need cache rebuilding. |
|
5 |
Sent to inform an object that its bounding box must be recalculated. Otherwise use MSG_CHANGE. |
-
c4d.
MSG_ANIMATE
¶ Sent to objects after they have been animated.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None
return:None
-
c4d.
MSG_BASECONTAINER
¶ - Sent to pass arbitrary data in a container to a node.It is good practice to qualify the content of the container by settings its container identifier via
BaseContainer.SetId()
or by providing such identifier when instantiating the container.- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:c4d.BaseContainer
return:None
-
c4d.
MSG_CHANGE
¶ Sent to atoms when any data aside from their matrix has been changed.
- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None
return:None
-
c4d.
MSG_COLLECTC4DFALLOFF
¶ Sent to atoms that might contain a falloff.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict[]
return:`dict['falloff']
- Parameters
falloff (c4d.modules.mograph.C4D_Falloff) – The contained falloff if there is any.
-
c4d.
MSG_COMMANDINFORMATION
¶ - Sent to retrieve command information.Allows to restrict shortcuts to a dialog. To do so,
managergroup
has to be set to a dialog identifier.parentid
can be set to a command identifier to get its shortcut, icon, tooltip etc. For instance, ifIDM_SELECTALL
is set forparentid
, thencommand_id
inherits the “Select All” command of Cinema 4D.- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['command_id', 'managergroup', 'parentid']
return:dict['managergroup', 'parentid']
- Parameters
command_id (int) – The command identifier.
managergroup (int) – The identifier of the manger group.
parentid (int) – The identifier of the parent.
-
c4d.
MSG_DESCRIPTION_ALLOWOVERRIDE
¶ Sent to check if take override operation is allowed.
- Broadcast to Atoms
- Can be sent with
C4DAtom.Message()
with the message datadata
.data:dict['_takeData', '_overrideTake', '_descid']
return:dict['_parent', '_parentId', '_allow', '_overrideEnabled']
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['_takeData', '_overrideTake', '_descid']
return:dict['_parent', '_parentId', '_allow', '_overrideEnabled']
- Parameters
_takeData (c4d.modules.takesystem.TakeData) – Take system context.
_overrideTake (c4d.modules.takesystem.BaseTake) – The take asking for the override.
_descid (c4d.DescID) – Description ID to be overridden.
_parent (c4d.BaseList2D) – Parent node if the override must be assigned to it and not to the original node. Especially useful in case of branched structures.
_parentId (c4d.DescID) – If
parent
is set also a translated parameter ID needs to be set._allow (bool) –
True
if the parameter can be overridden, otherwiseFalse
._overrideEnabled (bool) –
True
if the global switch allow the override, otherwiseFalse
.
-
c4d.
MSG_DESCRIPTION_CHECKDRAGANDDROP
¶ - Sent to ask an atom if a drag and drop operation is accepted.Not all parameter types that might appear eligible actually do support this message, it is for example not supported by FieldList parameters.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['id', 'element']
return:dict['result']
- Parameters
id (c4d.DescID) – ID of the drop field.
element (c4d.BaseList2D) – Element to drop.
result (bool) – Set to
True
if the drop is acceptable, otherwiseFalse
.
-
c4d.
MSG_DESCRIPTION_CHECKUPDATE
¶ - Sent to allow elements to determine the type of refresh after a parameter has been changed.This message is being handled by all plugin base classes.
- Broadcast to Atoms
- Can be sent with
C4DAtom.Message()
with the message datadata
.data:dict['doc', 'drawflags', 'descid']
return:None
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None````dict['doc', 'drawflags', 'descid']
return:None
- Parameters
doc (c4d.documents.BaseDocument) – The current document.
drawflags (int) – Draw flags. See MSG_DESCRIPTION_CHECKUPDATE.
descid (c4d.DescID) – The identifier of the parameter that triggered the command.
-
c4d.
MSG_DESCRIPTION_COMMAND
¶ -
- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['id']
return:None
- Parameters
id (c4d.DescID) – The identifier of the parameter that did trigger the command.
-
c4d.
MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION
¶ Sent by a custom GUI to its parent node.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['_descId', '_customGuiId', '_subId', '_data']
return:None
- Parameters
_descId (c4d.DescID) – Description ID.
_customGuiId (int) – Custom GUI plugin ID.
_subId (int) – Message type sub-ID. Depending on the custom GUI implementation a different sub-ID can be passed with different data.
_data (c4d.BaseContainer) – Data for the message.
-
c4d.
MSG_DESCRIPTION_EDIT_ENTRY
¶ Sent to tell an atom to edit a description entry.
- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['id']
return:None
- Parameters
id (c4d.DescID) – The identifier of the parameter that did trigger the command.
-
c4d.
MSG_DESCRIPTION_GETBITMAP
¶ Sent to query a description for a
c4d.gui.BitmapButtonCustomGui
bitmap.- Broadcast to Atoms
- Can be sent with
C4DAtom.Message()
with the message datadata
.data:dict['id']
return:dict['bmp', 'bmpflags']
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['id']
return:dict['bmp', 'bmpflags']
- Parameters
id (c4d.DescID) – The description identifier of the bitmap button.
bmp (c4d.bitmaps.BaseBitmap) – Bitmap for the button.
bmpflags (int) – Flags. See ICONDATAFLAGS.
-
c4d.
MSG_DESCRIPTION_INITUNDO
¶ Sent to allows elements to create undo actions for the following parameter changes.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['doc', 'descid']
return:None
- Parameters
doc (c4d.documents.BaseDocument) – The current document.
descid (c4d.DescID) – The description identifier of the parameter.
-
c4d.
MSG_DESCRIPTION_POPUP
¶ Sent to handle description popup menus in the Attribute Manager.
- Broadcast to Atoms
- Can be sent with
C4DAtom.Message()
with the message datadata
.data: dict[‘id’, ‘chosen’, ‘popup’]`return: dict[‘id’, ‘chosen’, ‘popup’]` - Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data: dict[‘id’, ‘chosen’, ‘popup’]`return: dict[‘id’, ‘chosen’, ‘popup’]` - Parameters
id (c4d.DescID) – The identifier of the parameter that triggered the command.
chosen (int) – Selected element of the popup.
popup (c4d.BaseContainer) – Popup menu container.
-
c4d.
MSG_DESCRIPTION_POSTSETPARAMETER
¶ Sent after a
C4DAtom.SetParameter()
call.- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['descid']
return:None
- Parameters
descid (c4d.DescID) – The description identifier of the parameter that has been set.
-
c4d.
MSG_DESCRIPTION_REMOVE_ENTRY
¶ Sent to tell an atom to remove a description entry.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['id']
return:None
- Parameters
id (c4d.DescID) – The identifier of the parameter that did trigger the command.
-
c4d.
MSG_DESCRIPTION_VALIDATE
¶ - Sent to update dependencies or to check for invalid values after a parameter change.Used for example to ensure that the inner radius of a light object is always smaller than its outer radius.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['flags']
return:None
- Parameters
flags (int) – Not used.
-
c4d.
MSG_DOCUMENT_MODE_CHANGED
¶ Sent to the active tool plugin when document mode is changed.
See also
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None
return:None
-
c4d.
MSG_DOCUMENTINFO
¶ Sent when a document has been loaded, saved, merged or other document related actions occurred.
See also
To send
MSG_DOCUMENTINFO
it is recommended to useBaseDocument.SendInfo()
.- Broadcast to Atoms
- Can be sent with
C4DAtom.Message()
with the message datadata
.data:dict['type', 'fileformat', 'filename']
return:None
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['type', 'fileformat', 'filename', 'doc', 'bl']
return:None
- Parameters
type (int) – The message type. See MSG_DOCUMENTINFO_TYPE.
fileformat (int) – The file format. See FORMAT Export.
filename (str) – The document filename.
doc (c4d.documents.BaseDocument) – The current document.
bl (c4d.BaseList2D) – The atom that has been inserted. Is being provided when
type
isMSG_DOCUMENTINFO_TYPE_OBJECT_INSERT
,MSG_DOCUMENTINFO_TYPE_TAG_INSERT``or ``MSG_DOCUMENTINFO_TYPE_MATERIAL_INSERT
.
-
c4d.
MSG_DRAGANDDROP
¶ Sent to elements in the Object Manager when something is dropped on it.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['doc', 'sender', 'flags', 'type', 'data', 'x', 'y', 'msg']
return:dict['flags', 'type', 'data', 'result']
- Parameters
doc (c4d.documents.BaseDocument) – The current document.
sender (c4d.BaseList2) – The sender of the drag operation.
flags (int) – The flags of the operation.
type (int) – The drag type.
data (PyCObject) – The dragged data.
x (int) – The x position where the drag operation has been released.
y (int) – The y position where the drag operation has been released.
msg (c4d.BaseContainer) – Valid if
DRAGANDDROP_FLAG_MSGVALID
is set so items like BFM_INPUT_QUALIFIER are available.result (int) – Unused.
-
c4d.
MSG_EDIT
¶ - Sent to perform an action when element is being edited.Is being sent for example when the user does edit an object by double-clicking it in the Object Manager.
- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None
return:None
-
c4d.
MSG_FILTER
¶ Sent to allow or block
C4DAtom.MultiMessage()
calls.- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['type', 'route', 'data']
return:None
- Parameters
type (int) – Message type.
route (int) – Flags. See MULTIMSG_ROUTE.
data (PyCObject) – Message data. Depends on the message type.
-
c4d.
MSG_GET_MODATASELECTION
¶ Sent to retrieve the data of MoGraph selection tags.
- Broadcast to Atoms
- Parameters
sel (c4d.BaseSelect) – The selected clones.
-
c4d.
MSG_GET_MODATAWEIGHTS
¶ Sent to retrieve the data for MoGraph weights tags.
- Broadcast to Atoms
- Parameters
_weight (list[float]) – The weight data.
-
c4d.
MSG_GETALLASSETS
¶ Sent to retrieve all assets from an object.
Warning
This message is only supported in Python as an outgoing message in node implementations. Sending this message in Python via
C4DAtom.Message()
will crash Cinema 4D. Use insteadc4d.documents.GetAllAssetsNew()
to retrieve all asset data from a document.- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['doc', 'flags', 'assets']
return:dict['assets': list[dict['filename', 'bl', netRequestOnDemand]]]
- Parameters
doc (c4d.documents.BaseDocument) – The current document.
flags (int) – The flags for the operation.
assets (list) – List of assets.
filename (str) – Filename of the asset.
bl (c4d.BaseList2D) – Base list reporting the missing name.
netRequestOnDemand (bool) – Net request on demand.
-
c4d.
MSG_GETCUSTOMICON
¶ Sent to retrieve a custom icon.
Changed in version R21: An instance of c4d.IconData can be passed with the fields
useDat
anddat
when returning icon data in plugins. The bitmap data inputs will be ignored when whenuseDat
has been set toTrue
.- Broadcast to Atoms
- Can be sent with
C4DAtom.Message()
with the message datadata
.data:dict[]
return:dict['filled', 'bmp', 'x', 'y', 'w', 'h', 'flags']
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict[]
return:dict['filled', 'bmp', 'x', 'y', 'w', 'h', 'flags', 'useDat', 'dat']
- Parameters
filled (bool) –
True
if the icon was set.bmp (c4d.bitmaps.BaseBitmap) – Icon’s bitmap. Can be
None
.x (int) – X coordinate of the upper-left corner of the icon.
y (int) – Y coordinate of the upper-left corner of the icon.
w (int) – Width of the icon.
h (int) – Height of the icon.
flags (int) – See ICONDATAFLAGS.
useDat (bool) – Must be set to
True
when theIconData
dat
should be used.dat (c4d.IconData) – The icon data to use instead of the raw bitmap data.
-
c4d.
MSG_GETCUSTOMICON_SETTINGS
¶ Sent to retrieve the custom icon settings of an object.
New in version R21.
- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['setting']
return:None
- Parameters
setting (c4d.CustomIconSettings) – The
c4d.CustomIconSettings
for the atom.
-
c4d.
MSG_GETREALCAMERADATA
¶ Sent to get a real camera object from a generator.
- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict[]
return:dict['res']
- Parameters
res (c4d.BaseObject) – The real camera object.
-
c4d.
MSG_GETREALTAGDATA
¶ Sent to get the real tag object from a virtual ‘generator’ tag.
- Broadcast to Atoms
- Parameters
res (c4d.BaseTag) – The real tag.
-
c4d.
MSG_MENUPREPARE
¶ Sent to allow tags, objects, shaders and other classic API nodes to do setup work when called from the menu.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:c4d.BaseContainer
return:None
-
c4d.
MSG_MULTI_CLEARSUGGESTEDFOLDER
¶ - Sent to nodes to convert absolute paths to filename.When “Save Project with Assets” is being invoked, all assets are moved to the new target directory. In this case all absolute paths must be converted to filenames because the files are next to the document and the absolute paths are not needed anymore.
Note
Both
MSG_GETALLASSETS
andMSG_MULTI_CLEARSUGGESTEDFOLDER
are important for “Save Project” to work and to collect all items. This messages must only be supported when also the messageMSG_GETALLASSETS
is being used to handle assets.- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None
return:None
-
c4d.
MSG_MULTI_DOCUMENTCLONED
¶ Sent when a document is being cloned.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None
return:None
-
c4d.
MSG_MULTI_RENDERNOTIFICATION
¶ Sent to a document and all of its elements before a render starts.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['doc', 'external', 'start', 'animated']
return:dict['external', 'start', 'animated']
- Parameters
doc (c4d.documents.BaseDocument) – The document to be rendered.
external (bool) –
True
if the rendering is not in the editor view, otherwiseFalse
.start (bool) – Determines if this is a start (
True
) or stop (False
) notification. Stop notifications are only sent if the document will not be deleted, which more or less only happens if there is an editor render.animated (bool) – Determines if this is an animation sequence being rendered.
-
c4d.
MSG_POINTS_CHANGED
¶ Sent to notify an object its points have changed.
- Broadcast to Atoms
- Can be sent with
C4DAtom.Message()
with the message datadata
.data:dict['old_cnt', 'new_cnt', 'vc_flags', 'map']
return:None
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['old_cnt', 'new_cnt', 'vc_flags', 'map']
return:None
- Parameters
old_cnt (int) – Number of elements before the change.
new_cnt (int) – Number of elements after the change.
vc_flags (int) – Flags. See VC_FLAGS.
map (list[int]) – Optional translation map.
-
c4d.
MSG_POLYGONS_CHANGED
¶ Sent to notify an object its polygons have changed.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['old_cnt', 'new_cnt', 'vc_flags', 'map']
return:None
- Parameters
old_cnt (int) – Number of elements before the change.
new_cnt (int) – Number of elements after the change.
vc_flags (int) – Flags. See VC_FLAGS.
map (list[int]) – Optional translation map.
-
c4d.
MSG_RETRIEVEPRIVATEDATA
¶ Sent to retrieve private data from an atom.
Note
Used to obtain loader/saver settings.
- Broadcast to Atoms
- Can be sent with
C4DAtom.Message()
with the message datadata
.data:dict[]
return:dict['imexporter']
- Parameters
imexporter (c4d.BaseList2D) – Scene loader/saver.
-
c4d.
MSG_SCALEDOCUMENT
¶ Sent to signal that another document with different scale has been merged with the current document.
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['scale']
return:None
- Parameters
scale (float) – The scale of the merged document.
-
c4d.
MSG_SEGMENTS_CHANGED
¶ - Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:dict['old_cnt', 'new_cnt', 'vc_flags', 'map']
return:None
- Parameters
old_cnt (int) – Number of elements before the change.
new_cnt (int) – Number of elements after the change.
vc_flags (int) – Flags. See VC_FLAGS.
map (list[int]) – Optional translation map.
-
c4d.
MSG_SMALLUPDATE
¶ Sent if part of an object has changed and does not need cache rebuilding.
Note
This message should be used very carefully, it is there for small performance enhancements. For example, if a polygon selection has been changed, then the caches do not need to be rebuilt;
MSG_SMALLUPDATE
can be sent.- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None
return:None
-
c4d.
MSG_UPDATE
¶ -
- Broadcast to Atoms
- Handle in Plugins
- Can be received as plugin messages with the message data argument
data
ort_data
, depending on the plugin interfaceMessage()
implementation:data:None
return:None