公共成员函数
|
Bool
|
LoadDescription
(const BCResourceObj *bc,
Bool
copy)
|
Bool
|
LoadDescription
(
Int32
id)
|
Bool
|
LoadDescription
(const
String
&id)
|
Bool
|
SortGroups
()
|
const BCResourceObj *
|
GetDescription
()
|
const
BaseContainer
*
|
GetParameter
(const
DescID
&id,
BaseContainer
&temp,
AtomArray
*ar) const
|
BaseContainer
*
|
GetParameterI
(const
DescID
&id,
AtomArray
*ar)
|
Bool
|
SetParameter
(const
DescID
&id, const
BaseContainer
¶m, const
DescID
&groupid)
|
void *
|
BrowseInit
()
|
Bool
|
GetNext
(void *handle, const
BaseContainer
**bc,
DescID
&id,
DescID
&groupid)
|
void
|
BrowseFree
(void *&handle)
|
DescEntry *
|
GetFirst
(const
AtomArray
&op)
|
DescEntry *
|
GetNext
(DescEntry *de)
|
DescEntry *
|
GetDown
(DescEntry *de)
|
void
|
GetDescEntry
(DescEntry *de, const
BaseContainer
**bc,
DescID
&descid)
|
SubDialog
*
|
CreateDialogI
()
|
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
DescID
*
|
GetSingleDescID
()
|
void
|
SetSingleDescriptionMode
(const
DescID
&descid)
|
Alloc/Free
|
static
描述
*
|
Alloc
()
|
static void
|
Free
(
描述
*&description)
|
构造函数 & 析构函数文档编制
◆
Description()
◆
~Description()
成员函数文档编制
◆
Alloc()
Allocates a description. Destroy the allocated description with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated description, or
nullptr
if the allocation failed.
◆
Free()
static void Free
|
(
|
描述
*&
|
description
|
)
|
|
|
static
|
Destructs descriptions allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
description
|
The description to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
LoadDescription()
[1/3]
Bool
LoadDescription
|
(
|
const BCResourceObj *
|
bc
,
|
|
|
Bool
|
copy
|
|
)
|
|
|
Loads a description from a
BCResourceObj
, such as the one returned from
GetDescription()
.
-
警告
-
Existing entries are lost.
-
参数
-
[in]
|
bc
|
The
BCResourceObj
to load the description from.
|
[in]
|
copy
|
true
if the description should be copied, otherwise the objects will share the same internal data so that changes to one affects the other.
|
-
返回
-
true
if the description was loaded, otherwise
false
.
◆
LoadDescription()
[2/3]
Loads a description by ID. The ID must have been registered with
RegisterDescription()
.
-
警告
-
Existing entries are lost.
-
参数
-
[in]
|
id
|
The description ID, for example
Obase
.
|
-
返回
-
true
if the description was loaded, otherwise
false
.
◆
LoadDescription()
[3/3]
Loads a description by name. The description name must have been registered with
RegisterDescription()
.
-
警告
-
Existing entries are lost.
-
参数
-
[in]
|
id
|
The description name, for example
"Obase"
.
|
-
返回
-
true
if the description was loaded, otherwise
false
.
◆
SortGroups()
Private
.
◆
GetDescription()
const BCResourceObj* GetDescription
|
(
|
|
)
|
|
Retrieves the internal pointer of the description.
-
返回
-
The internal description pointer.
◆
GetParameter()
Retrieves the information container for a description parameter.
-
参数
-
[in]
|
id
|
The description ID.
|
[out]
|
temp
|
When the parameter is of a dynamic type that does not already exist as predefined container, i.e. not returnable as pointer, the result is the address of
temp
,其中
temp
allows to store the data.
In this case
nullptr
is returned.
|
[out]
|
ar
|
Most of the time this can be just
AtomArray()
. However dynamic descriptions (like sub-descriptions of a gradient or dynamic XPresso node) need an array of elements the parameter is assigned to.
|
-
返回
-
The information container, or
nullptr
if
temp
was used. The description owns the pointed container.
◆
GetParameterI()
Retrieves a pointer to the information container for a description parameter.
-
参数
-
[in]
|
id
|
The description ID.
|
[out]
|
ar
|
Most of the time this can be just
AtomArray()
. However dynamic descriptions (like sub-descriptions of a gradient or dynamic XPresso node) need an array of elements the parameter is assigned to.
|
-
返回
-
The information container. The description owns the pointed container.
◆
SetParameter()
Inserts a description parameter into the collection.
-
参数
-
[in]
|
id
|
The description ID.
|
[in]
|
param
|
The settings for the new parameter.
|
[in]
|
groupid
|
The ID of the parameter's group, or
DESCID_ROOT
.
|
-
返回
-
true
if the parameter was inserted, otherwise
false
.
◆
BrowseInit()
Starts browsing the parameters linearly.
-
警告
-
After browsing is done done
BrowseFree()
must be called.
-
返回
-
The browse handle.
◆
GetNext()
[1/2]
Retrieves the next parameter in a browse sequence initialized with
BrowseInit()
.
-
参数
-
[in]
|
handle
|
The browse handle returned by
BrowseInit()
.
|
[out]
|
bc
|
Assigned the settings for the retrieved parameter. The caller owns the pointed base container.
|
[out]
|
id
|
Assigned the ID of the retrieved parameter.
|
[out]
|
groupid
|
Assigned the group ID of the retrieved parameter.
|
-
返回
-
true
if a new parameter was retrieved, otherwise the sequence is finished.
◆
BrowseFree()
void BrowseFree
|
(
|
void *&
|
handle
|
)
|
|
Frees browse handles from
BrowseInit()
.
-
参数
-
[in,out]
|
handle
|
The handle to free. Assigned
nullptr
.
|
◆
GetFirst()
Gets a handle to the first description entry. Use
GetDescEntry()
to access the information and
GetNext()
or
GetDown()
to browse the hierarchy.
-
参数
-
[in]
|
op
|
Most of the time this can be just
AtomArray()
. However dynamic descriptions (like sub-descriptions of a gradient or dynamic XPresso node) need an array of elements the parameter is assigned to.
|
-
返回
-
The description entry handle.
◆
GetNext()
[2/2]
DescEntry* GetNext
|
(
|
DescEntry *
|
de
|
)
|
|
Gets the next description entry handle.
-
参数
-
[in]
|
de
|
The current description entry handle.
|
-
返回
-
The next description entry handle.
◆
GetDown()
DescEntry* GetDown
|
(
|
DescEntry *
|
de
|
)
|
|
Gets the child description entry handle.
-
参数
-
[in]
|
de
|
The current description entry handle.
|
-
返回
-
The child description entry handle.
◆
GetDescEntry()
Retrieves the data for a description entry handle.
-
参数
-
[in]
|
de
|
The current description entry handle.
|
[out]
|
bc
|
Assigned the settings for the retrieved parameter. The caller owns the pointed base container.
|
[out]
|
descid
|
Assigned the ID of the retrieved parameter.
|
◆
CreateDialogI()
Private
.
◆
FreeDialog()
Private
.
◆
CreatePopupMenu()
Builds a popup menu for choosing a parameter in the description.
-
参数
-
[out]
|
menu
|
Assigned the menu container.
|
-
返回
-
true
if the menu was built, otherwise
false
.
◆
GetPopupId()
Private
.
◆
CheckDescID()
Checks if a description ID
searchid
exists for the given objects
ops
(usually only one single object is passed as otherwise the smallest common nominator is returned).
若
completeid
!=
nullptr
and the return value is
true
the complete ID will be assigned to
completeid
.
-
注意
-
Complete ID means that all parts of the
DescLevel
are filled with appropriate data.
For example if the
DescID
passed is:
DescID
(
DescLevel
(ID_BASEOBJECT_POSITION, 0, 0),
DescLevel
(
VECTOR_X
, 0, 0))
CheckDescID()
will return:
DescID
(
DescLevel
(ID_BASEOBJECT_POSITION,
DTYPE_VECTOR
,
ID_BASEOBJECT_GROUP1
),
DescLevel
(
VECTOR_X
,
DTYPE_REAL
, ...))
-
参数
-
[in]
|
searchid
|
The partial ID.
|
[in]
|
ops
|
Most of the time this can be just
AtomArray()
. However dynamic descriptions (like sub-descriptions of a gradient or dynamic XPresso node) need an array of elements the parameter is assigned to.
|
[out]
|
completeid
|
Assigned the complete ID.
|
-
返回
-
true
if a description ID
searchid
exists, otherwise
false
.
◆
GetSubDescriptionWithData()
Retrieves dynamic sub-description data (e.g. the gradient data type).
-
参数
-
[in]
|
did
|
The description ID.
|
[in]
|
op
|
The current objects.
|
[in]
|
resdatatypeplugin
|
The resource data type plug, retrieved with
FindResourceDataTypePlugin()
.
|
[out]
|
bc
|
The existing container for the data type.
|
[in]
|
singledescid
|
Should be
nullptr
.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetSingleDescID()
const
DescID
* GetSingleDescID
|
(
|
|
)
|
|
Private
.
◆
SetSingleDescriptionMode()
void SetSingleDescriptionMode
|
(
|
const
DescID
&
|
descid
|
)
|
|
Private
.
定义:
lib_description.h:327
Bool GetDescription(Description *description, DESCFLAGS_DESC flags)
@ VECTOR_X
X component.
定义:
lib_description.h:267
#define DESCID_ROOT
Root description ID.
定义:
lib_description.h:22
@ DTYPE_VECTOR
向量
定义:
lib_description.h:70
@ ID_BASEOBJECT_GROUP1
定义:
obase.h:51
Represents a level within a DescID.
定义:
lib_description.h:286
BaseContainer * GetParameterI(const DescID &id, AtomArray *ar)
String GetString(Int32 id, const maxon::String &preset=maxon::String()) const
定义:
c4d_basecontainer.h:387
@ DESC_NAME
String Name for standalone use.
定义:
lib_description.h:91
@ DTYPE_REAL
Float
定义:
lib_description.h:68
定义:
c4d_basecontainer.h:46