c4d.modules.character.CAReferencePSD¶
-
class
c4d.modules.character.
CAReferencePSD
¶ - Allows to access the PSD referential data and functions.Only used with a point pose in PSD Mode.
New in version R19.
Methods Signatures
Sets the auto weighting interpolation mode. |
|
Returns the auto weighting interpolation mode. |
|
Forces the joint index to be a driver. |
|
Checks if the joint index is a user forced driver. |
|
Removes all user defined joint as driver and let the system manage it automatically. |
|
Displays skeleton and user defined controller at the reference pose. |
|
Updates the current skeleton state as the PSD reference pose. |
|
Removes all external controllers assigned to the reference pose. |
|
Return the number of external controllers associated with the reference pose. |
|
Returns the controller assigned to the given index. |
|
|
Returns the matrix stored at the given index. |
|
Adds or adjusts the given controller global matrix to be part of the reference pose. |
|
Removes the external controller at the given index. |
Methods Documentation
-
CAReferencePSD.
SetInterpolationMode
(self, interpMode)¶ Sets the auto weighting interpolation mode.
- Parameters
interpMode (int) –
The interpolation mode to set:
CAMORPH_PSDINTERPOLATION_MODE_AXIS
Per joint axis.
CAMORPH_PSDINTERPOLATION_MODE_JOINT
Per joint interpolation (joint axis average).
CAMORPH_PSDINTERPOLATION_MODE_GLOBAL
Use one global value (joint average).
CAMORPH_PSDINTERPOLATION_MODE_DEFAULT
Default.
-
CAReferencePSD.
GetInterpolationMode
(self)¶ Returns the auto weighting interpolation mode.
- Return type
int
- Returns
The interpolation mode:
CAMORPH_PSDINTERPOLATION_MODE_AXIS
Per joint axis.
CAMORPH_PSDINTERPOLATION_MODE_JOINT
Per joint interpolation (joint axis average).
CAMORPH_PSDINTERPOLATION_MODE_GLOBAL
Use one global value (joint average).
CAMORPH_PSDINTERPOLATION_MODE_DEFAULT
Default.
-
CAReferencePSD.
ForceJointAsDriver
(self, jointIndex, forceDriver)¶ Forces the joint index to be a driver.
Note
If any of the joints is marked as a forced driver, only those are considered in automatic weighting.
- Parameters
jointIndex (int) – The weight tag joint index to use as driver.
forceDriver (bool) – True if the joint is used as a driver, otherwise False.
-
CAReferencePSD.
IsJointForcedAsDriver
(self, jointIndex)¶ Checks if the joint index is a user forced driver.
Note
If any of the joints is marked as a forced driver, only those are considered in automatic weighting.
- Parameters
jointIndex (int) – The weight tag joint index to use as driver.
- Return type
bool
- Returns
True if the joint is forced as a driver, otherwise False.
-
CAReferencePSD.
ClearAllForcedDrivers
(self)¶ Removes all user defined joint as driver and let the system manage it automatically.
-
CAReferencePSD.
RestoreReferencePose
(self)¶ Displays skeleton and user defined controller at the reference pose.
-
CAReferencePSD.
UpdateReferencePose
(self)¶ Updates the current skeleton state as the PSD reference pose.
-
CAReferencePSD.
ClearAllExternalControllers
(self)¶ Removes all external controllers assigned to the reference pose.
-
CAReferencePSD.
GetExternalControllerCount
(self)¶ Return the number of external controllers associated with the reference pose.
- Return type
int
- Returns
The external controller count.
-
CAReferencePSD.
GetExternalController
(self, controllerIndex)¶ Returns the controller assigned to the given index.
- Parameters
controllerIndex (int) – The controller index: 0 <= controllerIndex <
GetExternalControllerCount()
.- Return type
- Returns
The external controller, or None if the function failed.
-
CAReferencePSD.
GetExternalControllerMatrix
(self, controllerIndex)¶ Returns the matrix stored at the given index.
- Parameters
controllerIndex (int) – The controller index: 0 <= controllerIndex <
GetExternalControllerCount()
.- Return type
- Returns
The external controller global matrix, or a default
c4d.Matrix()
if the function failed.
-
CAReferencePSD.
SetExternalControllerMatrix
(self, controllerIndex, globalMatrix)¶ Adds or adjusts the given controller global matrix to be part of the reference pose.
- Parameters
controllerIndex (int) – The controller index: 0 <= controllerIndex <
GetExternalControllerCount()
.globalMatrix (c4d.Matrix) – The global matrix used as a reference.
- Return type
int
- Returns
The index of the controller, NOTOK/-1 if invalid.
-
CAReferencePSD.
RemoveExternalController
(self, controllerIndex)¶ Removes the external controller at the given index.
- Parameters
controllerIndex (int) – The controller index: 0 <= controllerIndex <
GetExternalControllerCount()
.- Return type
bool
- Returns
True if successful, otherwise False.