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.

Overview

Driver Overrides

CAReferencePSD.ClearAllForcedDrivers()

Removes all user defined joint as driver and let the system manage it automatically.

CAReferencePSD.ForceJointAsDriver()

Forces the joint index to be a driver.

CAReferencePSD.IsJointForcedAsDriver()

Checks if the joint index is a user forced driver.

External Controllers

CAReferencePSD.ClearAllExternalControllers()

Removes all external controllers assigned to the reference pose.

CAReferencePSD.GetExternalController()

Returns the controller assigned to the given index.

CAReferencePSD.GetExternalControllerCount()

Return the number of external controllers associated with the reference pose.

CAReferencePSD.GetExternalControllerMatrix()

Returns the matrix stored at the given index.

CAReferencePSD.RemoveExternalController()

Removes the external controller at the given index.

CAReferencePSD.SetExternalControllerMatrix()

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

Interpolation Mode

CAReferencePSD.GetInterpolationMode()

Returns the auto weighting interpolation mode.

CAReferencePSD.SetInterpolationMode()

Sets the auto weighting interpolation mode.

Reference Pose

CAReferencePSD.RestoreReferencePose()

Displays skeleton and user defined controller at the reference pose.

CAReferencePSD.UpdateReferencePose()

Updates the current skeleton state as the PSD reference pose.

Members

Driver Overrides

CAReferencePSD.ClearAllForcedDrivers(self)

Removes all user defined joint as driver and let the system manage it automatically.

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.

External Controllers

CAReferencePSD.ClearAllExternalControllers(self)

Removes all external controllers assigned to the reference pose.

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.GetExternalControllerCount(self)

Return the number of external controllers associated with the reference pose.

Return type

int

Returns

The external controller count.

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

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.

Interpolation Mode

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

Reference Pose

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.