BaseList2D Class Reference

#include <c4d_baselist.h>

Inheritance diagram for BaseList2D:

Detailed Description

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.

Private Member Functions

 BaseList2D ()
 
 ~BaseList2D ()
 

Bit

static const Int32 SETBIT_FLAG_NODIRTY
 
static const Int32 SETBIT_FLAG_REMOVE
 
void SetBit (Int32 mask)
 
Bool GetBit (Int32 mask) const
 
void DelBit (Int32 mask)
 
void ToggleBit (Int32 mask)
 
Int32 GetAllBits () const
 
void SetAllBits (Int32 bits)
 
void SetBitEx (Int32 mask, Int32 flags)
 

Alloc/Free

static BaseList2DAlloc (Int32 type)
 
static void Free (BaseList2D *&bl)
 
const CharGetViewportRenderId (VIEWPORT_RENDER_ID typeId) const
 

Navigation

BaseList2DGetNext ()
 
const BaseList2DGetNext () const
 
BaseList2DGetPred ()
 
const BaseList2DGetPred () const
 

Container

BaseContainer GetData ()
 
void SetData (const BaseContainer &bc, Bool add=true)
 
const BaseContainerGetDataInstanceRef () const
 
BaseContainerGetDataInstanceRef ()
 
const BaseContainerGetDataInstance () const
 
BaseContainerGetDataInstance ()
 

Name

String GetName () const
 
void SetName (const maxon::String &name, Bool setDirty=true)
 

Miscellaneous

String GetBubbleHelp ()
 
Bool TransferGoal (BaseList2D *dst, Bool undolink)
 
Bool TransferMarker (BaseList2D *dst) const
 
Bool CopyDynamicDescriptionFrom (const BaseList2D *src)
 
Bool Scale (Float scale)
 
Bool Edit ()
 
void GetIcon (IconData *dat)
 
GeListHeadGetNLARoot (Bool create)
 
BaseList2DAnimationLayerRemap (BaseObject **layer=nullptr)
 
String GetTypeName () const
 
const BaseList2DGetMain () const
 
BaseList2DGetMain ()
 
void InsertTrackSorted (CTrack *track)
 
Bool AddEventNotification (BaseList2D *bl, NOTIFY_EVENT eventid, NOTIFY_EVENT_FLAG flags, const BaseContainer *data)
 
Bool RemoveEventNotification (const BaseDocument *doc, BaseList2D *bl, NOTIFY_EVENT eventid)
 
Bool FindEventNotification (const BaseDocument *doc, BaseList2D *bl, NOTIFY_EVENT eventid)
 
Bool SetDescIDState (const DescID &id, DESCIDSTATE descidstate)
 
DESCIDSTATE GetDescIDState (const DescID &id, Bool tolerant) const
 
GeListHeadGetOverrideRoot (Bool create)
 
BaseOverrideGetFirstOverride ()
 
GeListHeadGetShaderRepositoryRoot (Bool create)
 
GeListHeadGetHiddenShaderRoot (Bool create)
 
maxon::NimbusForwardRef GetNimbusRef (const maxon::Id &spaceId) const
 
maxon::Result< maxon::NimbusForwardRefPrivateGetOrCreateNimbusRef (const maxon::Id &spaceId)
 
void RemoveNimbusRef (const maxon::Id &spaceId)
 
maxon::Result< maxon::HashMap< maxon::Id, maxon::NimbusForwardRef > > GetAllNimbusRefs () const
 
Bool IsNodeBased () const
 
maxon::Result< BoolGetAccessedObjects (METHOD_ID method, AccessedObjectsCallback &access) const
 
maxon::Result< BoolGetAccessedObjectsRec (ACCESSED_OBJECTS_MASK read, ACCESSED_OBJECTS_MASK write, METHOD_ID method, Bool withSiblings, Bool withChildren, AccessedObjectsCallback &access) const
 
maxon::Result< BoolGetAccessedObjectsOfHierarchy (ACCESSED_OBJECTS_MASK read, ACCESSED_OBJECTS_MASK write, METHOD_ID method, AccessedObjectsCallback &access) const
 
maxon::Result< BoolGetAccessedObjectsOfChildren (ACCESSED_OBJECTS_MASK read, ACCESSED_OBJECTS_MASK write, METHOD_ID method, AccessedObjectsCallback &access) const
 
maxon::Result< BoolGetAccessedObjectsOfFirstChildHierarchy (ACCESSED_OBJECTS_MASK read, ACCESSED_OBJECTS_MASK write, METHOD_ID method, AccessedObjectsCallback &access) const
 
maxon::Result< maxon::GenericDataGroupChanges ()
 

Marker

void GetMarkerStampEx (UInt32 *l1, UInt32 *l2)
 
const GeMarkerGetMarker () const
 
void SetMarker (const GeMarker &m)
 

Unique ID

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
 

Animated Parameter

Bool SetAnimatedParameter (const CTrack *track, const DescID &id, const GeData &t_data1, const GeData &t_data2, Float mix, DESCFLAGS_SET flags)
 
Bool GetAnimatedParameter (const DescID &id, GeData &t_data1, GeData &t_data2, Float &mix, DESCFLAGS_GET flags) const
 

Shader

BaseShaderGetFirstShader () const
 
void InsertShader (BaseShader *shader, BaseShader *pred=nullptr)
 

Keyframe

void ClearKeyframeSelection ()
 
Bool FindKeyframeSelection (const DescID &id)
 
Bool SetKeyframeSelection (const DescID &id, Bool selection)
 
Bool KeyframeSelectionContent ()
 

Layer

LayerObjectGetLayerObject (const BaseDocument *doc)
 
const LayerObjectGetLayerObject (const BaseDocument *doc) const
 
Bool SetLayerObject (const LayerObject *layer)
 
const LayerDataGetLayerData (const BaseDocument *doc, Bool rawdata=false) const
 
Bool SetLayerData (BaseDocument *doc, const LayerData &data)
 

Track

GeListHeadGetCTrackRoot (Bool create)
 
const GeListHeadGetCTrackRoot () const
 
const CTrackGetFirstCTrack () const
 
CTrackGetFirstCTrack ()
 
const CTrackFindCTrack (const DescID &id) const
 
CTrackFindCTrack (const DescID &id)
 

Additional Inherited Members

- Public Member Functions inherited from GeListNode
GeListNodeGetNext ()
 
const GeListNodeGetNext () const
 
GeListNodeGetPred ()
 
const GeListNodeGetPred () const
 
GeListNodeGetDown ()
 
const GeListNodeGetDown () const
 
GeListNodeGetUp ()
 
const GeListNodeGetUp () const
 
GeListNodeGetDownLast ()
 
const GeListNodeGetDownLast () const
 
void InsertBefore (GeListNode *bl)
 
void InsertAfter (GeListNode *bl)
 
void InsertUnder (GeListNode *bl)
 
void InsertUnderLast (GeListNode *bl)
 
void Remove ()
 
void FlushChilds ()
 
void MoveChildrenTo (GeListNode *dest)
 
GeListHeadGetListHead ()
 
const GeListHeadGetListHead () const
 
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)
 
GeListNodeGetCustomData ()
 
const GeListNodeGetCustomData () const
 
const BaseDocumentGetDocument () const
 
BaseDocumentGetDocument ()
 
maxon::Result< BoolGetBranchInfo (const maxon::ValueReceiver< const BranchInfo & > &info, GETBRANCHINFO flags) const
 
Bool IsDocumentRelated () const
 
Int32 GetInfo () const
 
Bool GetNBit (NBIT bit) const
 
UInt32 GetNBitMask (Int32 index) const
 
Bool ChangeNBit (NBIT bit, NBITCONTROL bitmode)
 
- Public Member Functions inherited from C4DAtomGoal
Bool HasLinks () const
 
- Public Member Functions inherited from C4DAtom
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)
 
C4DAtomGetClone (COPYFLAGS flags, AliasTrans *trn) const
 
Bool CopyTo (C4DAtom *dst, COPYFLAGS flags, AliasTrans *trn) const
 
Bool Read (HyperFile *hf, Int32 id, Int32 level)
 
Bool Write (HyperFile *hf) const
 
Bool ReadObject (HyperFile *hf, Bool readheader)
 
Bool WriteObject (HyperFile *hf) const
 
Bool GetDescription (Description *description, DESCFLAGS_DESC flags) const
 
Bool GetParameter (const DescID &id, GeData &t_data, DESCFLAGS_GET flags) const
 
Bool SetParameter (const DescID &id, const GeData &t_data, DESCFLAGS_SET flags)
 
DynamicDescriptionGetDynamicDescriptionWritable ()
 
const DynamicDescriptionGetDynamicDescription () const
 
Bool CopyDynamicDescriptionFrom (const BaseList2D *src)
 
Bool GetEnabling (const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc) const
 
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)
 

Constructor & Destructor Documentation

◆ BaseList2D()

BaseList2D ( )
private

◆ ~BaseList2D()

~BaseList2D ( )
private

Member Function Documentation

◆ Alloc()

static BaseList2D* Alloc ( Int32  type)
static

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
[in]typeA node type ID.

◆ Free()

static void Free ( BaseList2D *&  bl)
static

Destructs base list nodes allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.

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

◆ GetViewportRenderId()

const Char* GetViewportRenderId ( VIEWPORT_RENDER_ID  typeId) const

Gets the Id of the viewport render object. The return value can be nullptr.

Parameters
[in]typeIdDefines which Id to return.
Returns
The viewport render Id.

◆ GetNext() [1/2]

BaseList2D* GetNext ( )

Gets the next BaseList2D in the list. Convenience version of GeListNode::GetNext().

Returns
The next BaseList2D, or nullptr if there is none. Cinema 4D owns the pointed BaseList2D.

◆ GetNext() [2/2]

const BaseList2D* GetNext ( ) const

◆ GetPred() [1/2]

BaseList2D* GetPred ( )

Gets the previous BaseList2D in the list. Convenience version of GeListNode::GetPred().

Returns
The previous BaseList2D, or nullptr if there is none. Cinema 4D owns the pointed BaseList2D.

◆ GetPred() [2/2]

const BaseList2D* GetPred ( ) const

◆ SetBit()

void SetBit ( Int32  mask)

Sets the bits denoted by mask to true.

Parameters
[in]maskThe mask of the bits: BIT

◆ GetBit()

Bool GetBit ( Int32  mask) const

Gets the state of the object bits denoted by mask.

Parameters
[in]maskThe 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]maskThe bit mask of the bits: BIT

◆ ToggleBit()

void ToggleBit ( Int32  mask)

Toggles the state of the object bits denoted by the mask.

Parameters
[in]maskThe 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]bitsThe new object's bits.

◆ SetBitEx()

void SetBitEx ( Int32  mask,
Int32  flags 
)

◆ GetData()

BaseContainer GetData ( )

Retrieves a copy of the object's container. It is recommended to use GetDataInstanceRef() instead because GetData makes a copy of the BaseContainer which can be costly.

See also
GetDataInstanceRef()
Returns
The object container.

◆ SetData()

void SetData ( const BaseContainer bc,
Bool  add = true 
)

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]bcThe container with the new values.
[in]addIf false the values are merged, otherwise the old values are discarded.

◆ GetDataInstanceRef() [1/2]

const BaseContainer& GetDataInstanceRef ( ) const

Retrieves a reference to the read-only object 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:
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().
Since
R19
Returns
A reference to the read-only internal container. The node owns the referenced container.

◆ GetDataInstanceRef() [2/2]

BaseContainer& GetDataInstanceRef ( )

Retrieves a reference to the read-only object 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:
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().
Since
R19
Returns
A reference to the read-only internal container. The node owns the referenced container.

◆ GetDataInstance() [1/2]

const BaseContainer* GetDataInstance ( ) const

Retrieves a pointer to the read-only object container. It is recommended to use GetDataInstanceRef() instead.

See also
GetDataInstanceRef()
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]

BaseContainer* GetDataInstance ( )

Retrieves a pointer to the read-only object container. It is recommended to use GetDataInstanceRef() instead.

See also
GetDataInstanceRef()
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.

◆ GetName()

String GetName ( ) const

Gets the name of the object.

Returns
The object's name.

◆ SetName()

void SetName ( const maxon::String name,
Bool  setDirty = true 
)

Sets the name of the object.

Parameters
[in]nameThe new object's name.

◆ GetBubbleHelp()

String GetBubbleHelp ( )

Gets the bubble help text for the object.

Returns
The bubble help text.

◆ TransferGoal()

Bool TransferGoal ( BaseList2D dst,
Bool  undolink 
)

Transfer goals from the object to dst.
This changes all BaseLink links that point to this object to point to dst instead.

Parameters
[in]dstThe destination. The caller owns the pointed object.
[in]undolinkThis has to be set to false. Private.
Returns
true if the goals could be transfered, otherwise false.

◆ TransferMarker()

Bool TransferMarker ( BaseList2D dst) const

Private.

◆ GetMarkerStampEx()

void GetMarkerStampEx ( UInt32 l1,
UInt32 l2 
)

Deprecated.

◆ GetMarker()

const GeMarker& GetMarker ( ) const

Gets the object's marker.

Returns
The object's marker.

◆ SetMarker()

void SetMarker ( const GeMarker m)

Sets the object's marker.

Parameters
[in]mThe new object's marker.

◆ AddUniqueID()

Bool AddUniqueID ( Int32  appid,
const Char *const  mem,
Int  bytes 
)

Adds a unique application ID data to the object.

Note
This is used for instance to identify scenes written by external applications.
Parameters
[in]appidA unique application ID. It has to be registered at MAXON, at least it should be obtained from http://www.plugincafe.com.
[in]memA pointer to a block of memory, used for instance to store the name of a software vendor.
[in]bytesThe length of the memory block mem.
Returns
true if successful, otherwise false.

◆ FindUniqueID()

Bool FindUniqueID ( Int32  appid,
const Char *&  mem,
Int bytes 
) const

Checks for a specific unique application ID data.

Note
This is used for instance to identify scenes written by external applications.
Parameters
[in]appidA unique application ID. It has to be registered at MAXON, at least it should be obtained from http://www.plugincafe.com.
[out]memAssigned a pointer to a block of memory, used for instance to read the name of a software vendor.
[out]bytesAssigned 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()

Bool GetUniqueIDIndex ( Int32  idx,
Int32 id,
const Char *&  mem,
Int bytes 
) const

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]idxThe unique ID index.
[out]idAssigned the unique application ID.
[out]memAssigned a pointer to a block of memory, used for instance to read the name of a software vendor.
[out]bytesAssigned the length of the memory block mem.
Returns
true if successful, otherwise false.

◆ SetAnimatedParameter()

Bool SetAnimatedParameter ( const CTrack track,
const DescID id,
const GeData t_data1,
const GeData t_data2,
Float  mix,
DESCFLAGS_SET  flags 
)

Normally not used. Used by the animator to set the interpolated value along with the right and left value.

Parameters
[in]trackThe animation track. The caller owns the pointed track.
[in]idThe ID of the animated parameter.
[in]t_data1The first data.
[in]t_data2The second data.
[in]mixThe mix value between t_data1 and t_data2.
[in]flagsFlags: DESCFLAGS_SET
Returns
true if the animated parameter was set, otherwise false.

◆ GetAnimatedParameter()

Bool GetAnimatedParameter ( const DescID id,
GeData t_data1,
GeData t_data2,
Float mix,
DESCFLAGS_GET  flags 
) const

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:

EXECUTIONRESULT TargetExpressionTag::Execute(BaseTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, Int32 priority, EXECUTIONFLAGS flags)
{
GeData s1, s2;
Float mix;
BaseList2D *o1 = s1.GetLink(doc);
BaseList2D *o2 = s2.GetLink(doc);
if (!o1 || !o1->IsInstanceOf(Obase))
Vector nrot, p = static_cast<BaseObject*>(o1)->GetMg().off;
if (mix>0.0 && o2 && o2->IsInstanceOf(Obase))
p = p * (1.0-mix) + static_cast<BaseObject*>(o2)->GetMg().off * mix;
p = p * (!op->GetUpMg());
nrot = VectorToHPB(p - op->GetPos());
nrot.z = op->GetRot().z;
op->SetRot(nrot);
}
PyObject * o2
Definition: abstract.h:399
PyCompilerFlags * flags
Definition: ast.h:14
Definition: c4d_basedocument.h:497
Definition: c4d_baselist.h:2376
Bool GetAnimatedParameter(const DescID &id, GeData &t_data1, GeData &t_data2, Float &mix, DESCFLAGS_GET flags) const
Definition: c4d_baseobject.h:248
Definition: c4d_basetag.h:52
Definition: c4d_thread.h:29
Bool IsInstanceOf(Int32 id) const
Definition: c4d_baselist.h:1561
Definition: c4d_gedata.h:83
const BaseList2D * GetLink(const BaseDocument *doc, Int32 instanceof=0) const
const Py_UNICODE * s2
Definition: unicodeobject.h:1176
unsigned char * p
Definition: floatobject.h:87
maxon::Int32 Int32
Definition: ge_sys_math.h:56
maxon::Float Float
Definition: ge_sys_math.h:62
EXECUTIONFLAGS
Definition: ge_prepass.h:3295
EXECUTIONRESULT
Definition: ge_prepass.h:3898
#define Obase
Base object - BaseObject.
Definition: ge_prepass.h:1090
Vector VectorToHPB(const Vector &p)
#define ConstDescID(...)
Definition: lib_description.h:594
const char * doc
Definition: pyerrors.h:226
PyObject * op
Definition: object.h:520
Represents a level within a DescID.
Definition: lib_description.h:298
@ TARGETEXPRESSIONTAG_LINK
Definition: ttargetexpression.h:6
Parameters
[in]idThe ID of the parameter.
[in]t_data1Assigned the first data.
[in]t_data2Assigned the second data.
[in]mixAssigned the mix value between t_data1 and t_data2.
[in]flagsFlags: DESCFLAGS_GET
Returns
true if the animated parameter was retrieved, otherwise false.

◆ CopyDynamicDescriptionFrom()

Bool CopyDynamicDescriptionFrom ( const BaseList2D src)

CopyDynamicDescriptionFrom copies the dynamic description from src to this.

Parameters
[in]srcSource object.
Returns
True on success.

◆ Scale()

Bool Scale ( Float  scale)

Sets the object's scale.
This will scale all parameters with length units by the factor scale.

Parameters
[in]scaleThe scale factor.
Returns
true if the object was scaled successfully, otherwise false.

◆ GetFirstShader()

BaseShader* GetFirstShader ( ) const

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

void InsertShader ( BaseShader shader,
BaseShader pred = nullptr 
)

Inserts a shader in the object's shader list.

BaseMaterial *mat = nullptr;
mat = doc->GetFirstMaterial();
if (!mat)
return true;
if (!shd)
return false;
mat->InsertShader(shd);
mat->Update(true, true);
void EventAdd(EVENT eventflag=EVENT::NONE)
Definition: c4d_basecontainer.h:48
void SetLink(Int32 id, const C4DAtomGoal *link)
Definition: c4d_basecontainer.h:686
const BaseContainer & GetDataInstanceRef() const
Definition: c4d_baselist.h:2517
void InsertShader(BaseShader *shader, BaseShader *pred=nullptr)
Definition: c4d_baselist.h:2758
Definition: c4d_basematerial.h:28
void Update(Bool preview, Bool rttm)
Definition: c4d_basechannel.h:36
static BaseShader * Alloc(Int32 type)
Bool Message(Int32 type, void *data=nullptr)
Definition: c4d_baselist.h:1582
#define MSG_UPDATE
Must be sent if the bounding box has to be recalculated. (Otherwise use MSG_CHANGE....
Definition: c4d_baselist.h:359
#define Xbitmap
Bitmap.
Definition: ge_prepass.h:1323
@ MATERIAL_COLOR_SHADER
Definition: mmaterial.h:294
Parameters
[in]shaderThe shader to insert. The object takes over the ownership of the pointed shader.
[in]predThe 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()

Bool 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()

void GetIcon ( IconData dat)

Gets the icon for the object, by filling dat.

Parameters
[out]datPointer to the icon data to fill. The caller owns the pointed icon data.

◆ ClearKeyframeSelection()

void ClearKeyframeSelection ( )

Clears the current keyframe selection.

◆ FindKeyframeSelection()

Bool FindKeyframeSelection ( const DescID id)

Checks if id is included in the keyframe selection.

Parameters
[in]idThe description ID to check.
Returns
true if the given id is selected, otherwise false.

◆ SetKeyframeSelection()

Bool SetKeyframeSelection ( const DescID id,
Bool  selection 
)

Sets the keyframe selection status of id to selection.

Parameters
[in]idThe description ID to set.
[in]selectiontrue 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() [1/2]

LayerObject* GetLayerObject ( const BaseDocument doc)

Gets the layer of the object.

Parameters
[in]docThe document for the operation.
Returns
The layer, or nullptr.

◆ GetLayerObject() [2/2]

const LayerObject* GetLayerObject ( const BaseDocument doc) const

◆ SetLayerObject()

Bool SetLayerObject ( const LayerObject layer)

Sets the layer of the object.

Parameters
[in]layerThe new layer.
Returns
true if the layer was successfully set, otherwise false.

◆ GetLayerData()

const LayerData* GetLayerData ( const BaseDocument doc,
Bool  rawdata = false 
) const

Gets the layer data for the object.

Parameters
[in]docThe document for the operation.
[in]rawdataUsually 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()

Bool SetLayerData ( BaseDocument doc,
const LayerData data 
)

Sets the layer data for the object.

Parameters
[in]docThe document for the operation.
[in]dataThe new layer data.
Returns
true if the layer data was successfully set, otherwise false.

◆ GetCTrackRoot() [1/2]

GeListHead* GetCTrackRoot ( Bool  create)

Gets the track root of the object.

Returns
The track root.

◆ GetCTrackRoot() [2/2]

const GeListHead* GetCTrackRoot ( ) const

Gets the track root of the object.

Returns
The track root.

◆ GetFirstCTrack() [1/2]

const CTrack* GetFirstCTrack ( ) const

Gets the first track of the object.

Returns
The first track, or nullptr if there are no tracks.

◆ GetFirstCTrack() [2/2]

CTrack* GetFirstCTrack ( )

Gets the first track of the object.

Returns
The first track, or nullptr if there are no tracks.

◆ FindCTrack() [1/2]

const CTrack* FindCTrack ( const DescID id) const

Finds the track for the specified description id.

Parameters
[in]idThe description ID for the searched track.
Returns
The found track, or nullptr if there was no match.

◆ FindCTrack() [2/2]

CTrack* FindCTrack ( const DescID id)

Finds the track for the specified description id.

Parameters
[in]idThe description ID for the searched track.
Returns
The found track, or nullptr if there was no match.

◆ GetNLARoot()

GeListHead* GetNLARoot ( Bool  create)

Private.

◆ AnimationLayerRemap()

BaseList2D* AnimationLayerRemap ( BaseObject **  layer = nullptr)

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]layerThe 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()

String GetTypeName ( ) const

The name of the object type, for example "Phong", "Spline", "Bone", etc.

Returns
The type name.

◆ GetMain() [1/2]

const BaseList2D* GetMain ( ) const

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.

◆ GetMain() [2/2]

BaseList2D* 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]trackThe track to insert.

◆ AddEventNotification()

Bool AddEventNotification ( BaseList2D bl,
NOTIFY_EVENT  eventid,
NOTIFY_EVENT_FLAG  flags,
const BaseContainer data 
)

Private.

◆ RemoveEventNotification()

Bool RemoveEventNotification ( const BaseDocument doc,
BaseList2D bl,
NOTIFY_EVENT  eventid 
)

Private.

◆ FindEventNotification()

Bool FindEventNotification ( const BaseDocument doc,
BaseList2D bl,
NOTIFY_EVENT  eventid 
)

Private.

◆ SetDescIDState()

Bool SetDescIDState ( const DescID id,
DESCIDSTATE  descidstate 
)

Sets the state for the description id.

Parameters
[in]idThe description ID.
[in]descidstateThe new description ID state: DESCIDSTATE
Returns
true if the description ID state was successfully set, otherwise false.

◆ GetDescIDState()

DESCIDSTATE GetDescIDState ( const DescID id,
Bool  tolerant 
) const

Gets the state of a description id.

Parameters
[in]idThe description ID.
[in]tolerantIf 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:
Definition: lib_description.h:355
@ DTYPE_VECTOR
Vector
Definition: lib_description.h:70
@ DTYPE_REAL
Float
Definition: lib_description.h:68
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()

GeListHead* GetOverrideRoot ( Bool  create)

Private.

Since
R17.032

◆ GetFirstOverride()

BaseOverride* GetFirstOverride ( )

Private.

Since
R17.032

◆ GetShaderRepositoryRoot()

GeListHead* GetShaderRepositoryRoot ( Bool  create)

Private.

Since
R17.032

◆ GetHiddenShaderRoot()

GeListHead* GetHiddenShaderRoot ( Bool  create)

Private.

◆ GetNimbusRef()

maxon::NimbusForwardRef GetNimbusRef ( const maxon::Id spaceId) const

Return the owning NimbusRef or NimbusBaseRef corresponding to the provided NodeSpace Id.

// Retrieve the standard render NodeSpace from the selected material. In practice we should
// test if mat is a nullptr before proceeding.
BaseMaterial* mat = doc->GetActiveMaterial();
maxon::NimbusBaseRef nimbusRef = mat->GetNimbusRef(maxon::nodes::MaterialNodeSpaces::Standard.GetId());
if (nimbusRef == nullptr)
return;
maxon::NimbusForwardRef GetNimbusRef(const maxon::Id &spaceId) const
Definition: c4d_baselist.h:3010
Parameters
[in]spaceIdThe NodeSpace ID.
Returns
Returns the owner of the node graph.

◆ PrivateGetOrCreateNimbusRef()

maxon::Result<maxon::NimbusForwardRef> PrivateGetOrCreateNimbusRef ( const maxon::Id spaceId)

Private.

◆ RemoveNimbusRef()

void RemoveNimbusRef ( const maxon::Id spaceId)

Remove the NimbusRef, and therefore the owned graph, that is corresponding to the provided NodeSpace Id.

Parameters
[in]spaceIdThe NodeSpace ID.

◆ GetAllNimbusRefs()

Retrieve a HashMap of all NodeSpace ID and NimbusRef of the current BaseList is holding.

Note
The NimbusForwardRef cannot be casted directly to a maxon::NimbusBaseRef. Instead, maxon::NimbusForwardRef::GetBase should be used to retrieve the base.
// Print all the NodeSpace ID from the selected material. In practice we should
// test if mat is a nullptr before proceeding.
BaseMaterial* mat = doc->GetActiveMaterial();
// The error handling needs to have an error context defined with either iferr_scope or iffer_handler.
for (const auto& e : hashNimbusRefs)
{
const maxon::Id& key = e.GetKey();
const maxon::NimbusBaseRef nimbusRef = e.GetValue().GetBase();
ApplicationOutput("NodeSpace ID: @"_s, key);
}
PyObject * key
Definition: abstract.h:289
maxon::Result< maxon::HashMap< maxon::Id, maxon::NimbusForwardRef > > GetAllNimbusRefs() const
Definition: c4d_baselist.h:3041
Definition: hashmap.h:1115
Definition: apibaseid.h:243
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:204
Py_ssize_t * e
Definition: longobject.h:89
#define iferr_return
Definition: resultbase.h:1524
Returns
Returns a hash map of NodeSpace ID with their corresponding NimbusRef.

◆ IsNodeBased()

Bool IsNodeBased ( ) const

Checks whether the object contains nodes.

Returns
True if node-based.

◆ GetAccessedObjects()

maxon::Result<Bool> GetAccessedObjects ( METHOD_ID  method,
AccessedObjectsCallback access 
) const

◆ GetAccessedObjectsRec()

maxon::Result<Bool> GetAccessedObjectsRec ( ACCESSED_OBJECTS_MASK  read,
ACCESSED_OBJECTS_MASK  write,
METHOD_ID  method,
Bool  withSiblings,
Bool  withChildren,
AccessedObjectsCallback access 
) const

◆ GetAccessedObjectsOfHierarchy()

maxon::Result<Bool> GetAccessedObjectsOfHierarchy ( ACCESSED_OBJECTS_MASK  read,
ACCESSED_OBJECTS_MASK  write,
METHOD_ID  method,
AccessedObjectsCallback access 
) const

◆ GetAccessedObjectsOfChildren()

maxon::Result<Bool> GetAccessedObjectsOfChildren ( ACCESSED_OBJECTS_MASK  read,
ACCESSED_OBJECTS_MASK  write,
METHOD_ID  method,
AccessedObjectsCallback access 
) const

◆ GetAccessedObjectsOfFirstChildHierarchy()

maxon::Result<Bool> GetAccessedObjectsOfFirstChildHierarchy ( ACCESSED_OBJECTS_MASK  read,
ACCESSED_OBJECTS_MASK  write,
METHOD_ID  method,
AccessedObjectsCallback access 
) const

◆ GroupChanges()

maxon::Result<maxon::GenericData> GroupChanges ( )

Starts to group subsequent changes to parameters of this BaseList2D. The grouping ends when the lifetime of the returned GenericData ends (i.e., when its destructor or Reset function is called). You can call this function when you know that you'll make several changes (e.g., calls to SetParameter) in a row, then the BaseList2D can avoid costly updates between intermediate changes.

Returns
An object to control the lifetime of the grouping.

Member Data Documentation

◆ SETBIT_FLAG_NODIRTY

const Int32 SETBIT_FLAG_NODIRTY
static

Private.

◆ SETBIT_FLAG_REMOVE

const Int32 SETBIT_FLAG_REMOVE
static