#include <c4d_baselist.h>
Represents a C4DAtom that resides in a 2D list.
Note Has to be created with Alloc() and destroyed with Free() . Use AutoAlloc to automate the allocation and destruction based on scope.
String GetBubbleHelp ()
Bool TransferGoal (BaseList2D *dst, Bool undolink)
Bool TransferMarker (BaseList2D *dst) const
Bool Scale (Float scale)
Bool Edit ()
void GetIcon (IconData *dat)
GeListHead * GetNLARoot ()
BaseList2D * AnimationLayerRemap (BaseObject **layer=nullptr)
String GetTypeName ()
BaseList2D * GetMain () const
void InsertTrackSorted (CTrack *track)
Bool AddEventNotification (BaseList2D *bl, NOTIFY_EVENT eventid, NOTIFY_EVENT_FLAG flags, const BaseContainer *data)
Bool RemoveEventNotification (BaseDocument *doc, BaseList2D *bl, NOTIFY_EVENT eventid)
Bool FindEventNotification (BaseDocument *doc, BaseList2D *bl, NOTIFY_EVENT eventid)
Bool SetDescIDState (const DescID &id, DESCIDSTATE descidstate)
DESCIDSTATE GetDescIDState (const DescID &id, Bool tolerant) const
GeListHead * GetOverrideRoot ()
BaseOverride * GetFirstOverride ()
GeListHead * GetShaderRepositoryRoot ()
GeListHead * GetHiddenShaderRoot ()
maxon::NimbusInterface * GetNimbusRef (const maxon::Id &spaceId) const
maxon::Result < maxon::NimbusInterface * > GetOrCreateNimbusRef (const maxon::Id &spaceId)
void RemoveNimbusRef (const maxon::Id &spaceId)
maxon::Result < maxon::HashMap < maxon::Id , maxon::ForwardRef < maxon::NimbusRef > > > GetAllNimbusRefs () const
Bool IsNodeBased () const
GeListNode * GetNext ()
GeListNode * GetPred ()
GeListNode * GetDown ()
GeListNode * GetUp ()
GeListNode * GetDownLast ()
void InsertBefore (GeListNode *bl)
void InsertAfter (GeListNode *bl)
void InsertUnder (GeListNode *bl)
void InsertUnderLast (GeListNode *bl)
void Remove ()
GeListHead * GetListHead ()
Int32 GetNodeID (Int32 index=0) const
template<typename CAST >
const CAST * GetNodeData (Int32 index=0) const
template<typename CAST >
CAST * GetNodeData (Int32 index=0)
void SetCustomData (GeListNode *node)
GeListNode * GetCustomData ()
BaseDocument * GetDocument ()
Int32 GetBranchInfo (BranchInfo *info, Int32 max, GETBRANCHINFO flags)
Bool IsDocumentRelated ()
Int32 GetInfo ()
Bool GetNBit (NBIT bit) const
UInt32 GetNBitMask (Int32 index) const
Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
Int32 GetType () const
Int32 GetRealType () const
Int32 GetDiskType () const
Bool IsInstanceOf (Int32 id) const
Int32 GetClassification () const
Bool Message (Int32 type, void *data=nullptr)
Bool MultiMessage (MULTIMSG_ROUTE flags, Int32 type, void *data)
C4DAtom * GetClone (COPYFLAGS flags, AliasTrans *trn)
Bool CopyTo (C4DAtom *dst, COPYFLAGS flags, AliasTrans *trn)
Bool Read (HyperFile *hf, Int32 id, Int32 level)
Bool Write (HyperFile *hf)
Bool ReadObject (HyperFile *hf, Bool readheader)
Bool WriteObject (HyperFile *hf)
Bool GetDescription (Description *description, DESCFLAGS_DESC flags)
Bool GetParameter (const DescID &id, GeData &t_data, DESCFLAGS_GET flags)
Bool SetParameter (const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
DynamicDescription * GetDynamicDescription ()
Bool GetEnabling (const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc)
Bool TranslateDescID (const DescID &id, DescID &res_id, C4DAtom *&res_at)
UInt32 GetDirty (DIRTYFLAGS flags) const
void SetDirty (DIRTYFLAGS flags)
UInt32 GetHDirty (HDIRTYFLAGS mask) const
void SetHDirty (HDIRTYFLAGS mask)
◆ BaseList2D()
◆ ~BaseList2D()
◆ Alloc()
Allocates a base list node. Destroy the allocated base list node with Free() . Use AutoAlloc to automate the allocation and destruction based on scope.
Parameters
◆ Free()
Destructs base list nodes allocated with Alloc() . Use AutoAlloc to automate the allocation and destruction based on scope.
Parameters
[in,out] bl The base list node to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.
◆ GetNext()
◆ GetPred()
◆ SetBit()
void SetBit
(
Int32
mask )
Sets the bits denoted by mask to true .
Parameters
[in] mask The mask of the bits: BIT
◆ GetBit()
Gets the state of the object bits denoted by mask .
Parameters
[in] mask The mask of the bits: BIT
Returns The state of the object bits denoted by mask .
◆ DelBit()
void DelBit
(
Int32
mask )
Deletes the object bits denoted by mask , i.e. sets the corresponding bit to 0 .
Parameters
[in] mask The bit mask of the bits: BIT
◆ ToggleBit()
void ToggleBit
(
Int32
mask )
Toggles the state of the object bits denoted by the mask .
Parameters
[in] mask The bit mask of the bits: BIT
◆ GetAllBits()
Int32 GetAllBits
(
)
const
Returns all the object's bits.
Returns All the object's bits: BIT
◆ SetAllBits()
void SetAllBits
(
Int32
bits )
Sets all the object's bits at once.
Parameters
[in] bits The new object's bits.
◆ GetData()
Retrieves a copy of the object's container.
Note Some objects do not store all their data in the container. For these use GetParameter() /SetParameter() instead.
Here are some built-in objects that do not store everything in the container:
CompositingTag
DisplayTag
ValueKey
TextureTag
KinematicTag
UVWTag
LightObject
MetaballTag
There are also often some other pieces of information that are not stored in the container, for example:
Most of this information is accessible through other API functions, like for example BaseList2D::GetName() .
Returns The object container.
◆ SetData()
Sets the object container.
By default the contents of bc is added to the existing container; control this behavior with add .
Note Do not forget to send a message if you change any settings.
Parameters
[in] bc The container with the new values.
[in] add If false the values are merged, otherwise the old values are discarded.
◆ GetDataInstance() [1/2]
Retrieves a pointer to the read-only object container.
See also GetData()
Returns A pointer to the read-only internal container. The node owns the pointed container.
Note The returned pointer is guaranteed to be valid and never nullptr .
◆ GetDataInstance() [2/2]
Retrieves a pointer to the object container that can be changed directly.
See also GetData()
Returns A pointer to the internal container. The node owns the pointed container.
Note The returned pointer is guaranteed to be valid and never nullptr .
◆ GetDataInstanceRef() [1/2]
Retrieves a reference to the read-only object container.
Since R19
See also GetData()
Returns A reference to the read-only internal container. The node owns the referenced container.
◆ GetDataInstanceRef() [2/2]
Retrieves a reference to the object container that can be changed directly.
Since R19
See also GetData()
Returns A reference to the internal container. The node owns the referenced container.
◆ GetName()
Gets the name of the object.
Returns The object's name.
◆ SetName()
Sets the name of the object.
Parameters
[in] name The new object's name.
◆ GetBubbleHelp()
Gets the bubble help text for the object.
Returns The bubble help text.
◆ TransferGoal()
Transfer goals from the object to dst .
This changes all BaseLink links that point to this object to point to dst instead.
Parameters
[in] dst The destination. The caller owns the pointed object.
[in] undolink This has to be set to false . Private.
Returns true if the goals could be transfered, otherwise false .
◆ TransferMarker()
◆ GetMarkerStampEx()
◆ GetMarker()
Gets the object's marker.
Returns The object's marker.
◆ SetMarker()
Sets the object's marker.
Parameters
[in] m The new object's marker.
◆ AddUniqueID()
Adds a unique application ID data to the object.
Note This is used for instance to identify scenes written by external applications.
Parameters
[in] appid A unique application ID. It has to be registered at MAXON, at least it should be obtained from http://www.plugincafe.com .
[in] mem A pointer to a block of memory, used for instance to store the name of a software vendor.
[in] bytes The length of the memory block mem .
Returns true if successful, otherwise false .
◆ FindUniqueID()
Checks for a specific unique application ID data.
Note This is used for instance to identify scenes written by external applications.
Parameters
[in] appid A unique application ID. It has to be registered at MAXON, at least it should be obtained from http://www.plugincafe.com .
[out] mem Assigned a pointer to a block of memory, used for instance to read the name of a software vendor.
[out] bytes Assigned the length of the memory block mem .
Returns true if the ID could be found, otherwise false .
◆ GetUniqueIDCount()
Int32 GetUniqueIDCount
(
)
const
Gets the number of unique application IDs.
Returns The number of unique application IDs.
◆ GetUniqueIDIndex()
Gets the idx -th unique application ID data (idx ranging from 0 to GetUniqueIDCount() -1).
Note This is used for instance to identify scenes written by external applications.
Parameters
[in] idx The unique ID index.
[out] id Assigned the unique application ID.
[out] mem Assigned a pointer to a block of memory, used for instance to read the name of a software vendor.
[out] bytes Assigned the length of the memory block mem .
Returns true if successful, otherwise false .
◆ SetAnimatedParameter()
Normally not used. Used by the animator to set the interpolated value along with the right and left value.
Parameters
[in] track The animation track. The caller owns the pointed track.
[in] id The ID of the animated parameter.
[in] t_data1 The first data.
[in] t_data2 The second data.
[in] mix The mix value between t_data1 and t_data2 .
[in] flags Flags: DESCFLAGS_SET
Returns true if the animated parameter was set, otherwise false .
◆ GetAnimatedParameter()
If a parameter is set to MIX animation use this function to retrieve information about it.
For example, the target expression has a link to its current target and when it is animated it slides between the two targets:
{
p = p * (1.0-mix) + ((
BaseObject *)o2)->GetMg().off * mix;
op->SetRot(nrot);
}
Parameters
[in] id The ID of the parameter.
[in] t_data1 Assigned the first data.
[in] t_data2 Assigned the second data.
[in] mix Assigned the mix value between t_data1 and t_data2 .
[in] flags Flags: DESCFLAGS_GET
Returns true if the animated parameter was retrieved, otherwise false .
◆ Scale()
Sets the object's scale.
This will scale all parameters with length units by the factor scale.
Parameters
[in] scale The scale factor.
Returns true if the object was scaled successfully, otherwise false .
◆ GetFirstShader()
Retrieves the first shader of the object.
Note Normally you do not have to deal with the shader list. But if you want to create or modify shader trees via the API read the following lines:
If you are programming shader links to make sure that every shader is referenced only once; it is not allowed that a shader is referenced multiple times.
If the referencing object is a shader the referenced shader must be child of it, otherwise it must be inserted via InsertShader() .
Example 1: A tag references a shader. The shader must be inserted into the tag using InsertShader() ;. Example 2: A Shader (A) references another shader (B): the shader B must be child of the shader A.
Returns The first shader of the object, or nullptr if there are none. The object owns the pointed shader.
◆ InsertShader()
Inserts a shader in the object's shader list.
if (!mat)
return true ;
if (!data)
return true ;
if (!shd)
return false ;
Parameters
[in] shader The shader to insert. The object takes over the ownership of the pointed shader.
[in] pred The shader to insert the new shader after, or nullptr (default)to insert the new shader first. The pointed shader must already be inserted into the list.
◆ Edit()
Triggers the edit action for the object.
Note For most types this brings up the node in the attributes manager. Some still show a separate dialog.
Returns true if successful, otherwise false .
◆ GetIcon()
Gets the icon for the object, by filling dat .
Parameters
[out] dat Pointer to the icon data to fill. The caller owns the pointed icon data.
◆ ClearKeyframeSelection()
void ClearKeyframeSelection
(
)
Clears the current keyframe selection.
◆ FindKeyframeSelection()
Checks if id is included in the keyframe selection.
Parameters
[in] id The description ID to check.
Returns true if the given id is selected, otherwise false .
◆ SetKeyframeSelection()
Sets the keyframe selection status of id to selection.
Parameters
[in] id The description ID to set.
[in] selection true if the element should be included in the keyframe selection, otherwise false .
Returns A value that should be ignored.
◆ KeyframeSelectionContent()
Bool KeyframeSelectionContent
(
)
Checks if there is any active keyframe selections.
Note This is not the same as BIT_ACTIVE ; it is the possibility to restrict auto-keyframing to certain description parameters.
See "Animation->Add Keyframe Selection" in the Attribute Manager.
Returns true if there is a keyframe selection, otherwise false .
◆ GetLayerObject()
Gets the layer of the object.
Parameters
[in] doc The document for the operation.
Returns The layer, or nullptr .
◆ SetLayerObject()
Sets the layer of the object.
Parameters
Returns true if the layer was successfully set, otherwise false .
◆ GetLayerData()
Gets the layer data for the object.
Parameters
[in] doc The document for the operation.
[in] rawdata Usually GetLayerData() takes special global modes like SOLO layer automatically into account.
To get the original layer values without any additional global changes set rawdata to true .
Returns The layer data, or nullptr .
◆ SetLayerData()
Sets the layer data for the object.
Parameters
[in] doc The document for the operation.
[in] data The new layer data.
Returns true if the layer data was successfully set, otherwise false .
◆ GetCTrackRoot()
Gets the track root of the object.
Returns The track root.
◆ GetFirstCTrack()
Gets the first track of the object.
Returns The first track, or nullptr if there are no tracks.
◆ FindCTrack()
Finds the track for the specified description id .
Parameters
[in] id The description ID for the searched track.
Returns The found track, or nullptr if there was no match.
◆ GetNLARoot()
◆ AnimationLayerRemap()
Retrieves a remapped base list pointer if an active animation layer is existent.
If there is no active layer or no layer at all this
will be returned.
Optionally access the layer by passing layer .
Parameters
[out] layer The current active layer. You can then access the layer properties. Cinema 4D owns the pointed layer object.
Returns The remapped base list pointer. This is the object of the current active layer. Cinema 4D owns the pointed layer object.
◆ GetTypeName()
The name of the object type, for example "Phong" , "Spline" , "Bone" , etc.
Returns The type name.
◆ GetMain()
Goes up the next level, e.g. from tag to object or XPresso node to tag, or object to document, etc.
Returns The main object of the object.
◆ InsertTrackSorted()
void InsertTrackSorted
(
CTrack *
track )
Inserts a track and automatically places it at the right place (so that Y comes after X for example).
Parameters
[in] track The track to insert.
◆ AddEventNotification()
◆ RemoveEventNotification()
◆ FindEventNotification()
◆ SetDescIDState()
Sets the state for the description id .
Parameters
[in] id The description ID.
[in] descidstate The new description ID state: DESCIDSTATE
Returns true if the description ID state was successfully set, otherwise false .
◆ GetDescIDState()
Gets the state of a description id .
Parameters
[in] id The description ID.
[in] tolerant If set to true a valid state is returned even though the description ID do not match-completly.
This can be useful for descriptions with several levels. Take this description ID for example: If tolerant is true a valid state is returned even though only the following description ID is passed:
Returns The description ID state: DESCIDSTATE
◆ GetOverrideRoot()
◆ GetFirstOverride()
◆ GetShaderRepositoryRoot()
◆ GetHiddenShaderRoot()
◆ GetNimbusRef()
maxon::NimbusInterface* GetNimbusRef
(
const maxon::Id &
spaceId )
const
◆ GetOrCreateNimbusRef()
◆ RemoveNimbusRef()
void RemoveNimbusRef
(
const maxon::Id &
spaceId )
◆ GetAllNimbusRefs()
◆ IsNodeBased()
Bool IsNodeBased
(
)
const
Checks whether the object contains nodes.
Returns True if node-based.
Definition: c4d_basechannel.h:31
Definition: c4d_baselist.h:2100
#define Xbitmap
Bitmap.
Definition: ge_prepass.h:1157
EXECUTIONFLAGS
Definition: ge_prepass.h:2950
const BaseContainer * GetDataInstance() const
Definition: c4d_baselist.h:2224
Definition: c4d_baseobject.h:220
Definition: lib_description.h:315
Definition: ttargetexpression.h:6
maxon::Float Float
Definition: ge_sys_math.h:51
BaseMaterial * GetFirstMaterial(void)
Definition: c4d_thread.h:22
Definition: c4d_basetag.h:40
BaseList2D * GetLink(const BaseDocument *doc, Int32 instanceof=0) const
Definition: mmaterial.h:272
#define MSG_UPDATE
Must be sent if the bounding box has to be recalculated. (Otherwise use MSG_CHANGE....
Definition: c4d_baselist.h:335
Vector
Definition: lib_description.h:66
static BaseShader * Alloc(Int32 type)
Represents a level within a DescID.
Definition: lib_description.h:274
Definition: c4d_gedata.h:77
#define Obase
Base object - BaseObject.
Definition: ge_prepass.h:1016
maxon::Int32 Int32
Definition: ge_sys_math.h:45
Matrix GetUpMg() const
Definition: c4d_baseobject.h:503
Bool Message(Int32 type, void *data=nullptr)
Definition: c4d_baselist.h:1350
EXECUTIONRESULT
Definition: ge_prepass.h:3528
void SetLink(Int32 id, C4DAtomGoal *link)
Definition: c4d_basecontainer.h:600
void Update(Bool preview, Bool rttm)
void EventAdd(EVENT eventflag=EVENT::NONE)
Bool IsInstanceOf(Int32 id) const
Definition: c4d_baselist.h:1329
Float
Definition: lib_description.h:64
Definition: c4d_basematerial.h:23
Bool GetAnimatedParameter(const DescID &id, GeData &t_data1, GeData &t_data2, Float &mix, DESCFLAGS_GET flags)
Definition: c4d_basedocument.h:462
Definition: c4d_basecontainer.h:42
void InsertShader(BaseShader *shader, BaseShader *pred=nullptr)
Definition: c4d_baselist.h:2469