An iterator to walk over the transforms within a USD file.
More...
#include <TransformIterator.h>
|
| TransformIterator (UsdStageRefPtr stage, const MDagPath &parentPath=MDagPath()) |
| ctor. Initialises the iterator to the root of the stage More...
|
|
| TransformIterator (const UsdPrim &startPrim, const MDagPath &startMayaPath) |
| ctor. Initialises the iterator to the root of the stage More...
|
|
bool | done () const |
| return true if the iteration is complete More...
|
|
size_t | depth () const |
| returns the current iteration depth More...
|
|
const UsdPrim & | prim () const |
| return the current prim More...
|
|
void | prune () |
| do not iterate over the children of this node
|
|
bool | next () |
| move to the next item in the stage More...
|
|
void | append (const MObject newNode) |
| in order to keep the maya path in sync with the USD prim, at each iteration step you should pass in the MObject of the node in maya that mirrors your place in the USD hierarchy. Without this step the current dag path will not be valid. More...
|
|
MObject | parent () const |
| returns the parent transform of the current node. More...
|
|
MDagPath | currentPath () const |
| returns the current maya path equivalent of the current USD prim. More...
|
|
An iterator to walk over the transforms within a USD file.
AL::usdmaya::fileio::TransformIterator::TransformIterator |
( |
UsdStageRefPtr |
stage, |
|
|
const MDagPath & |
parentPath = MDagPath() |
|
) |
| |
ctor. Initialises the iterator to the root of the stage
- Parameters
-
stage | the stage to iterate over |
parentPath | the DAG path of the proxy shape |
AL::usdmaya::fileio::TransformIterator::TransformIterator |
( |
const UsdPrim & |
startPrim, |
|
|
const MDagPath & |
startMayaPath |
|
) |
| |
ctor. Initialises the iterator to the root of the stage
- Parameters
-
startPrim | a prim in a stage where the iteration should start |
startMayaPath | the DAG path of the proxy shape |
void AL::usdmaya::fileio::TransformIterator::append |
( |
const MObject |
newNode | ) |
|
|
inline |
in order to keep the maya path in sync with the USD prim, at each iteration step you should pass in the MObject of the node in maya that mirrors your place in the USD hierarchy. Without this step the current dag path will not be valid.
- Parameters
-
newNode | the node to append into the stack |
MDagPath AL::usdmaya::fileio::TransformIterator::currentPath |
( |
| ) |
const |
returns the current maya path equivalent of the current USD prim.
- Returns
- the maya dag path
size_t AL::usdmaya::fileio::TransformIterator::depth |
( |
| ) |
const |
|
inline |
returns the current iteration depth
- Returns
- the iteration depth
bool AL::usdmaya::fileio::TransformIterator::done |
( |
| ) |
const |
|
inline |
return true if the iteration is complete
- Returns
- true when the iteration is complete
bool AL::usdmaya::fileio::TransformIterator::next |
( |
| ) |
|
move to the next item in the stage
- Returns
- true if we managed to move to the next prim, false if we have finished traversal
MObject AL::usdmaya::fileio::TransformIterator::parent |
( |
| ) |
const |
|
inline |
returns the parent transform of the current node.
- Returns
- the MObject of the parent node, r MObject::kNullObj if no valid parent
const UsdPrim& AL::usdmaya::fileio::TransformIterator::prim |
( |
| ) |
const |
|
inline |
return the current prim
- Returns
- the current prim
The documentation for this class was generated from the following file: