MSG C4DAtom¶
This page provides information on the messages that can be sent with C4DAtom.Message()
.
- MSG_UPDATE
- MSG_SMALLUPDATE
- MSG_CHANGE
- MSG_POINTS_CHANGED
- MSG_GETCUSTOMICON
- MSG_GETCUSTOMICON_SETTINGS
- MSG_EDIT
- MSG_DESCRIPTION_COMMAND
- MSG_DESCRIPTION_REMOVE_ENTRY
- MSG_DESCRIPTION_EDIT_ENTRY
- MSG_DESCRIPTION_POPUP
- MSG_DESCRIPTION_CHECKUPDATE
- MSG_DESCRIPTION_GETBITMAP
- MSG_DESCRIPTION_ALLOWOVERRIDE
- MSG_DOCUMENTINFO
- MSG_BASECONTAINER
- MSG_RETRIEVEPRIVATEDATA
- MSG_GETREALCAMERADATA
- MSG_GETREALTAGDATA
- MSG_GET_MODATASELECTION
- MSG_GET_MODATAWEIGHTS
MSG_UPDATE
Must be sent if the bounding box has to be recalculated. (Otherwise use MSG_CHANGE.)
MSG_SMALLUPDATE
Part of the 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 is changed then the caches do not need to be rebuilt; MSG_SMALLUPDATE can be sent.
MSG_CHANGE
Must be sent if any object data (except for the matrix) has been changed.
Note
For tag parameter changes call:
C4DAtom.SetDirty(c4d.DIRTYFLAGS_DATA)
instead of:
C4DAtom.Message(c4d.MSG_CHANGE)
MSG_POINTS_CHANGED
Notifies an object its points have changed.
- Input: {old_cnt: int, new_cnt: int, vc_flags: int, map: list of int}
- old_cnt: Number of elements before the change.
- new_cnt: Number of elements after the change.
- vc_flags: Flags. See VC_FLAGS.
- map: Optional translation map.
MSG_GETCUSTOMICON
Retrieves an atom’s icon.
- Input: {}
- Output: {filled: bool, bmp:
c4d.bitmaps.BaseBitmap
, x: int, y: int, w: int, h: int, flags: int}
- filled: True if the icon was set.
- bmp: Icon’s bitmap. Can be None.
- x: X coordinate of the upper-left corner of the icon.
- y: Y coordinate of the upper-left corner of the icon.
- w: Width of the icon.
- h: Height of the icon.
- flags: Flags. See ICONDATAFLAGS.
MSG_GETCUSTOMICON_SETTINGS
New in version R21.
Retrieves the
c4d.CustomIconSettings
of an object.- Input: {}
- Output: {setting:
c4d.CustomIconSettings
}
MSG_EDIT
Edits the element. (Same as double-click in the Object Manager.)
MSG_DESCRIPTION_COMMAND
Sends a description command message. Simulates clicking on a description button.
- Input: {id:
c4d.DescID
}
- id: Description ID of the parameter that triggered the command.
- Input: {id:
MSG_DESCRIPTION_REMOVE_ENTRY
Tells a description to remove an entry.
- Input: {id:
c4d.DescID
}
- id: Description ID of the parameter that triggered the command.
- Input: {id:
MSG_DESCRIPTION_EDIT_ENTRY
Tells a description to edit an entry.
- Input: {id:
c4d.DescID
}
- id: Description ID of the parameter that triggered the command.
- Input: {id:
MSG_DESCRIPTION_POPUP
Allows description popup menu handling in the Attribute Manager.
- Input: {id:
c4d.DescID
, chosen: int, popup:c4d.BaseContainer
} - Output: {id:
c4d.DescID
, chosen: int, popup:c4d.BaseContainer
}
- id: Description ID of the parameter that triggered the command.
- chosen: Selected element of the popup.
- popup: Popup menu container.
- Input: {id:
MSG_DESCRIPTION_CHECKUPDATE
Allows elements to determine the type of refresh after a parameter has been changed.
- Input: {doc:
c4d.documents.BaseDocument
, drawflags: int, descidc4d.DescID
}
- doc: Current document.
- drawflags: Draw flags. See MSG_DESCRIPTION_CHECKUPDATE.
- descid: Description ID.
- Input: {doc:
MSG_DESCRIPTION_GETBITMAP
Queries a description for a
c4d.gui.BitmapButtonCustomGui
bitmap.- Input: {id:
c4d.DescID
,} - Output: {bmp:
c4d.bitmaps.BaseBitmap
, bmpflags: int}
- id: Description ID of the bitmap button.
- bmp: Bitmap for the button.
- bmpflags: Flags. See ICONDATAFLAGS.
- Input: {id:
MSG_DESCRIPTION_ALLOWOVERRIDE
Checks if take override operation is allowed.
- Input: {_takeData:
c4d.modules.takesystem.TakeData
, _overrideTake:c4d.modules.takesystem.BaseTake
, _descid:c4d.DescID
} - Output: {_parent:
c4d.BaseList2D
, _parentId:c4d.DescID
, _allow: bool, _overrideEnabled: bool}
- _takeData: Take system context.
- _overrideTake: The take asking for the override.
- _descid: Description ID to be overridden.
- _parent: Parent node if the override must be assigned to it and not to the original node. Especially useful in case of branched structures.
- _parentId: If parent is set also a translated parameter ID needs to be set.
- _allow: True if the parameter can be overridden, otherwise False.
- _overrideEnabled: True if the global switch allow the override, otherwise False.
- Input: {_takeData:
MSG_DOCUMENTINFO
Sends document messages.
See also
To send MSG_DOCUMENTINFO it is recommended to use
BaseDocument.SendInfo()
.- Input: {type: int, fileformat: int, filename: str}
- type: The message type. See MSG_DOCUMENTINFO_TYPE.
- fileformat: The file format. See FORMAT Export.
- filename: The document filename.
MSG_BASECONTAINER
Sends a message with a container.
- Input:
c4d.BaseContainer
- Input:
MSG_RETRIEVEPRIVATEDATA
Retrieves private data from an object.
Note
Used to obtain loader/saver settings.
- Input: {}
- Output: {imexporter:
c4d.BaseList2D
}
- imexporter: Scene loader/saver.
MSG_GETREALCAMERADATA
Retrieves a real camera object from a generator.
- Input: {}
- Output: {res:
c4d.BaseObject
}
- res: Real camera.
MSG_GETREALTAGDATA
Gets a real tag object from a virtual “generator” tag.
- Input: {}
- Output: {res:
c4d.BaseTag
}
- res: Real tag.
MSG_GET_MODATASELECTION
Retrieves the data of MoGraph selection tags.
- Input: {}
- Output: {sel:
c4d.BaseSelect
}
- sel: Selected clones.
MSG_GET_MODATAWEIGHTS
Retrieves the data for MoGraph weights tags.
- Input: {}
- Output: {_weight: list of float}
- _weight: Weight data.