◆
~CAMorph()
成员函数文档编制
◆
GetName()
Retrieves the name of the morph.
-
返回
-
The name of the morph.
◆
SetName()
void SetName
|
(
|
const
String
&
|
name
|
)
|
|
Sets the name of the morph.
-
参数
-
[in]
|
name
|
The new name of the morph.
|
◆
GetID()
Retrieves the internal ID of the morph. Each morph has an ID. This ensures that removed morphs do not affect the
DescID
for the sliders.
-
返回
-
The internal ID of the morph.
◆
CopyFrom()
Copies morph data from
src
.
-
参数
-
[in]
|
src
|
The source morph.
|
[in]
|
trn
|
An alias translator for the operation. Can be
nullptr
. The caller owns the pointed alias translator.
|
[in]
|
flags
|
The flags:
CAMORPH_COPY_FLAGS
|
-
返回
-
true
if successful, otherwise
false
.
◆
Find()
Retrieves the morph node for the object specified by
bl
.
-
注意
-
A single morph can be applied to a hierarchy of objects, each has a representation in the morph as a
CAMorphNode
.
-
参数
-
[in]
|
tag
|
The morph tag containing the morph node.
|
[in]
|
bl
|
The object connected to the morph node.
|
-
返回
-
The morph node for the specified object. The tag owns the pointed morph node.
◆
GetNodeIndex()
Retrieves the index of the specified morph node. Each morph node can be accessed through their indices.
-
参数
-
[in]
|
node
|
The morph node to request the index.
|
-
返回
-
The morph node index.
◆
FindIndex()
Retrieves the index of the morph node for the object specified by
bl
.
-
注意
-
A single morph can be applied to a hierarchy of objects, each has a representation in the morph as a
CAMorphNode
.
-
参数
-
[in]
|
tag
|
The morph tag containing the morph node.
|
[in]
|
bl
|
The object connected to the morph node.
|
-
返回
-
The index of the morph node of the specified object.
◆
FindFromIndex()
Retrieves the morph node specified by
index
.
-
注意
-
A single morph can be applied to a hierarchy of objects, each has a representation in the morph as a
CAMorphNode
.
-
参数
-
[in]
|
tag
|
The morph tag containing the morph node.
|
[in]
|
index
|
The index of the requested morph node.
|
-
返回
-
The found morph node. The tag owns the pointed morph node.
◆
GetFirst()
Retrieves the first node of the morph.
-
返回
-
The first morph node. The tag owns the pointed morph node.
◆
SetMode()
Changes the morph's mode.
-
注意
-
This is not the mode a user would change but data inside the morph. It must be restored to the original mode once changes are finished.
To change the morph tag's modes or parameters use
C4DAtom::SetParameter()
.
范例:
Point data could be stored as rotational or correctional and in a delta form (only differences from the base).
This can not be edited in this form so the data mode must be changed to relative (
CAMORPH_MODE::REL
) or absolute (
CAMORPH_MODE::ABS
) before editing and then restored to (
CAMORPH_MODE::AUTO
) when finished.
The flags must be passed as
CAMORPH_MODE_FLAGS::EXPAND
to expand the data from the delta form and then returned with
CAMORPH_MODE_FLAGS::COLLAPSE
when finished.
For example VAMP uses the following line to expand all data types to relative data:
smorph->SetMode(doc, data.s_morphtag,
CAMORPH_MODE_FLAGS::ALL
|
CAMORPH_MODE_FLAGS::EXPAND
,
CAMORPH_MODE::REL
);
It then does some changes and finally restores all types to collapsed (delta) form and to the users mode (AUTO):
data.sources[i]->SetMode(doc, data.s_morphtag,
CAMORPH_MODE_FLAGS::ALL
|
CAMORPH_MODE_FLAGS::COLLAPSE
,
CAMORPH_MODE::AUTO
);
-
参数
-
[in]
|
doc
|
The document containing the morph tag.
|
[in]
|
tag
|
The morph tag containing the morph data.
|
[in]
|
flags
|
The flags:
CAMORPH_MODE_FLAGS
|
[in]
|
mode
|
The mode:
CAMORPH_MODE
|
-
返回
-
true
if successful, otherwise
false
.
◆
Store()
Stores the current object's state into the morph.
The corresponding
flags
have to be set for the data. This should normally be
CAMORPH_DATA_FLAGS::ASTAG
if it is to be used by the user.
-
参数
-
[in]
|
doc
|
The document containing the morph tag.
|
[in]
|
tag
|
The morph tag containing the morph data.
|
[in]
|
flags
|
The flags:
CAMORPH_DATA_FLAGS
|
-
返回
-
true
if successful, otherwise
false
.
◆
Apply()
Applies the morph to the object. The data to be applied is set with the
flags
.
-
参数
-
[in]
|
doc
|
The document containing the morph tag.
|
[in]
|
tag
|
The morph tag containing the morph data.
|
[in]
|
flags
|
The flags:
CAMORPH_DATA_FLAGS
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetTarget()
Retrieves the target of the morph.
-
参数
-
[in]
|
doc
|
The document containing the morph tag.
|
-
返回
-
The target of the morph. The tag owns the pointed object.
◆
SetTarget()
Sets the target of the morph.
-
参数
-
[in]
|
tag
|
The morph tag containing the morph node.
|
[in]
|
doc
|
The document containing the morph tag.
|
[in]
|
bl
|
The new target of the morph.
|
◆
SetStrength()
void SetStrength
|
(
|
Float
|
strength
|
)
|
|
Sets the strength of the morph.
-
参数
-
[in]
|
strength
|
The new strength of the morph.
|
◆
GetStrength()
Retrieves the strength of the morph.
-
返回
-
The strength of the morph.
◆
IsPostDeform()
Retrieves if the morph is applied at PostDeform.
-
返回
-
Morph is post-deform mode.
@ AUTO
Auto mode. Used to collapse the data automatically into their correct mode.
@ REL
Relative morph data.
@ ALL
Expand or collapse all data.
@ EXPAND
Expand data. Needs to be passed before accessing any data.
@ COLLAPSE
Collapse data. Needs to be passed to collapse the expanded data, for instance after data access.