Active Object Manager

Detailed Description

Groups

 ACTIVEOBJECTMANAGER_SETOBJECTS
 
 ACTIVEOBJECTMODE
 
 AOM_MSG
 

Classes

struct  ActiveModeInfo
 

Macros

#define LIBRARY_ACTIVEOBJECTMANAGER
 

Typedefs

typedef GeData MESSAGEHOOK(const BaseContainer &msg, void *data)
 

Functions

Bool ActiveObjectManager_RegisterMode (ACTIVEOBJECTMODE id, const String &text, MESSAGEHOOK *hook)
 
void ActiveObjectManager_SetMode (ACTIVEOBJECTMODE id, Bool openmanager)
 
void ActiveObjectManager_SetObjects (ACTIVEOBJECTMODE id, const AtomArray &objects, Int32 flags, const DescID &activepage=DescID())
 
void ActiveObjectManager_SetObject (ACTIVEOBJECTMODE id, C4DAtom *op, Int32 flags, const DescID &activepage=DescID())
 
void ActiveObjectManager_Open ()
 
Bool EditObjectModal (const AtomArray &objects, const String &dlgtitle)
 
Bool EditObjectModal (C4DAtom *op, const String &dlgtitle)
 
Bool EditDescription (C4DAtom *bl, const DescID &id)
 
void AddDescription (C4DAtom *bl)
 
void PasteDescription (C4DAtom *bl)
 
Bool ActiveObjectManager_GetObjects (ACTIVEOBJECTMODE id, AtomArray &objects)
 
Bool ActiveObjectManager_GetModeInfo (ACTIVEOBJECTMODE id, ActiveModeInfo &info)
 
Int32 ActiveObjectManager_GetModeCount ()
 
Bool ActiveObjectManager_GetModeInfoIdx (Int32 idx, ActiveModeInfo &info)
 
ACTIVEOBJECTMODE ActiveObjectManager_GetLastMode ()
 

Variables

struct ActiveModeInfo MAXON_ENUM_LIST
 

Macro Definition Documentation

◆ LIBRARY_ACTIVEOBJECTMANAGER

#define LIBRARY_ACTIVEOBJECTMANAGER

Active object manager library ID.

Typedef Documentation

◆ MESSAGEHOOK

typedef GeData MESSAGEHOOK(const BaseContainer &msg, void *data)

Describes a hook for active object manager modes.
Here is an example:

GeData TagMessageHook(const BaseContainer &msg,void *data)
{
switch (msg.GetId())
{
return true;
{
if (!doc)
break;
doc->GetActiveTags(*static_cast<AtomArray*>(data));
return true;
}
break;
}
return false;
}
BaseDocument * GetActiveDocument()
Definition: c4d_baselist.h:1796
Definition: c4d_basecontainer.h:48
Definition: c4d_basedocument.h:497
Definition: c4d_gedata.h:83
#define AOM_MSG_ISENABLED
Sent when the mode is enabled.
Definition: lib_activeobjectmanager.h:102
#define AOM_MSG_GETATOMLIST
Sent when the active Object Manager needs a list of atoms to show. Store these in the * pointed by da...
Definition: lib_activeobjectmanager.h:103
const char * doc
Definition: pyerrors.h:226
const char const char * msg
Definition: object.h:438
Parameters
[in]msgThe message container. These are the available messages: AOM_MSG
[in]dataThe data pointer. Depends on the message.
Returns
true if successful, otherwise false.

Function Documentation

◆ ActiveObjectManager_RegisterMode()

Bool ActiveObjectManager_RegisterMode ( ACTIVEOBJECTMODE  id,
const String text,
MESSAGEHOOK hook 
)

Registers a new mode. If no hook is passed the active objects will need to be manually set with ActiveObjectManager_SetObjects().

Parameters
[in]idThe mode ID. If it is not a member of ACTIVEOBJECTMODE, use a unique ID: ACTIVEOBJECTMODE
[in]textThe mode name.
[in]hookThe mode hook, or nullptr to register a mode without a hook.
Returns
true if the new mode was registered, otherwise false.

◆ ActiveObjectManager_SetMode()

void ActiveObjectManager_SetMode ( ACTIVEOBJECTMODE  id,
Bool  openmanager 
)

Sets the current mode.
For example, when the timeline becomes active, it calls ActiveObjectManager_SetMode(ACTIVEOBJECTMODE::TIMELINE) so that there is a manager ready to show its selections.

Parameters
[in]idThe mode ID.
[in]openmanagerIf true a new manager is opened if there is no manager that accepts the given id, for example if the other managers are locked or have that mode disabled.

◆ ActiveObjectManager_SetObjects()

void ActiveObjectManager_SetObjects ( ACTIVEOBJECTMODE  id,
const AtomArray objects,
Int32  flags,
const DescID activepage = DescID() 
)

Sets the currently shown objects in the specified mode id.

Note
Use this only if a mode has been registered without a hook. Otherwise the managers will ask for new objects themselves, and listen for events when new objects are selected.
Parameters
[in]idThe mode ID.
[in]objectsThe objects to show.
[in]flagsThe flags: ACTIVEOBJECTMANAGER_SETOBJECTS
[in]activepageThe tab of the object's description to be shown. Pass the description ID of the tab.

◆ ActiveObjectManager_SetObject()

void ActiveObjectManager_SetObject ( ACTIVEOBJECTMODE  id,
C4DAtom op,
Int32  flags,
const DescID activepage = DescID() 
)

Sets the currently shown object op in the specified mode id.

Note
Use this only if a mode has been registered without a hook. Otherwise the managers will ask for new objects themselves, and listen for events when new objects are selected.
Parameters
[in]idThe mode ID.
[in]opThe object to show.
[in]flagsThe flags: ACTIVEOBJECTMANAGER_SETOBJECTS
[in]activepageThe tab of the object's description to be shown. Pass the description ID of the tab. Parameter description IDs are also allowed, this will open all parent groups containing the parameter.

◆ ActiveObjectManager_Open()

void ActiveObjectManager_Open ( )

Opens a new active object manager.

◆ EditObjectModal() [1/2]

Bool EditObjectModal ( const AtomArray objects,
const String dlgtitle 
)

Shows a modal active object manager dialog with the specified objects and dlgtitle.

Parameters
[in]objectsThe objects to show.
[in]dlgtitleThe dialog title.
Returns
true if successful, otherwise false.

◆ EditObjectModal() [2/2]

Bool EditObjectModal ( C4DAtom op,
const String dlgtitle 
)

Shows a modal active object manager dialog with the specified object op and title dlgtitle.

Parameters
[in]opThe object to show.
[in]dlgtitleThe dialog title.
Returns
true if successful, otherwise false.

◆ EditDescription()

Bool EditDescription ( C4DAtom bl,
const DescID id 
)

Shows the edit dialog for a dynamic description (i.e. user data).
Example:

DynamicDescription* dd = op->GetDynamicDescription();
bc.SetString(DESC_NAME,"test1");
BaseContainer GetCustomDataTypeDefault(Int32 type)
void SetBool(Int32 id, Bool b)
Definition: c4d_basecontainer.h:580
void SetString(Int32 id, const maxon::String &s)
Definition: c4d_basecontainer.h:651
void SetInt32(Int32 id, Int32 l)
Definition: c4d_basecontainer.h:587
Definition: lib_description.h:828
DescID Alloc(const BaseContainer &datadescription)
#define CUSTOMGUI_LONG
Int32 edit field.
Definition: lib_description.h:217
@ DESC_STEP
Int32/Float/Vector The step for the edit field arrows.
Definition: lib_description.h:103
@ DESC_ANIMATE_ON
Parameter is animatable.
Definition: lib_description.h:106
@ DESC_MIN
Int32/Float/Vector Minimum value.
Definition: lib_description.h:99
@ DESC_CUSTOMGUI
Int32 The ID of the GUI for this element. Either a custom ID or one of: CUSTOMGUI
Definition: lib_description.h:125
@ DESC_NAME
String Name for standalone use.
Definition: lib_description.h:91
@ DESC_ANIMATE
Int32 Animation mode:
Definition: lib_description.h:104
@ DESC_MAX
Int32/Float/Vector Maximum value.
Definition: lib_description.h:100
@ DESC_SHORT_NAME
String Short name, for attributes dialog.
Definition: lib_description.h:92
@ DESC_REMOVEABLE
Bool true if entry is removable.
Definition: lib_description.h:129
@ DTYPE_LONG
Int32
Definition: lib_description.h:67
Bool EditDescription(C4DAtom *bl, const DescID &id)
PyObject * op
Definition: object.h:520
Parameters
[in]blThe owner of the user data e.g. objects, tags etc.
[in]idThe ID of the user data element to be inserted.
Returns
true if successful, otherwise false.

◆ AddDescription()

void AddDescription ( C4DAtom bl)

Shows the add dialog for a dynamic description (i.e. user data).

Since
R17.032
Parameters
[in]blThe owner of the user data e.g. objects, tags etc. The caller owns the pointed C4DAtom.

◆ PasteDescription()

void PasteDescription ( C4DAtom bl)

Shows the paste dialog for a dynamic description (i.e. user data).

Since
R17.032
Parameters
[in]blThe owner of the user data e.g. objects, tags etc. The caller owns the pointed C4DAtom.

◆ ActiveObjectManager_GetObjects()

Bool ActiveObjectManager_GetObjects ( ACTIVEOBJECTMODE  id,
AtomArray objects 
)

Retrieves the currently shown objects in the specified mode id.

Parameters
[in]idThe mode ID.
[out]objectsThe shown objects.
Returns
true if successful, otherwise false.

◆ ActiveObjectManager_GetModeInfo()

Bool ActiveObjectManager_GetModeInfo ( ACTIVEOBJECTMODE  id,
ActiveModeInfo info 
)

Retrieves the information for the specified mode id.

Parameters
[in]idThe mode ID.
[out]infoFilled with the mode information.
Returns
true if successful, otherwise false.

◆ ActiveObjectManager_GetModeCount()

Int32 ActiveObjectManager_GetModeCount ( )

Gets the number of modes.

Returns
The number of modes.

◆ ActiveObjectManager_GetModeInfoIdx()

Bool ActiveObjectManager_GetModeInfoIdx ( Int32  idx,
ActiveModeInfo info 
)

Retrieves the information for a mode by index.

Parameters
[in]idxThe index of the mode: 0 <= idx < ActiveObjectManager_GetModeCount()
[out]infoFilled with the mode information.
Returns
true if successful, otherwise false.

◆ ActiveObjectManager_GetLastMode()

ACTIVEOBJECTMODE ActiveObjectManager_GetLastMode ( )

Gets the last used mode.

Returns
The last mode.

Variable Documentation

◆ MAXON_ENUM_LIST

struct ActiveModeInfo MAXON_ENUM_LIST