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(*((AtomArray*)data));
return true;
}
break;
}
return false;
}
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.

◆ 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:

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