Methods Signatures
Get the name of the morph. |
|
Set the name of the morph. |
|
Get the ID of the morph. |
|
Get the ID of the morph. |
|
Get the first morph node. |
|
Retrieves the index of the morph node for the object specified by bl. |
|
Set the mode. |
|
Store the morph. |
|
Apply the morph. |
Methods Documentation
-
CAMorph.
GetName
(self)¶ Get the name of the morph.
- Return type
str
- Returns
The name.
-
CAMorph.
SetName
(self, name)¶ Set the name of the morph.
- Parameters
name (str) – The name.
-
CAMorph.
GetID
(self)¶ Get the ID of the morph.
- Return type
int
- Returns
The ID.
-
CAMorph.
CopyFrom
(self, src, trn, flags)¶ Get the ID of the morph.
- Parameters
src (c4d.modules.character.CAMorph) – The source morph.
trn (any) – Set to None, currently not used.
flags (int) –
The flags:
CAMORPH_COPY_FLAGS_NONE
None.
- Return type
bool
- Returns
True on success, otherwise False.
-
CAMorph.
GetFirst
(self)¶ Get the first morph node.
- Return type
- Returns
The first morph node.
-
CAMorph.
FindIndex
(self, tag, bl)¶ Retrieves the index of the morph node for the object specified by bl.
Note
A single morph can be applied to a hierarchy of objects, each has a representation in the morph as a
CAMorphNode
.- Parameters
tag (c4d.modules.character.CAPoseMorphTag) – The morph tag containing the morph node.
bl (c4d.BaseList2D) – The object connected to the morph node.
- Returns
The index of the morph node of the specified object.
- Return type
int
-
CAMorph.
SetMode
(self, doc, tag, flags, mode)¶ Set the mode.
Note
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().Example: 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 (c4d.CAMORPH_MODE_REL) or absolute (c4d.CAMORPH_MODE_ABS) before editing and then restored to (c4d.CAMORPH_MODE_AUTO) when finished.The flags must be passed as c4d.CAMORPH_MODE_FLAGS_EXPAND to expand the data from the delta form and then returned with c4d.CAMORPH_MODE_FLAGS_COLLAPSE when finished.For example VAMP uses the following line to expand all data types to relative datasmorph.SetMode(doc, s_morphtag, c4d.CAMORPH_MODE_FLAGS_ALL | c4d.CAMORPH_MODE_FLAGS_EXPAND, c4d.CAMORPH_MODE_REL)
It then does some changes and finally restores all types to collapsed (delta) form and to the users mode (AUTO):
smorph.SetMode(doc, s_morphtag, c4d.CAMORPH_MODE_FLAGS_ALL | c4d.CAMORPH_MODE_FLAGS_COLLAPSE, c4d.CAMORPH_MODE_AUTO)
- Parameters
doc (c4d.documents.BaseDocument) – The document.
tag (c4d.modules.character.CAPoseMorphTag) – The morph tag.
flags (int) –
The value:
CAMORPH_MODE_FLAGS_COLLAPSE
Collapse.
CAMORPH_MODE_FLAGS_EXPAND
Expand.
CAMORPH_MODE_FLAGS_ALL
All.
mode (int) –
The mode:
CAMORPH_MODE_ABS
Abs.
CAMORPH_MODE_REL
Rel.
CAMORPH_MODE_ROT
Rot.
CAMORPH_MODE_CORRECTIONAL
Correctional.
CAMORPH_MODE_CORRECTIONAL_AREA
Area.
CAMORPH_MODE_PSD
PSD.
CAMORPH_MODE_AUTO
Auto.
CAMORPH_MODE_NONE
No flags.
- Return type
int
- Returns
True on success, otherwise False.
-
CAMorph.
Store
(self, doc, tag, flags)¶ Store the morph.
- Parameters
doc (c4d.documents.BaseDocument) – The document.
tag (c4d.modules.character.CAPoseMorphTag) – The morph tag.
flags (int) –
The flags:
CAMORPH_DATA_FLAGS_P
Position morphing.
CAMORPH_DATA_FLAGS_S
Scale morphing.
CAMORPH_DATA_FLAGS_R
HPB rotation morphing.
CAMORPH_DATA_FLAGS_POINTS
Points morphing.
CAMORPH_DATA_FLAGS_TANGENTS
Tangents morphing.
CAMORPH_DATA_FLAGS_VERTEXMAP
Vertex map morphing.
CAMORPH_DATA_FLAGS_WEIGHTMAPS
Joint weights morphing.
CAMORPH_DATA_FLAGS_PARAMS
Parameter morphing.
CAMORPH_DATA_FLAGS_USERDATA
User data morphing.
CAMORPH_DATA_FLAGS_UV
UV coordinate morphing.
CAMORPH_DATA_FLAGS_ASTAG
Set to store the current state of an object into the morph. Stores the morph data as set by the user in the morph tag, otherwise it would mess up the internal data.
CAMORPH_DATA_FLAGS_ALL
All data morphing.
CAMORPH_DATA_FLAGS_NONE
None.
-
CAMorph.
Apply
(self, doc, tag, flags)¶ Apply the morph.
- Parameters
doc (c4d.documents.BaseDocument) – The document.
tag (c4d.modules.character.CAPoseMorphTag) – The morph tag.
flags (int) –
The flags:
CAMORPH_DATA_FLAGS_P
Position morphing.
CAMORPH_DATA_FLAGS_S
Scale morphing.
CAMORPH_DATA_FLAGS_R
HPB rotation morphing.
CAMORPH_DATA_FLAGS_POINTS
Points morphing.
CAMORPH_DATA_FLAGS_TANGENTS
Tangents morphing.
CAMORPH_DATA_FLAGS_VERTEXMAP
Vertex map morphing.
CAMORPH_DATA_FLAGS_WEIGHTMAPS
Joint weights morphing.
CAMORPH_DATA_FLAGS_PARAMS
Parameter morphing.
CAMORPH_DATA_FLAGS_USERDATA
User data morphing.
CAMORPH_DATA_FLAGS_UV
UV coordinate morphing.
CAMORPH_DATA_FLAGS_ASTAG
Set to store the current state of an object into the morph. Stores the morph data as set by the user in the morph tag, otherwise it would mess up the internal data.
CAMORPH_DATA_FLAGS_ALL
All data morphing.
CAMORPH_DATA_FLAGS_NONE
None.