Active Object Manager Library

详细描述

Groups

  ACTIVEOBJECTMANAGER_SETOBJECTS
  ACTIVEOBJECTMODE
  AOM_MSG

Classes

struct   ActiveModeInfo

Macros

#define  LIBRARY_ACTIVEOBJECTMANAGER

Typedefs

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

函数

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

变量

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 ()) { case AOM_MSG_ISENABLED : return true ;
case AOM_MSG_GETATOMLIST : { BaseDocument * doc = GetActiveDocument (); if (!doc) break ; doc-> GetActiveTags (*(( AtomArray *)data)); return true ; } break ; } return false ; }
参数
[in] msg The message container. These are the available messages: AOM_MSG
[in] data The data pointer. Depends on the message.
返回
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() .

参数
[in] id The mode ID. If it is not a member of ACTIVEOBJECTMODE , use a unique ID: ACTIVEOBJECTMODE
[in] text The mode name.
[in] hook The mode hook, or nullptr to register a mode without a hook.
返回
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.

参数
[in] id The mode ID.
[in] openmanager 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 对象 in the specified mode id .

注意
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.
参数
[in] id The mode ID.
[in] 对象 The objects to show.
[in] flags The flags: ACTIVEOBJECTMANAGER_SETOBJECTS
[in] activepage The 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 .

注意
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.
参数
[in] id The mode ID.
[in] op The object to show.
[in] flags The flags: ACTIVEOBJECTMANAGER_SETOBJECTS
[in] activepage The 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 对象 and dlgtitle .

参数
[in] 对象 The objects to show.
[in] dlgtitle The dialog title.
返回
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 .

参数
[in] op The object to show.
[in] dlgtitle The dialog title.
返回
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).
范例:

DynamicDescription * dd = op-> GetDynamicDescription (); BaseContainer bc = GetCustomDataTypeDefault ( DTYPE_LONG ); bc. SetString ( DESC_NAME , "test1" ); bc. SetString ( DESC_SHORT_NAME , "test1" ); bc. SetInt32 ( DESC_CUSTOMGUI , CUSTOMGUI_LONG ); bc. SetInt32 ( DESC_MIN ,0); bc. SetInt32 ( DESC_MAX ,100); bc. SetInt32 ( DESC_STEP ,1); bc. SetInt32 ( DESC_ANIMATE , DESC_ANIMATE_ON ); bc. SetBool ( DESC_REMOVEABLE , true ); EditDescription (op, dd-> Alloc (bc));
参数
[in] bl The owner of the user data e.g. objects, tags etc.
[in] id The ID of the user data element to be inserted.
返回
true if successful, otherwise false .

◆  AddDescription()

void AddDescription ( C4DAtom bl )

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

由于
R17.032
参数
[in] bl The 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).

由于
R17.032
参数
[in] bl The 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 对象 in the specified mode id .

参数
[in] id The mode ID.
[out] 对象 The shown objects.
返回
true if successful, otherwise false .

◆  ActiveObjectManager_GetModeInfo()

Bool ActiveObjectManager_GetModeInfo ( ACTIVEOBJECTMODE   id ,
ActiveModeInfo info  
)

Retrieves the information for the specified mode id .

参数
[in] id The mode ID.
[out] info Filled with the mode information.
返回
true if successful, otherwise false .

◆  ActiveObjectManager_GetModeCount()

Int32 ActiveObjectManager_GetModeCount ( )

Gets the number of modes.

返回
The number of modes.

◆  ActiveObjectManager_GetModeInfoIdx()

Bool ActiveObjectManager_GetModeInfoIdx ( Int32   idx ,
ActiveModeInfo info  
)

Retrieves the information for a mode by index.

参数
[in] idx The index of the mode: 0 <= idx < ActiveObjectManager_GetModeCount()
[out] info Filled with the mode information.
返回
true if successful, otherwise false .

◆  ActiveObjectManager_GetLastMode()

ACTIVEOBJECTMODE ActiveObjectManager_GetLastMode ( )

Gets the last used mode.

返回
The last mode.

Variable Documentation

◆  MAXON_ENUM_LIST

struct ActiveModeInfo MAXON_ENUM_LIST
C4DAtom::GetDynamicDescription
DynamicDescription * GetDynamicDescription()
GetCustomDataTypeDefault
BaseContainer GetCustomDataTypeDefault(Int32 type)
EditDescription
Bool EditDescription(C4DAtom *bl, const DescID &id)
GetActiveDocument
BaseDocument * GetActiveDocument(void)
DESC_ANIMATE
@ DESC_ANIMATE
Int32 Animation mode:
定义: lib_description.h:104
BaseContainer::SetInt32
void SetInt32(Int32 id, Int32 l)
定义: c4d_basecontainer.h:505
AOM_MSG_GETATOMLIST
#define AOM_MSG_GETATOMLIST
Sent when the active Object Manager needs a list of atoms to show. Store these in the AtomArray* poin...
定义: lib_activeobjectmanager.h:102
BaseContainer::SetString
void SetString(Int32 id, const maxon::String &s)
定义: c4d_basecontainer.h:569
AOM_MSG_ISENABLED
#define AOM_MSG_ISENABLED
Sent when the mode is enabled.
定义: lib_activeobjectmanager.h:101
BaseContainer::SetBool
void SetBool(Int32 id, Bool b)
定义: c4d_basecontainer.h:498
DESC_MIN
@ DESC_MIN
Int32/Float/Vector Minimum value.
定义: lib_description.h:99
BaseContainer::GetId
Int32 GetId() const
定义: c4d_basecontainer.h:131
BaseDocument::GetActiveTags
void GetActiveTags(AtomArray &selection) const
DESC_SHORT_NAME
@ DESC_SHORT_NAME
String Short name, for attributes dialog.
定义: lib_description.h:92
DESC_MAX
@ DESC_MAX
Int32/Float/Vector Maximum value.
定义: lib_description.h:100
DTYPE_LONG
@ DTYPE_LONG
Int32
定义: lib_description.h:67
GeData
定义: c4d_gedata.h:82
DESC_CUSTOMGUI
@ DESC_CUSTOMGUI
Int32 The ID of the GUI for this element. Either a custom ID or one of: CUSTOMGUI
定义: lib_description.h:125
DESC_ANIMATE_ON
@ DESC_ANIMATE_ON
Parameter is animatable.
定义: lib_description.h:106
DESC_NAME
@ DESC_NAME
String Name for standalone use.
定义: lib_description.h:91
DESC_REMOVEABLE
@ DESC_REMOVEABLE
Bool true if entry is removable.
定义: lib_description.h:129
AtomArray
定义: c4d_baselist.h:1587
DESC_STEP
@ DESC_STEP
Int32/Float/Vector The step for the edit field arrows.
定义: lib_description.h:103
DynamicDescription
定义: lib_description.h:733
CUSTOMGUI_LONG
#define CUSTOMGUI_LONG
Int32 edit field.
定义: lib_description.h:210
DynamicDescription::Alloc
DescID Alloc(const BaseContainer &datadescription)
BaseDocument
定义: c4d_basedocument.h:490
BaseContainer
定义: c4d_basecontainer.h:46

Copyright  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1