AL_USDMaya  0.29.4
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AL::usdmaya::nodes::ProxyShape Class Reference

A custom proxy shape node that attaches itself to a USD file, and then renders it. The stage is held internally as a member variable, and it will be composed based on a change to the "filePath" attribute. More...

#include <ProxyShape.h>

Inheritance diagram for AL::usdmaya::nodes::ProxyShape:
AL::usdmaya::nodes::proxy::PrimFilterInterface

Public Types

typedef TfHashSet< SdfPath,
SdfPath::Hash > 
SdfPathHashSet
 a set of SdfPaths
 
typedef std::vector< std::pair
< MObject, UsdPrim > > 
MObjectToPrim
 a mapping between a maya transform (or MObject::kNullObj), and the prim that exists at that location in the DAG graph.
 

Public Member Functions

MDagPath parentTransform ()
 
AL_USDMAYA_PUBLIC void registerEvents ()
 a method that registers all of the events in the ProxyShape
 
AL_USDMAYA_PUBLIC ProxyShape ()
 ctor
 
AL_USDMAYA_PUBLIC ~ProxyShape ()
 dtor
 
Type Info & Registration
 AL_MAYA_DECLARE_NODE ()
 
Input Attributes
 AL_DECL_ATTRIBUTE (filePath)
 the input USD file path for this proxy
 
 AL_DECL_ATTRIBUTE (primPath)
 a path to a prim you want to view with this shape
 
 AL_DECL_ATTRIBUTE (excludePrimPaths)
 a comma seperated list of prims you don't want to see.
 
 AL_DECL_ATTRIBUTE (time)
 the input time value (probably connected to time1.outTime)
 
 AL_DECL_ATTRIBUTE (timeOffset)
 an offset, in GUI time units, where the animation should start playback
 
 AL_DECL_ATTRIBUTE (timeScalar)
 
 AL_DECL_ATTRIBUTE (complexity)
 the subdiv complexity used
 
 AL_DECL_ATTRIBUTE (displayGuides)
 display guide - sets shape to display geometry of purpose "guide". See imageable.h
 
 AL_DECL_ATTRIBUTE (displayRenderGuides)
 display render guide - sets hape to display geometry of purpose "render". See imageable.h
 
 AL_DECL_ATTRIBUTE (layers)
 Connection to any layer DG nodes.
 
 AL_DECL_ATTRIBUTE (serializedSessionLayer)
 serialised session layer (obsolete / deprecated)
 
 AL_DECL_ATTRIBUTE (sessionLayerName)
 name of serialized session layer (on the LayerManager)
 
 AL_DECL_ATTRIBUTE (serializedArCtx)
 serialised asset resolver context
 
 AL_DECL_ATTRIBUTE (serializedTrCtx)
 serialised translator context
 
 AL_DECL_ATTRIBUTE (unloaded)
 Open the stage unloaded.
 
 AL_DECL_ATTRIBUTE (inDrivenTransformsData)
 an array of MPxData for the driven transforms
 
 AL_DECL_ATTRIBUTE (ambient)
 ambient display colour
 
 AL_DECL_ATTRIBUTE (diffuse)
 diffuse display colour
 
 AL_DECL_ATTRIBUTE (specular)
 specular display colour
 
 AL_DECL_ATTRIBUTE (emission)
 emission display colour
 
 AL_DECL_ATTRIBUTE (shininess)
 material shininess
 
 AL_DECL_ATTRIBUTE (serializedRefCounts)
 Serialised reference counts to rebuild the transform reference information.
 
 AL_DECL_ATTRIBUTE (populationMaskIncludePaths)
 The path list joined by ",", that will be used as a mask when doing UsdStage::OpenMask()
 
 AL_DECL_ATTRIBUTE (version)
 Version of the plugin at the time of creation (read-only)
 
 AL_DECL_ATTRIBUTE (stageDataDirty)
 Force the outStageData to be marked dirty (write-only)
 
 AL_DECL_ATTRIBUTE (excludedTranslatedGeometry)
 Excluded geometry that has been explicitly translated.
 
 AL_DECL_ATTRIBUTE (stageCacheId)
 Cache ID of the currently loaded stage)
 
 AL_DECL_ATTRIBUTE (assetResolverConfig)
 A place to put a custom assetResolver Config string that's passed to the Resolver Context when stage is opened.
 
Output Attributes
 AL_DECL_ATTRIBUTE (outTime)
 outTime = (time - timeOffset) * timeScalar
 
 AL_DECL_ATTRIBUTE (outStageData)
 inStageData —> inStageDataCached —> outStageData
 
Public Utils
AL_USDMAYA_PUBLIC UsdStageRefPtr getUsdStage () const
 provides access to the UsdStage that this proxy shape is currently representing. This will cause a compute on the output stage. More...
 
UsdStageRefPtr usdStage () const
 provides access to the UsdStage that this proxy shape is currently representing More...
 
bool getRenderAttris (void *attribs, const MHWRender::MFrameContext &frameContext, const MDagPath &dagPath)
 gets hold of the attributes on this node that control the rendering in some way More...
 
AL_USDMAYA_PUBLIC MBoundingBox boundingBox () const override
 compute bounds
 
Plug-in Translator node methods
AL_USDMAYA_PUBLIC void serialiseTranslatorContext ()
 serialises the translator context
 
AL_USDMAYA_PUBLIC void deserialiseTranslatorContext ()
 deserialises the translator context
 
AL_USDMAYA_PUBLIC MString recordUsdPrimToMayaPath (const UsdPrim &usdPrim, const MObject &mayaObject)
 gets the maya node path for a prim, stores the mapping and returns it More...
 
AL_USDMAYA_PUBLIC MString getMayaPathFromUsdPrim (const UsdPrim &usdPrim)
 returns the stored maya node path for a prim More...
 
AL_USDMAYA_PUBLIC void findTaggedPrims ()
 aggregates logic that needs to iterate through the hierarchy looking for properties/metdata on prims
 
AL_USDMAYA_PUBLIC void findTaggedPrims (const HierarchyIterationLogics &iterationLogics)
 
AL_USDMAYA_PUBLIC void findExcludedGeometry ()
 searches for the excluded geometry
 
AL_USDMAYA_PUBLIC void findSelectablePrims ()
 searches for paths which are selectable
 
AL_USDMAYA_PUBLIC void iteratePrimHierarchy ()
 
fileio::translators::TranslatorManufacturetranslatorManufacture ()
 returns the plugin translator registry assigned to this shape More...
 
fileio::translators::TranslatorContextPtr & context ()
 returns the plugin translator context assigned to this shape More...
 
ProxyShape selection
AL_USDMAYA_PUBLIC SdfPathHashSetselectedPaths ()
 returns the paths of the selected items within the proxy shape More...
 
AL_USDMAYA_PUBLIC bool doSelect (SelectionUndoHelper &helper, const SdfPathVector &orderedPaths)
 Performs a selection operation on this node. Intended for use by the ProxyShapeSelect command only. More...
 
UsdImaging
AL_USDMAYA_PUBLIC void constructGLImagingEngine ()
 constructs the USD imaging engine for this shape
 
UsdImagingGLHdEngine * engine () const
 returns the usd imaging engine for this proxy shape More...
 

Static Public Attributes

static AL_USDMAYA_PUBLIC const
char * 
s_selectionMaskName
 

Friends

struct SelectionUndoHelper
 
class ProxyShapeUI
 
class StageReloadGuard
 
class ProxyDrawOverride
 

AL_usdmaya_Transform utils

A set of commands to manipulate the chains of transforms that map to the usd prims found in a stage. There are 3 main reasons for a transform node to exist within maya:

  • They are required to provide a parent transform for a schema prim that will be imported into maya.
  • They are the parent node of an object that has been selected
  • The user has requested that they be imported
enum  TransformReason { kSelection = 1 << 0, kRequested = 1 << 1, kRequired = 1 << 2 }
 an enum describing the reason that a transform exists in the scene More...
 
enum  PickMode : int { PickMode::kPrims = 0, PickMode::kModels = 1, PickMode::kInstances = 2 }
 Selection pick modes (based on USD View application) More...
 
bool isRequiredPath (const SdfPath &path) const
 returns true if the path is required for an imported schema prim More...
 
MObject findRequiredPath (const SdfPath &path) const
 returns the MObject of the maya transform for requested path (or MObject::kNullObj) More...
 
AL_USDMAYA_PUBLIC std::vector
< UsdPrim > 
huntForNativeNodesUnderPrim (const MDagPath &proxyTransformPath, SdfPath startPath, fileio::translators::TranslatorManufacture &manufacture)
 traverses the UsdStage looking for the prims that are going to be handled by custom transformer plug-ins. More...
 
AL_USDMAYA_PUBLIC MObject makeUsdTransformChain (const UsdPrim &usdPrim, MDagModifier &modifier, TransformReason reason, MDGModifier *modifier2=0, uint32_t *createCount=0)
 constructs a single chain of transform nodes from the usdPrim to the root of this proxy shape. More...
 
AL_USDMAYA_PUBLIC MObject makeUsdTransforms (const UsdPrim &usdPrim, MDagModifier &modifier, TransformReason reason, MDGModifier *modifier2=0)
 Will construct AL_usdmaya_Transform nodes for all of the prims from the specified usdPrim and down. More...
 
AL_USDMAYA_PUBLIC void removeUsdTransformChain (const UsdPrim &usdPrim, MDagModifier &modifier, TransformReason reason)
 will destroy all of the AL_usdmaya_Transform nodes from the prim specified, up to the root (unless any of those transform nodes are in use by another imported prim). More...
 
AL_USDMAYA_PUBLIC void removeUsdTransformChain (const SdfPath &path, MDagModifier &modifier, TransformReason reason)
 will destroy all of the AL_usdmaya_Transform nodes from the prim specified, up to the root (unless any of those transform nodes are in use by another imported prim). More...
 
AL_USDMAYA_PUBLIC void removeUsdTransforms (const UsdPrim &usdPrim, MDagModifier &modifier, TransformReason reason)
 Will destroy all AL_usdmaya_Transform nodes found underneath the prim (unless those nodes are required for another purpose). More...
 
AL_USDMAYA_PUBLIC void printRefCounts () const
 Debugging util - prints out the reference counts for each AL_usdmaya_Transform that currently exists in the scene.
 
void destroyTransformReferences ()
 destroys all internal transform references
 
AL_USDMAYA_PUBLIC void filterPrims (const SdfPathVector &previousPrims, std::vector< UsdPrim > &newPrimSet, std::vector< UsdPrim > &transformsToCreate, std::vector< UsdPrim > &updatablePrimSet, SdfPathVector &removedPrimSet)
 Internal method. Used to filter out a set of paths into groups that need to be created, deleted, or updating. More...
 
AL_USDMAYA_PUBLIC void getCounts (SdfPath path, uint32_t &selected, uint32_t &required, uint32_t &refCount)
 a method that is used within testing only. Returns the current reference count state for the path More...
 
AL_USDMAYA_PUBLIC bool isSelectedMObject (MObject obj, SdfPath &path)
 Tests to see if a given MObject is currently selected in the proxy shape. If the specified MObject is selected, then the path will be filled with the corresponding usd prim path. More...
 

Miscellaneous

AL_USDMAYA_PUBLIC void unloadMayaReferences ()
 unloads all maya references More...
 
UsdPrim getRootPrim ()
 if a root prim has been specified by the user in the proxy shape AE, then this method will return the associated prim (used by the Hydra rendering code to select a root to render from). If no prim has been specified, the pseudo root will be passed to UsdImaging More...
 
AL_USDMAYA_PUBLIC void serialiseTransformRefs ()
 serialise the state of the transform ref counts prior to saving the file
 
AL_USDMAYA_PUBLIC void deserialiseTransformRefs ()
 deserialise the state of the transform ref counts prior to saving the file
 
AL_USDMAYA_PUBLIC void onPrePrimChanged (const SdfPath &path, SdfPathVector &outPathVector)
 Finds the corresponding translator for each decendant prim that has a corresponding Translator and calls preTearDown. More...
 
AL_USDMAYA_PUBLIC void onPrimResync (SdfPath primPath, SdfPathVector &changedPaths)
 Re-Creates and updates the maya prim hierarchy starting from the specified primpath. More...
 
AL_USDMAYA_PUBLIC void resync (const SdfPath &primPath)
 Preps translators for change, and then re-ceates and updates the maya prim hierarchy below the specified primPath as if a variant change occurred. More...
 
AL_USDMAYA_PUBLIC void serialize (UsdStageRefPtr stage, LayerManager *layerManager)
 
void primChangedAtPath (const SdfPath &changePath)
 This function starts the prim changed process within the proxyshape. More...
 
void setHaveObjectsChangedAtPath (bool hasObjectsChanged)
 change the status of the composition changed status More...
 
SelectionListselectionList ()
 provides access to the selection list on this proxy shape More...
 
void setChangedSelectionState (bool v)
 internal method used to correctly schedule changes to the selection list More...
 
AL::usdmaya::SelectabilityDBselectabilityDB ()
 Returns the SelectionDatabase owned by the ProxyShape. More...
 
const
AL::usdmaya::SelectabilityDB
selectabilityDB () const
 Returns the SelectionDatabase owned by the ProxyShape. More...
 
AL_USDMAYA_PUBLIC void loadStage ()
 used to reload the stage after file open
 
AL_USDMAYA_PUBLIC void addAttributeChangedCallback ()
 adds the attribute changed callback to the proxy shape
 
AL_USDMAYA_PUBLIC void removeAttributeChangedCallback ()
 removes the attribute changed callback from the proxy shape
 
AL_USDMAYA_PUBLIC void constructLockPrims ()
 
AL_USDMAYA_PUBLIC void translatePrimPathsIntoMaya (const SdfPathVector &importPaths, const SdfPathVector &teardownPaths, const fileio::translators::TranslatorParameters &param=fileio::translators::TranslatorParameters())
 Translates prims at the specified paths, the operation conducted by the translator depends on which list you populate. More...
 
AL_USDMAYA_PUBLIC void translatePrimsIntoMaya (const AL::usd::utils::UsdPrimVector &importPrims, const SdfPathVector &teardownPaths, const fileio::translators::TranslatorParameters &param=fileio::translators::TranslatorParameters())
 Translates prims at the specified paths, the operation conducted by the translator depends on which list you populate. More...
 
AL_USDMAYA_PUBLIC SdfPathVector getPrimPathsFromCommaJoinedString (const MString &paths) const
 Breaks a comma separated string up into a SdfPath Vector. More...
 
AL_USDMAYA_PUBLIC MSelectionMask getShapeSelectionMask () const override
 Returns the selection mask of the shape.
 
static AL_USDMAYA_PUBLIC void serializeAll ()
 
static std::vector
< MObjectHandle > & 
GetUnloadedProxyShapes ()
 

Detailed Description

A custom proxy shape node that attaches itself to a USD file, and then renders it. The stage is held internally as a member variable, and it will be composed based on a change to the "filePath" attribute.

Member Enumeration Documentation

Selection pick modes (based on USD View application)

Enumerator
kPrims 

Pick the target prim.

kModels 

Pick the nearest model kind ancestor of target.

kInstances 

Pick an instance of the target (if available)

an enum describing the reason that a transform exists in the scene

Enumerator
kSelection 

the node exists for selection

kRequested 

the node has been requested by a user

kRequired 

the node is required for an imported schema prim

Member Function Documentation

AL::usdmaya::nodes::ProxyShape::AL_DECL_ATTRIBUTE ( timeScalar  )

a scalar value that can speed up (values greater than 1) or slow down (values less than one) or reverse (negative values) the playback of the animation.

fileio::translators::TranslatorContextPtr& AL::usdmaya::nodes::ProxyShape::context ( )
inline

returns the plugin translator context assigned to this shape

Returns
the translator context
AL_USDMAYA_PUBLIC bool AL::usdmaya::nodes::ProxyShape::doSelect ( SelectionUndoHelper helper,
const SdfPathVector &  orderedPaths 
)

Performs a selection operation on this node. Intended for use by the ProxyShapeSelect command only.

Parameters
helperprovides the arguments to the selection system, and stores the internal proxy shape state changes that need to be done/undone
orderedPathsprovides the original (deduplicated) input paths, in order; provided just so that the selection commands will return results in the same order they were provided - this is useful so that, if the user does, ie, "AL_usdmaya_ProxyShapeSelect -pp /foo/bar -pp /some/thing -proxy myProxyShape",
Returns
true if the operation succeeded
UsdImagingGLHdEngine* AL::usdmaya::nodes::ProxyShape::engine ( ) const
inline

returns the usd imaging engine for this proxy shape

Returns
the imagine engin instance for this shape (shared between draw override and shape ui)
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::filterPrims ( const SdfPathVector &  previousPrims,
std::vector< UsdPrim > &  newPrimSet,
std::vector< UsdPrim > &  transformsToCreate,
std::vector< UsdPrim > &  updatablePrimSet,
SdfPathVector &  removedPrimSet 
)

Internal method. Used to filter out a set of paths into groups that need to be created, deleted, or updating.

Parameters
previousPrimsthe previous list of prims underneath a prim in the process of a variant change
newPrimSetthe list of prims found under neath the prim after the variant change. Prims that can be updated will be removed from this list, leaving only the prims that need to be created.
transformsToCreateof the new nodes that can be created, if they are a DAG node (i.e. require a transform), then this list will contain those nodes
updatablePrimSeta returned list of prims that can be updated
removedPrimSeta returned set of paths for objects that need to be deleted.
MObject AL::usdmaya::nodes::ProxyShape::findRequiredPath ( const SdfPath &  path) const
inline

returns the MObject of the maya transform for requested path (or MObject::kNullObj)

Parameters
paththe usd prim path to look up
Returns
the MObject for the parent transform to the path specified
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::getCounts ( SdfPath  path,
uint32_t &  selected,
uint32_t &  required,
uint32_t &  refCount 
)
inline

a method that is used within testing only. Returns the current reference count state for the path

Parameters
paththe prim path to test
selectedthe returned selected reference count
requiredthe returned required reference count
refCountthe returned refCount reference count
AL_USDMAYA_PUBLIC MString AL::usdmaya::nodes::ProxyShape::getMayaPathFromUsdPrim ( const UsdPrim &  usdPrim)

returns the stored maya node path for a prim

Parameters
usdPrima prim that has been brought into maya
Returns
a dag path to the maya object
AL_USDMAYA_PUBLIC SdfPathVector AL::usdmaya::nodes::ProxyShape::getPrimPathsFromCommaJoinedString ( const MString &  paths) const

Breaks a comma separated string up into a SdfPath Vector.

Parameters
pathsthe comma separated list of paths
Returns
the separated list of paths
bool AL::usdmaya::nodes::ProxyShape::getRenderAttris ( void *  attribs,
const MHWRender::MFrameContext &  frameContext,
const MDagPath &  dagPath 
)

gets hold of the attributes on this node that control the rendering in some way

Parameters
attribsthe returned set of render attributes (should be of type: UsdImagingGLEngine::RenderParams*. Hiding this behind a void pointer to prevent UsdImagingGLEngine leaking into the translator plugin dependencies)
frameContextthe frame context for rendering
dagPaththe dag path of the node being rendered
Returns
true if the attribs could be retrieved (i.e. is the stage is valid)
UsdPrim AL::usdmaya::nodes::ProxyShape::getRootPrim ( )
inline

if a root prim has been specified by the user in the proxy shape AE, then this method will return the associated prim (used by the Hydra rendering code to select a root to render from). If no prim has been specified, the pseudo root will be passed to UsdImaging

Returns
the prim specified by the user (if valid), the pseudo root if no prim has been specified, or a NULL prim if the stage is invalid.
AL_USDMAYA_PUBLIC UsdStageRefPtr AL::usdmaya::nodes::ProxyShape::getUsdStage ( ) const

provides access to the UsdStage that this proxy shape is currently representing. This will cause a compute on the output stage.

Returns
the proxy shape
AL_USDMAYA_PUBLIC std::vector<UsdPrim> AL::usdmaya::nodes::ProxyShape::huntForNativeNodesUnderPrim ( const MDagPath &  proxyTransformPath,
SdfPath  startPath,
fileio::translators::TranslatorManufacture manufacture 
)

traverses the UsdStage looking for the prims that are going to be handled by custom transformer plug-ins.

Parameters
proxyTransformPaththe DAG path of the proxy shape
startPaththe path from which iteration needs to start in the UsdStage
manufacturethe translator registry
Returns
the array of prims found that will need to be imported
bool AL::usdmaya::nodes::ProxyShape::isRequiredPath ( const SdfPath &  path) const
inline

returns true if the path is required for an imported schema prim

Parameters
paththe path to query
Returns
true if the path represents a prim that is required.
AL_USDMAYA_PUBLIC bool AL::usdmaya::nodes::ProxyShape::isSelectedMObject ( MObject  obj,
SdfPath &  path 
)
inline

Tests to see if a given MObject is currently selected in the proxy shape. If the specified MObject is selected, then the path will be filled with the corresponding usd prim path.

Parameters
objthe input MObject to see if it's selected.
paththe returned prim path (if the node is found)
Returns
true if the maya node is currently selected
AL_USDMAYA_PUBLIC MObject AL::usdmaya::nodes::ProxyShape::makeUsdTransformChain ( const UsdPrim &  usdPrim,
MDagModifier &  modifier,
TransformReason  reason,
MDGModifier *  modifier2 = 0,
uint32_t *  createCount = 0 
)

constructs a single chain of transform nodes from the usdPrim to the root of this proxy shape.

Parameters
usdPrimthe leaf of the prim we wish to create
modifierwill store the changes as this path is constructed.
reasonthe reason why this path is being generated.
modifier2is specified, the modifier will end up containing a set of commands to switch the pushToPrim flags to true. (This has to be done after the transform has been created and initialized, otherwise the default maya values will be pushed in the UsdPrim, wiping out the values you just loaded)
createCountthe returned number of transforms that were created.
Returns
the MObject of the parent transform node for the usdPrim
Todo:
The mode ProxyShape::kSelection will cause the possibility of instability in the selection system. This mode will be removed at a future date
AL_USDMAYA_PUBLIC MObject AL::usdmaya::nodes::ProxyShape::makeUsdTransforms ( const UsdPrim &  usdPrim,
MDagModifier &  modifier,
TransformReason  reason,
MDGModifier *  modifier2 = 0 
)

Will construct AL_usdmaya_Transform nodes for all of the prims from the specified usdPrim and down.

Parameters
usdPrimthe root for the transforms to be created
modifierthe modifier that will store the creation steps for the transforms
reasonthe reason for creating the transforms (use with selection, etc).
modifier2if specified, this will contain a set of commands that turn on the pushToPrim flag on the transform nodes. These flags need to be set after the transforms have been created
Todo:
The mode ProxyShape::kSelection will cause the possibility of instability in the selection system. This mode will be removed at a future date
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::onPrePrimChanged ( const SdfPath &  path,
SdfPathVector &  outPathVector 
)

Finds the corresponding translator for each decendant prim that has a corresponding Translator and calls preTearDown.

Parameters
[in]pathof the point in the hierarchy that is potentially undergoing structural changes
[out]outPathVectorof SdfPaths that are decendants of 'path'
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::onPrimResync ( SdfPath  primPath,
SdfPathVector &  changedPaths 
)

Re-Creates and updates the maya prim hierarchy starting from the specified primpath.

Parameters
[in]primPathof the point in the hierarchy that is potentially undergoing structural changes
[in]changedPathsare child paths that existed previously and may not be existing now.
void AL::usdmaya::nodes::ProxyShape::primChangedAtPath ( const SdfPath &  changePath)
inline

This function starts the prim changed process within the proxyshape.

Parameters
[in]changePathis point at which the scene is going to be modified.
AL_USDMAYA_PUBLIC MString AL::usdmaya::nodes::ProxyShape::recordUsdPrimToMayaPath ( const UsdPrim &  usdPrim,
const MObject &  mayaObject 
)

gets the maya node path for a prim, stores the mapping and returns it

Parameters
usdPrimthe prim we are bringing in to maya
mayaObjectthe corresponding maya node
Returns
a dag path to the maya object
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::removeUsdTransformChain ( const UsdPrim &  usdPrim,
MDagModifier &  modifier,
TransformReason  reason 
)

will destroy all of the AL_usdmaya_Transform nodes from the prim specified, up to the root (unless any of those transform nodes are in use by another imported prim).

Parameters
usdPrimthe leaf node in the chain of transforms we wish to remove
modifierwill store the changes as this path is removed.
reasonthe reason why this path is being removed.
Todo:
The mode ProxyShape::kSelection will cause the possibility of instability in the selection system. This mode will be removed at a future date
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::removeUsdTransformChain ( const SdfPath &  path,
MDagModifier &  modifier,
TransformReason  reason 
)

will destroy all of the AL_usdmaya_Transform nodes from the prim specified, up to the root (unless any of those transform nodes are in use by another imported prim).

Parameters
paththe leaf node in the chain of transforms we wish to remove
modifierwill store the changes as this path is removed.
reasonthe reason why this path is being removed.
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::removeUsdTransforms ( const UsdPrim &  usdPrim,
MDagModifier &  modifier,
TransformReason  reason 
)

Will destroy all AL_usdmaya_Transform nodes found underneath the prim (unless those nodes are required for another purpose).

Parameters
usdPrim
modifierthe modifier that will be filled with the instructions to delete the transform nodes
reasonAre we deleting selected transforms, or those that are required, or requested?
Todo:
The mode ProxyShape::kSelection will cause the possibility of instability in the selection system. This mode will be removed at a future date
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::resync ( const SdfPath &  primPath)

Preps translators for change, and then re-ceates and updates the maya prim hierarchy below the specified primPath as if a variant change occurred.

Parameters
[in]primPathof the point in the hierarchy that is potentially undergoing structural changes
AL::usdmaya::SelectabilityDB& AL::usdmaya::nodes::ProxyShape::selectabilityDB ( )
inline

Returns the SelectionDatabase owned by the ProxyShape.

Returns
A SelectableDB owned by the ProxyShape
const AL::usdmaya::SelectabilityDB& AL::usdmaya::nodes::ProxyShape::selectabilityDB ( ) const
inline

Returns the SelectionDatabase owned by the ProxyShape.

Returns
A constant SelectableDB owned by the ProxyShape
AL_USDMAYA_PUBLIC SdfPathHashSet& AL::usdmaya::nodes::ProxyShape::selectedPaths ( )
inline

returns the paths of the selected items within the proxy shape

Returns
the paths of the selected prims
SelectionList& AL::usdmaya::nodes::ProxyShape::selectionList ( )
inline

provides access to the selection list on this proxy shape

Returns
the internal selection list
void AL::usdmaya::nodes::ProxyShape::setChangedSelectionState ( bool  v)
inline

internal method used to correctly schedule changes to the selection list

Parameters
vthe state
void AL::usdmaya::nodes::ProxyShape::setHaveObjectsChangedAtPath ( bool  hasObjectsChanged)
inline

change the status of the composition changed status

Parameters
hasObjectsChanged
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::translatePrimPathsIntoMaya ( const SdfPathVector &  importPaths,
const SdfPathVector &  teardownPaths,
const fileio::translators::TranslatorParameters param = fileio::translators::TranslatorParameters() 
)

Translates prims at the specified paths, the operation conducted by the translator depends on which list you populate.

Parameters
importPathspaths you wish to import
teardownPathspaths you wish to teardown
paramare params which direct the translation of the prims
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::translatePrimsIntoMaya ( const AL::usd::utils::UsdPrimVector &  importPrims,
const SdfPathVector &  teardownPaths,
const fileio::translators::TranslatorParameters param = fileio::translators::TranslatorParameters() 
)

Translates prims at the specified paths, the operation conducted by the translator depends on which list you populate.

Parameters
importPrimsarray of prims you wish to import
teardownPathspaths you wish to teardown
paramare flags which direct the translation of the prims
fileio::translators::TranslatorManufacture& AL::usdmaya::nodes::ProxyShape::translatorManufacture ( )
inline

returns the plugin translator registry assigned to this shape

Returns
the translator registry
AL_USDMAYA_PUBLIC void AL::usdmaya::nodes::ProxyShape::unloadMayaReferences ( )

unloads all maya references

Todo:
I think we could remove this now? The only place this is used is within the post load process to ensure we don't duplicate any references in the scene. This can probably be removed.
UsdStageRefPtr AL::usdmaya::nodes::ProxyShape::usdStage ( ) const
inline

provides access to the UsdStage that this proxy shape is currently representing

Returns
the proxy shape

The documentation for this class was generated from the following file: