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 void | createTranformChainsForSchemaPrims (nodes::ProxyShape *shape, const std::vector< UsdPrim > &schemaPrims, const MDagPath &proxyTransformPath, MObjectToPrim &objsToCreate) |
| 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::ProxyShape *proxy, const std::vector< UsdPrim > &objsToCreate, const fileio::translators::TranslatorParameters ¶m=fileio::translators::TranslatorParameters()) |
| 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::ProxyShape *proxy, const std::vector< UsdPrim > &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...
|
|
static void | updateSchemaPrims (nodes::ProxyShape *proxy, const std::vector< UsdPrim > &objsToUpdate) |
| updates the list of UsdPrims after a variant switch (but when the nodes have not changed) 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.
static void AL::usdmaya::cmds::ProxyShapePostLoadProcess::connectSchemaPrims |
( |
nodes::ProxyShape * |
proxy, |
|
|
const std::vector< UsdPrim > & |
objsToCreate |
|
) |
| |
|
static |
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
-
proxy | the proxy shape to connect the schema prims |
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
-
proxy | the proxy shape to create the schema prims on |
objsToCreate | the mapping returned from createTranformChainsForSchemaPrims |
param | the translator plugin options |
static void AL::usdmaya::cmds::ProxyShapePostLoadProcess::createTranformChainsForSchemaPrims |
( |
nodes::ProxyShape * |
shape, |
|
|
const std::vector< UsdPrim > & |
schemaPrims, |
|
|
const MDagPath & |
proxyTransformPath, |
|
|
MObjectToPrim & |
objsToCreate |
|
) |
| |
|
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 |
objsToCreate | a mapping from the MObjects created (for the transform nodes), 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
static void AL::usdmaya::cmds::ProxyShapePostLoadProcess::updateSchemaPrims |
( |
nodes::ProxyShape * |
proxy, |
|
|
const std::vector< UsdPrim > & |
objsToUpdate |
|
) |
| |
|
static |
updates the list of UsdPrims after a variant switch (but when the nodes have not changed)
- Parameters
-
proxy | the proxy shape to update |
objsToUpdate | the list of prims to be updated |
The documentation for this class was generated from the following file: