Description Class Reference

#include <lib_description.h>

Detailed Description

The description class contains information for all description ID of an object.
For example it stores a BaseContainer for ID_BASEOBJECT_REL_POSITION that describes that this value is a Vector, has minimum and maximum values XYZ etc.
To access the actual values of these description parameters you will have to ask the object itself, for example with C4DAtom::GetParameter().
Example to get the name of a description, for example "Landscape Object":

String GetTypeName(C4DAtom *op)
{
if (op)
{
AutoAlloc<Description> desc;
if (!desc)
return String();
if (!op->GetDescription(desc, DESCFLAGS_DESC::NONE))
return String();
const BaseContainer *bc = desc->GetParameterI(ConstDescID(DescLevel(DESCID_ROOT)), nullptr);
if (bc)
return bc->GetString(DESC_NAME);
}
return String();
}
@ DESC_NAME
String Name for standalone use.
Definition: lib_description.h:90
#define ConstDescID(...)
Definition: lib_description.h:592
#define DESCID_ROOT
Root description ID.
Definition: lib_description.h:21
MAXON_ATTRIBUTE_FORCE_INLINE Id GetTypeName()
Definition: typename.h:32
PyObject * op
Definition: object.h:520
PyStructSequence_Desc * desc
Definition: structseq.h:26

Public Member Functions

Bool LoadDescription (const BCResourceObj *bc, Bool copy)
 
Bool LoadDescription (Int32 id)
 
Bool LoadDescription (const String &id)
 
Bool SortGroups ()
 
const BCResourceObj * GetDescription ()
 
const BaseContainerGetParameter (const DescID &id, BaseContainer &temp, AtomArray *ar) const
 
BaseContainerGetParameterI (const DescID &id, AtomArray *ar)
 
Bool SetParameter (const DescID &id, const BaseContainer &param, const DescID &groupid)
 
void * BrowseInit () const
 
Bool GetNext (void *handle, const BaseContainer **bc, DescID &id, DescID &groupid) const
 
void BrowseFree (void *&handle) const
 
DescEntry * GetFirst (const AtomArray &op)
 
DescEntry * GetNext (DescEntry *de)
 
DescEntry * GetDown (DescEntry *de)
 
void GetDescEntry (DescEntry *de, const BaseContainer **bc, DescID &descid)
 
SubDialogCreateDialogI ()
 
void FreeDialog (SubDialog *dlg)
 
Bool CreatePopupMenu (BaseContainer &menu)
 
Bool GetPopupId (Int32 id, const DescID &descid)
 
Bool CheckDescID (const DescID &searchid, const AtomArray &ops, DescID *completeid)
 
Bool GetSubDescriptionWithData (const DescID &did, const AtomArray &op, RESOURCEDATATYPEPLUGIN *resdatatypeplugin, const BaseContainer &bc, DescID *singledescid)
 
const DescIDGetSingleDescID ()
 
void SetSingleDescriptionMode (const DescID &descid)
 

Private Member Functions

 Description ()
 
 ~Description ()
 

Alloc/Free

static DescriptionAlloc ()
 
static void Free (Description *&description)