c4d.modules.character.CAMorphNode¶
-
class
c4d.modules.character.CAMorphNode¶
Overview¶
Hierarchy Navigation |
|
Retrieves the first child of the morph node. |
|
Retrieves the next morph node. |
|
Retrieves the previous morph node. |
|
Retrieves the parent morph node. |
|
Metadata And References |
|
Returns the information on what morph data is stored in the morph node. |
|
Retrieves the object linked to the morph node. |
|
Retrieves the PSD data for a point pose holding the reference pose and providing multiple functions dedicated to PSD behavior. |
|
Parameter Data |
|
Returns a parameter. |
|
Retrieves the parameter count. |
|
Sets a parameter. |
|
Sets the parameter count. |
|
Point Data |
|
Retrieves a point of the morph node. |
|
Returns the point count. |
|
Sets a point of the morph node. |
|
Sets the point count. |
|
Tangent Data |
|
Retrieves a tangent of the morph node. |
|
Returns the tangent count. |
|
Sets the tangent at index. |
|
Sets the tangent count. |
|
Transform Data |
|
Returns the position of the morph node. |
|
Returns the rotation of the morph node. |
|
Returns the scale of the morph node. |
|
UV Data |
|
Retrieves the UV coordinate index of the tindex UV tag. |
|
Retrieves the UV coordinates count of the UV tag at tindex. |
|
Retrieves the UV tag count. |
|
Sets the UV coordinate index of the tindex UV tag. |
|
Sets the UV coordinates count of the UV tag at tindex. |
|
Vertex Map Data |
|
Retrieves the vertex map value at index of the tindex vertex map. |
|
Retrieves the size of the vertex map at tindex. |
|
Retrieves the number of vertex map tags of the morph node. |
|
Sets the vertex map value at index of the tindex vertex map. |
|
Sets the size of the vertex map at tindex. |
|
Weight Map Data |
|
Retrieves the weight at index of jindex joint and tindex weight tag. |
|
Retrieves the weights count of the joint at jindex of tindex weight tag. |
|
Retrieves the joint count of the weight tag at tindex. |
|
Retrieves the number of weight map tags. |
|
Sets the weight at index of jindex joint and tindex weight tag. |
|
Sets the weights count of the joint at jindex of tindex weight tag. |
|
Members¶
Metadata And References¶
-
CAMorphNode.GetInfo(self)¶ Returns the information on what morph data is stored in the morph node.
- Return type
int
- Returns
The data 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.
-
CAMorphNode.GetLink(self, tag, morph, doc)¶ Retrieves the object linked to the morph node.
New in version R18.057.
- Parameters
tag (c4d.modules.character.CAPoseMorphTag) – The morph tag containing the morph data.
morph (c4d.modules.character.CAMorph) – The morph containing the morph node.
doc (c4d.documents.BaseDocument) – The document containing the linked object.
- Return type
Optional[c4d.BaseList2D]
- Returns
The linked object if there is one, or None.
-
CAMorphNode.GetPSDReference(self)¶ Retrieves the PSD data for a point pose holding the reference pose and providing multiple functions dedicated to PSD behavior.
New in version R19.
See also
CAMorph.SetMode()to retrieve all data.- Return type
- Returns
The PSD referential for the morph node.
Parameter Data¶
-
CAMorphNode.GetParam(self, index)¶ Returns a parameter.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
index (int) – The parameter index.
- Raises
IndexError – If index is out of range : 0<=index<
GetParamCount().- Return type
dict{data: any, id:
DescID}- Returns
The parameter.
-
CAMorphNode.GetParamCount(self)¶ Retrieves the parameter count.
See also
CAMorph.SetMode()to retrieve all data.- Return type
int
- Returns
The parameter count.
-
CAMorphNode.SetParam(self, index, data, id)¶ Sets a parameter.
- Parameters
index (int) – The parameter index.
data (any) – The data to be set.
id (c4d.DescID) – The id.
- Raises
IndexError – If index is out of range : 0<=index<
GetParamCount().
-
CAMorphNode.SetParamCount(self, cnt)¶ Sets the parameter count.
- Parameters
cnt (int) – The parameter count to be set.
Point Data¶
-
CAMorphNode.GetPoint(self, index)¶ Retrieves a point of the morph node.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
index (int) – The index of the point to get.
- Raises
IndexError – If index is out of range : 0<=index<
GetPointCount().- Return type
- Returns
The point at index.
-
CAMorphNode.GetPointCount(self)¶ Returns the point count.
See also
CAMorph.SetMode()to retrieve all data.- Return type
int
- Returns
The point count.
-
CAMorphNode.SetPoint(self, index, pnt)¶ Sets a point of the morph node.
- Parameters
index (int) – The index of the point.
pnt (c4d.Vector) – The point to be set.
- Raises
IndexError – If index is out of range : 0<=index<
GetPointCount().
-
CAMorphNode.SetPointCount(self, cnt)¶ Sets the point count.
- Parameters
cnt (int) – The point count to be set.
- Return type
bool
- Returns
True if successful, otherwise False.
Tangent Data¶
-
CAMorphNode.GetTangent(self, index)¶ Retrieves a tangent of the morph node.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
index (int) – The index of the tangent to get.
- Raises
IndexError – If index is out of range : 0<=index<
GetTangentCount().- Return type
- Returns
The tangent.
-
CAMorphNode.GetTangentCount(self)¶ Returns the tangent count.
See also
CAMorph.SetMode()to retrieve all data.- Return type
int
- Returns
The tangent count.
-
CAMorphNode.SetTangent(self, index, v)¶ Sets the tangent at index.
- Parameters
index (int) – The tangent index.
v (c4d.Vector) – The tangent to be set.
- Raises
IndexError – If index is out of range : 0<=index<
GetTangentCount().
-
CAMorphNode.SetTangentCount(self, cnt)¶ Sets the tangent count.
- Parameters
cnt (int) – The tangent count to be set.
- Return type
bool
- Returns
True if successful, otherwise False.
Transform Data¶
-
CAMorphNode.GetP(self)¶ Returns the position of the morph node.
- Return type
- Returns
The position.
-
CAMorphNode.GetR(self)¶ Returns the rotation of the morph node.
- Return type
- Returns
The rotation.
-
CAMorphNode.GetS(self)¶ Returns the scale of the morph node.
- Return type
- Returns
The scale.
UV Data¶
-
CAMorphNode.GetUV(self, tindex, index)¶ Retrieves the UV coordinate index of the tindex UV tag.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
tindex (int) – The UV tag index.
index (int) – The UV coordinates index.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetUVTagCount().IndexError – If index is out of range : 0<=index<
GetUVCount().
- Return type
Tuple[c4d.Vector, c4d.Vector, c4d.Vector, c4d.Vector`]
- Returns
The UV structure.
-
CAMorphNode.GetUVCount(self, tindex)¶ Retrieves the UV coordinates count of the UV tag at tindex.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
tindex (int) – The UV tag index.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetUVTagCount().- Return type
int
- Returns
The UV coordinates count.
-
CAMorphNode.GetUVTagCount(self)¶ Retrieves the UV tag count.
See also
CAMorph.SetMode()to retrieve all data.- Return type
int
- Returns
The UV tag count.
-
CAMorphNode.SetUV(self, tindex, index, a, b, c, d)¶ Sets the UV coordinate index of the tindex UV tag.
- Parameters
tindex (int) – The UV tag index.
index (int) – The UV coordinates index.
a (c4d.Vector) – The UVW coordinate for the first point.
b (c4d.Vector) – The UVW coordinate for the second point.
c (c4d.Vector) – The UVW coordinate for the third point.
d (c4d.Vector) – The UVW coordinate for the fourth point.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetUVTagCount().IndexError – If index is out of range : 0<=index<
GetUVCount().
-
CAMorphNode.SetUVCount(self, tindex, cnt)¶ Sets the UV coordinates count of the UV tag at tindex.
- Parameters
tindex (int) – The UV tag index.
cnt (int) – The new UV coordinates count.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetUVTagCount().- Return type
bool
- Returns
True if successful, otherwise False.
Vertex Map Data¶
-
CAMorphNode.GetVertexMap(self, tindex, index)¶ Retrieves the vertex map value at index of the tindex vertex map.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
tindex (int) – The vertex map tag index.
index (int) – The vertex map index.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetVertexMapTagCount().IndexError – If index is out of range : 0<=index<
GetVertexMapCount().
- Return type
float
- Returns
The vertex map value.
-
CAMorphNode.GetVertexMapCount(self, tindex)¶ Retrieves the size of the vertex map at tindex.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
tindex (int) – The vertex map tag index.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetVertexMapTagCount().- Return type
int
- Returns
The vertex map count.
-
CAMorphNode.GetVertexMapTagCount(self)¶ Retrieves the number of vertex map tags of the morph node.
See also
CAMorph.SetMode()to retrieve all data.- Return type
int
- Returns
The vertex map tag count.
-
CAMorphNode.SetVertexMap(self, tindex, index, v)¶ Sets the vertex map value at index of the tindex vertex map.
- Parameters
tindex (int) – The vertex map tag index.
index (int) – The vertex map index.
v (float) – The vertex map value to be set.
- Raises
IndexError – If tindex is out of range : 0<=index<
GetVertexMapTagCount().IndexError – If index is out of range : 0<=index<
GetVertexMapCount().
-
CAMorphNode.SetVertexMapTagCount(self, tindex, cnt)¶ Sets the size of the vertex map at tindex.
- Parameters
tindex (int) – The vertex map tag index.
cnt (int) – The count.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetVertexMapTagCount().- Return type
bool
- Returns
True if successful, otherwise False.
Weight Map Data¶
-
CAMorphNode.GetWeightMap(self, tindex, jindex, index)¶ Retrieves the weight at index of jindex joint and tindex weight tag.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
tindex (int.) – The weight tag index.
jindex (int) – The joint index.
index (int) – The weight index.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetWeightMapTagCount().IndexError – If jindex is out of range : 0<=jindex<
GetWeightMapJointCount().IndexError – If index is out of range : 0<=index<
GetWeightMapCount().
- Return type
float
- Returns
The weight value.
-
CAMorphNode.GetWeightMapCount(self, tindex, jindex)¶ Retrieves the weights count of the joint at jindex of tindex weight tag.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
tindex (int.) – The weight tag index.
jindex (int) – The joint index.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetWeightMapTagCount().IndexError – If jindex is out of range : 0<=jindex<
GetWeightMapJointCount().
- Return type
int
- Returns
The weight count of the specified joint.
-
CAMorphNode.GetWeightMapJointCount(self, tindex)¶ Retrieves the joint count of the weight tag at tindex.
See also
CAMorph.SetMode()to retrieve all data.- Parameters
tindex (int.) – The weight tag index.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetWeightMapTagCount().- Return type
int
- Returns
The weight map joint count.
-
CAMorphNode.GetWeightMapTagCount(self)¶ Retrieves the number of weight map tags.
See also
CAMorph.SetMode()to retrieve all data.- Return type
int
- Returns
The weight map tag count.
-
CAMorphNode.SetWeightMap(self, tindex, jindex, index, v)¶ Sets the weight at index of jindex joint and tindex weight tag.
- Parameters
tindex (int.) – The weight tag index.
jindex (int) – The joint index.
index (int) – The weight index.
v (float) – The new weight value.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetWeightMapTagCount().IndexError – If jindex is out of range : 0<=jindex<
GetWeightMapJointCount().IndexError – If index is out of range : 0<=index<
GetWeightMapCount().
-
CAMorphNode.SetWeightMapCount(self, tindex, jindex, cnt)¶ Sets the weights count of the joint at jindex of tindex weight tag.
- Parameters
tindex (int.) – The weight tag index.
jindex (int) – The joint index.
cnt (int) – The new weight count.
- Raises
IndexError – If tindex is out of range : 0<=tindex<
GetWeightMapTagCount().IndexError – If jindex is out of range : 0<=jindex<
GetWeightMapJointCount().
- Return type
bool
- Returns
True if successful, otherwise False.