About
A morph can use the mixing mode "Correctional PSD" (Pose Space Deformation). A CAReferencePSD object allows accessing the related data. The class is defined in the lib_ca.h
header file.
Access
The CAReferencePSD object is obtained from the CAMorphNode object, see CAMorphNode Points .
{
if (psd)
{
for (
Int32 controllerIndex = 0; controllerIndex < controllerCount; ++controllerIndex)
{
if (controller == nullptr )
}
}
}
Interpolation
For auto-weighting an interpolation mode is used:
The modes are:
Driver
The joints referenced in the used weight tag can be forced to work as drivers for the PSD.
if (wTag)
{
CAWeightTag *
const weightTag = static_cast<CAWeightTag*>(wTag);
for (
Int32 jointIndex = 0; jointIndex < jointCount; ++jointIndex)
{
}
}
Pose
The PSD is based on a skeleton reference pose.
Controllers
Non-joint objects can also be used as controllers.
if (psd)
{
if (objects)
{
for (
Int32 i = 0; i < objectCount; ++i)
{
BaseObject *
const baseObject = static_cast<BaseObject*>(atom);
{
}
}
}
}
Further Reading
BaseObject * GetExternalController(Int32 controllerIndex)
C4DAtomGoal * GetLinkAtom(const BaseDocument *doc, Int32 instanceof=0) const
Definition: c4d_baseobject.h:220
CAMORPH_PSDINTERPOLATION_MODE GetInterpolationMode() const
#define Tweights
Weights.
Definition: ge_prepass.h:1269
Auto mode. Used to collapse the data automatically into their correct mode.
Matrix GetMg() const
Definition: c4d_baseobject.h:478
Per joint interpolation (joint axis average).
Int32 GetCount() const
Definition: c4d_baselist.h:1575
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:66
Bool SetMode(BaseDocument *doc, CAPoseMorphTag *tag, CAMORPH_MODE_FLAGS flags, CAMORPH_MODE mode)
Bool ForceJointAsDriver(Int32 jointIndex, Bool forceDriver)
void RestoreReferencePose()
Displays skeleton and user defined controller at the reference pose.
void GetActiveObjects(AtomArray &selection, GETACTIVEOBJECTFLAGS flags) const
CAMORPH_DATA_FLAGS GetInfo()
Definition: c4d_gedata.h:77
Definition: c4d_baselist.h:1287
maxon::Int32 Int32
Definition: ge_sys_math.h:45
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:209
Expand or collapse all data.
Int32 SetExternalControllerMatrix(BaseObject *controller, const Matrix &globalMatrix)
Int32 GetExternalControllerCount() const
CAReferencePSD * GetPSDReference()
Definition: ge_autoptr.h:32
Bool IsInstanceOf(Int32 id) const
Definition: c4d_baselist.h:1329
String GetName() const
Definition: c4d_baselist.h:2259
CAMORPH_MODE_FLAGS
Definition: lib_ca.h:842
Definition: tcaposemorph.h:54
CAMORPH_PSDINTERPOLATION_MODE
Definition: lib_ca.h:900
void SetInterpolationMode(CAMORPH_PSDINTERPOLATION_MODE interpMode)
Bool GetParameter(const DescID &id, GeData &t_data, DESCFLAGS_GET flags)
Expand data. Needs to be passed before accessing any data.
Collapse data. Needs to be passed to collapse the expanded data, for instance after data access.
#define Ojoint
Joint.
Definition: ge_prepass.h:1023
C4DAtom * GetIndex(Int32 idx) const
Definition: c4d_baselist.h:1590