When importing a new usd stage into an AL::usdmaya::nodes::ProxyShape, there are a selection of post import processes that need to take place in order to import any custom usd plugins found.
More...
#include <ProxyShapePostLoadProcess.h>
|
typedef std::vector< std::pair
< MObject, UsdPrim > > | MObjectToPrim |
| a mapping from an MObject to a UsdPrim
|
|
|
static MStatus | initialise (nodes::ProxyShape *shape) |
| called after a proxy shape has been created. Traverses the prim hierarchy and looks to see whether any custom plugin translators need to be called, and performs additional book-keeping. More...
|
|
static MObjectToPrim | createTranformChainsForSchemaPrims (nodes::ProxyShape *shape, const std::vector< UsdPrim > &schemaPrims, const MDagPath &proxyTransformPath) |
| given a specific proxy shape, and a collection of UsdPrims that represent custom DagNode types, this will generate a transform hierarchy that will allow you to map the UsdPrims to equivalent maya transforms More...
|
|
static void | createSchemaPrims (nodes::SchemaNodeRefDB *schemaNodeDB, const MObjectToPrim &objsToCreate) |
| After transforms exist to parent the custom plugin-prim types (i.e. after a call to createTranformChainsForSchemaPrims), this method should be called to call the plugin translators for all those nodes that should be imported into the Maya Scene. More...
|
|
static void | connectSchemaPrims (nodes::SchemaNodeRefDB *schemaNodeDB, const MObjectToPrim &objsToCreate) |
| called once all plugin nodes have been created, and will request that each plugin translator performs the postImport fixup to safely make any connections between Maya nodes More...
|
|
When importing a new usd stage into an AL::usdmaya::nodes::ProxyShape, there are a selection of post import processes that need to take place in order to import any custom usd plugins found.
- If any custom plugin prims are found, that represent DAG nodes (e.g. they are shapes or transforms), then a hierarchy of AL::usdmaya::nodes::Transform nodes will be generated so that the USD transform values found on the prims, will have a direct mapping to a maya transform. This allows use of the standard Maya scale/translate/rotate manipulators to control maya nodes directly.
- For every custom plugin prim found, that node will need to be translated into Maya, and then connected up with the other imported prims.
- A certain amount of book keeping information will need to be generated, so that variant switching can be used to modify or remove those nodes at a later date.
This helper class manages those processes.
called once all plugin nodes have been created, and will request that each plugin translator performs the postImport fixup to safely make any connections between Maya nodes
- Parameters
-
schemaNodeDB | the database of plugin nodes imported into the scene (used for variant switching book keeping) |
objsToCreate | the mapping returned from createTranformChainsForSchemaPrims |
After transforms exist to parent the custom plugin-prim types (i.e. after a call to createTranformChainsForSchemaPrims), this method should be called to call the plugin translators for all those nodes that should be imported into the Maya Scene.
- Parameters
-
schemaNodeDB | the database of plugin nodes imported into the scene (used for variant switching book keeping) |
objsToCreate | the mapping returned from createTranformChainsForSchemaPrims |
static MObjectToPrim AL::usdmaya::cmds::ProxyShapePostLoadProcess::createTranformChainsForSchemaPrims |
( |
nodes::ProxyShape * |
shape, |
|
|
const std::vector< UsdPrim > & |
schemaPrims, |
|
|
const MDagPath & |
proxyTransformPath |
|
) |
| |
|
static |
given a specific proxy shape, and a collection of UsdPrims that represent custom DagNode types, this will generate a transform hierarchy that will allow you to map the UsdPrims to equivalent maya transforms
- Parameters
-
shape | the proxy shape these transforms are being pulled in from |
schemaPrims | an array of prims for which transforms should be created |
proxyTransformPath | a path to the transform node that resides above the proxy shape |
- Returns
- a mapping from the MObjects created, to the UsdPrim that is represented
static MStatus AL::usdmaya::cmds::ProxyShapePostLoadProcess::initialise |
( |
nodes::ProxyShape * |
shape | ) |
|
|
static |
called after a proxy shape has been created. Traverses the prim hierarchy and looks to see whether any custom plugin translators need to be called, and performs additional book-keeping.
- Parameters
-
shape | the proxy shape node that has just been created |
- Returns
- MS::kSuccess if ok
The documentation for this class was generated from the following file: