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

CAReferencePSD.SetInterpolationMode(self, interpMode)

Sets the auto weighting interpolation mode.

CAReferencePSD.GetInterpolationMode(self)

Returns the auto weighting interpolation mode.

CAReferencePSD.ForceJointAsDriver(self, jointIndex, ...)

Forces the joint index to be a driver.

CAReferencePSD.IsJointForcedAsDriver(self, jointIndex)

Checks if the joint index is a user forced driver.

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.

CAReferencePSD.GetExternalController(self, controllerIndex)

Returns the controller assigned to the given index.

CAReferencePSD.GetExternalControllerMatrix(self, controllerIndex)

Returns the matrix stored at the given index.

CAReferencePSD.SetExternalControllerMatrix(self, controllerIndex, ...)

Adds or adjusts the given controller global matrix to be part of the reference pose.

CAReferencePSD.RemoveExternalController(self, controllerIndex)

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

Optional[c4d.BaseObject]

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

c4d.Matrix

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
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.