-
首页
-
C4D R23.110 C++ SDK
详细描述
函数
|
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
()
|
Macro Definition Documentation
◆
LIBRARY_ACTIVEOBJECTMANAGER
#define LIBRARY_ACTIVEOBJECTMANAGER
|
Active object manager library ID.
Typedef Documentation
◆
MESSAGEHOOK
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()
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()
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()
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()
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]
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]
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()
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()
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()
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()
Retrieves the information for a mode by index.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
ActiveObjectManager_GetLastMode()
Gets the last used mode.
-
返回
-
The last mode.
Variable Documentation
◆
MAXON_ENUM_LIST
DynamicDescription * GetDynamicDescription()
BaseContainer GetCustomDataTypeDefault(Int32 type)
Bool EditDescription(C4DAtom *bl, const DescID &id)
BaseDocument * GetActiveDocument(void)
@ DESC_ANIMATE
Int32 Animation mode:
定义:
lib_description.h:104
void SetInt32(Int32 id, Int32 l)
定义:
c4d_basecontainer.h:505
#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
void SetString(Int32 id, const maxon::String &s)
定义:
c4d_basecontainer.h:569
#define AOM_MSG_ISENABLED
Sent when the mode is enabled.
定义:
lib_activeobjectmanager.h:101
void SetBool(Int32 id, Bool b)
定义:
c4d_basecontainer.h:498
@ DESC_MIN
Int32/Float/Vector Minimum value.
定义:
lib_description.h:99
Int32 GetId() const
定义:
c4d_basecontainer.h:131
void GetActiveTags(AtomArray &selection) const
@ DESC_SHORT_NAME
String Short name, for attributes dialog.
定义:
lib_description.h:92
@ DESC_MAX
Int32/Float/Vector Maximum value.
定义:
lib_description.h:100
@ DTYPE_LONG
Int32
定义:
lib_description.h:67
@ 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
Parameter is animatable.
定义:
lib_description.h:106
@ DESC_NAME
String Name for standalone use.
定义:
lib_description.h:91
@ DESC_REMOVEABLE
Bool true if entry is removable.
定义:
lib_description.h:129
@ DESC_STEP
Int32/Float/Vector The step for the edit field arrows.
定义:
lib_description.h:103
定义:
lib_description.h:733
#define CUSTOMGUI_LONG
Int32 edit field.
定义:
lib_description.h:210
DescID Alloc(const BaseContainer &datadescription)
定义:
c4d_basedocument.h:490
定义:
c4d_basecontainer.h:46