AL_USDMaya
0.29.4
USD to Maya Bridge
|
This class provides a transformation matrix that allows you to apply tweaks over some read only transformation information extracted from a UsdPrim. Currently each tweak is a simple offset over the values contained within the UsdPrim. More...
#include <TransformationMatrix.h>
Public Member Functions | |
void | setMObject (const MObject object) |
sets the MObject for the transform More... | |
bool | isTranslateLocked () |
checks to see whether the transform attribute is locked More... | |
bool | isRotateLocked () |
checks to see whether the rotate attribute is locked More... | |
bool | isScaleLocked () |
checks to see whether the scale attribute is locked More... | |
TransformationMatrix () | |
ctor | |
TransformationMatrix (const UsdPrim &prim) | |
ctor More... | |
void | setPrim (const UsdPrim &prim, Transform *transformNode) |
set the prim that this transformation matrix will read/write to. More... | |
void | enablePushToPrim (bool enabled) |
If set to true, modifications to these transform attributes will be pushed back onto the original prim. More... | |
void | enableReadAnimatedValues (bool enabled) |
If set to true, transform values will target the animated key-frame values in the prim. If set to false, the transform values will target the default attribute values. More... | |
UsdTimeCode | getTimeCode () |
Returns the timecode to use when pushing the transform values to the USD prim. If readFromTimeline flag is set to true, then the timecode will be read from the incoming time attribute on the transform node. If readFromTimeline is false, then the timecode will be the magic 'modify default values' timecode, and animation data will not be affected (only the default values found in the USD prim) More... | |
void | setLocalTranslationOffset (const MVector &localTranslateOffset) |
Applies a local space translation offset to the computed matrix. Useful for positioning objects on a table. More... | |
const UsdPrim & | prim () const |
return the prim this transform matrix is attached to More... | |
Query flags | |
bool | hasAnimation () const |
does the prim have animated scale? | |
bool | hasAnimatedScale () const |
does the prim have animated scale? | |
bool | hasAnimatedShear () const |
does the prim have animated shear? | |
bool | hasAnimatedTranslation () const |
does the prim have animated translation? | |
bool | hasAnimatedRotation () const |
does the prim have animated rotation? | |
bool | hasAnimatedMatrix () const |
does the prim have an animated matrix only? | |
bool | primHasScale () const |
does the UsdGeomXform have a scale transform op? | |
bool | primHasRotation () const |
does the UsdGeomXform have a rotation transform op? | |
bool | primHasTranslation () const |
does the UsdGeomXform have a translation transform op? | |
bool | primHasShear () const |
does the UsdGeomXform have a shear transform op? | |
bool | primHasScalePivot () const |
does the UsdGeomXform have a scale pivot op? | |
bool | primHasScalePivotTranslate () const |
does the UsdGeomXform have a scale pivot translate op? | |
bool | primHasRotatePivot () const |
does the UsdGeomXform have a rotate pivot op? | |
bool | primHasRotatePivotTranslate () const |
does the UsdGeomXform have a rotate pivot translate op? | |
bool | primHasRotateAxes () const |
does the UsdGeomXform have a rotation axes op? | |
bool | primHasPivot () const |
does the UsdGeomXform have a pixar pivot op? | |
bool | primHasTransform () const |
does the UsdGeomXform have a transform matrix op? | |
bool | readAnimatedValues () const |
should we read the animated keyframes or the defaults? | |
bool | pushToPrimEnabled () const |
Is this transform set to write back onto the USD prim. | |
bool | pushPrimToMatrix () const |
Is this prim writing back to a matrix (true) or to components (false) | |
bool | pushToPrimAvailable () const |
Is this transform set to write back onto the USD prim, and is it currently possible? | |
Static Public Member Functions | |
static bool | readVector (MVector &result, const UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::EarliestTime()) |
helper method. Reads a vector from the transform op specified at the requested timecode More... | |
static bool | readShear (MVector &result, const UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::EarliestTime()) |
helper method. Reads a shear value from the transform op specified at the requested timecode More... | |
static bool | readPoint (MPoint &result, const UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::EarliestTime()) |
helper method. Reads a point from the transform op specified at the requested timecode More... | |
static bool | readRotation (MEulerRotation &result, const UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::EarliestTime()) |
helper method. Reads an euler rotation from the transform op specified at the requested timecode More... | |
static double | readDouble (const UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::EarliestTime()) |
helper method. Reads a double from the transform op specified at the requested timecode (typically RotateX / rotateY values) More... | |
static bool | readMatrix (MMatrix &result, const UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::EarliestTime()) |
helper method. Reads a matrix from the transform op specified at the requested timecode More... | |
static bool | pushVector (const MVector &input, UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::Default()) |
helper method. Pushes a vector into the transform op specified at the requested timecode More... | |
static bool | pushPoint (const MPoint &input, UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::Default()) |
helper method. Pushes a point into the transform op specified at the requested timecode More... | |
static bool | pushRotation (const MEulerRotation &input, UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::Default()) |
helper method. Pushes a vector into the transform op specified at the requested timecode More... | |
static void | pushDouble (const double input, UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::Default()) |
helper method. Pushes a double into the transform op specified at the requested timecode (typically for RotateX / RotateY) More... | |
static bool | pushShear (const MVector &input, UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::Default()) |
helper method. Pushes a shear into the transform op specified at the requested timecode More... | |
static bool | pushMatrix (const MMatrix &input, UsdGeomXformOp &op, UsdTimeCode timeCode=UsdTimeCode::Default()) |
helper method. Pushes a matrix into the transform op specified at the requested timecode More... | |
static AL_USDMAYA_PUBLIC MPxTransformationMatrix * | creator () |
create an instance of this transformation matrix More... | |
Static Public Attributes | |
static AL_USDMAYA_PUBLIC const MTypeId | kTypeId |
the type ID of the transformation matrix | |
Convert To-From USD primitive | |
void | initialiseToPrim (bool readFromPrim=true, Transform *node=0) |
this method inspects the UsdGeomXform to find out:
| |
void | updateToTime (const UsdTimeCode &time) |
this method updates the internal transformation components to the given time. Only the Transform node should need to call this method More... | |
void | pushToPrim () |
pushes any modifications on the matrix back onto the UsdPrim | |
This class provides a transformation matrix that allows you to apply tweaks over some read only transformation information extracted from a UsdPrim. Currently each tweak is a simple offset over the values contained within the UsdPrim.
AL::usdmaya::nodes::TransformationMatrix::TransformationMatrix | ( | const UsdPrim & | prim | ) |
ctor
prim | the USD prim that this matrix should represent |
|
static |
create an instance of this transformation matrix
void AL::usdmaya::nodes::TransformationMatrix::enablePushToPrim | ( | bool | enabled | ) |
If set to true, modifications to these transform attributes will be pushed back onto the original prim.
enabled | true will cause changes to this transform update the values on the USD prim. False will mean that the changes are simply cached internally. |
enabled | true to write values to the usd prim when changed, false to treat the usd prim as read only. |
void AL::usdmaya::nodes::TransformationMatrix::enableReadAnimatedValues | ( | bool | enabled | ) |
If set to true, transform values will target the animated key-frame values in the prim. If set to false, the transform values will target the default attribute values.
enabled | true to target animated values, false to target the default. |
|
inline |
Returns the timecode to use when pushing the transform values to the USD prim. If readFromTimeline flag is set to true, then the timecode will be read from the incoming time attribute on the transform node. If readFromTimeline is false, then the timecode will be the magic 'modify default values' timecode, and animation data will not be affected (only the default values found in the USD prim)
void AL::usdmaya::nodes::TransformationMatrix::initialiseToPrim | ( | bool | readFromPrim = true , |
Transform * | node = 0 |
||
) |
this method inspects the UsdGeomXform to find out:
readFromPrim | if true, the maya attribute values will be updated from those found on the USD prim |
node | the transform node to which this matrix belongs (and where the USD prim will be extracted from) |
|
inline |
checks to see whether the rotate attribute is locked
|
inline |
checks to see whether the scale attribute is locked
|
inline |
checks to see whether the transform attribute is locked
|
inline |
return the prim this transform matrix is attached to
|
static |
helper method. Pushes a double into the transform op specified at the requested timecode (typically for RotateX / RotateY)
input | the new value to insert into the transform operation |
op | the transformation op to write into |
timeCode | the time at which to set the transform value return true if written ok |
|
static |
helper method. Pushes a matrix into the transform op specified at the requested timecode
input | the new value to insert into the transform operation |
op | the transformation op to write into |
timeCode | the time at which to set the transform value return true if written ok |
|
static |
helper method. Pushes a point into the transform op specified at the requested timecode
input | the new value to insert into the transform operation |
op | the transformation op to write into |
timeCode | the time at which to set the transform value return true if written ok |
|
static |
helper method. Pushes a vector into the transform op specified at the requested timecode
input | the new value to insert into the transform operation |
op | the transformation op to write into |
timeCode | the time at which to set the transform value return true if written ok |
|
static |
helper method. Pushes a shear into the transform op specified at the requested timecode
input | the new value to insert into the transform operation |
op | the transformation op to write into |
timeCode | the time at which to set the transform value return true if written ok |
|
static |
helper method. Pushes a vector into the transform op specified at the requested timecode
input | the new value to insert into the transform operation |
op | the transformation op to write into |
timeCode | the time at which to set the transform value return true if written ok |
|
static |
helper method. Reads a double from the transform op specified at the requested timecode (typically RotateX / rotateY values)
op | the transformation op to read from |
timeCode | the time at which to query the transform value return the returned value |
|
static |
helper method. Reads a matrix from the transform op specified at the requested timecode
result | the returned result |
op | the transformation op to read from |
timeCode | the time at which to query the transform value return true if read ok |
|
static |
helper method. Reads a point from the transform op specified at the requested timecode
result | the returned result |
op | the transformation op to read from |
timeCode | the time at which to query the transform value return true if read ok |
|
static |
helper method. Reads an euler rotation from the transform op specified at the requested timecode
result | the returned result |
op | the transformation op to read from |
timeCode | the time at which to query the transform value return true if read ok |
|
static |
helper method. Reads a shear value from the transform op specified at the requested timecode
result | the returned result |
op | the transformation op to read from |
timeCode | the time at which to query the transform value return true if read ok |
|
static |
helper method. Reads a vector from the transform op specified at the requested timecode
result | the returned result |
op | the transformation op to read from |
timeCode | the time at which to query the transform value return true if read ok |
|
inline |
Applies a local space translation offset to the computed matrix. Useful for positioning objects on a table.
localTranslateOffset | the local space offset to apply to the transform. |
|
inline |
sets the MObject for the transform
object | the MObject for the custom transform node |
void AL::usdmaya::nodes::TransformationMatrix::setPrim | ( | const UsdPrim & | prim, |
Transform * | transformNode | ||
) |
set the prim that this transformation matrix will read/write to.
prim | the prim |
void AL::usdmaya::nodes::TransformationMatrix::updateToTime | ( | const UsdTimeCode & | time | ) |
this method updates the internal transformation components to the given time. Only the Transform node should need to call this method
time | the new timecode |