AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AL::usdmaya::fileio::translators::TranslatorTestPlugin Class Reference
Inheritance diagram for AL::usdmaya::fileio::translators::TranslatorTestPlugin:
AL::usdmaya::fileio::translators::TranslatorBase AL::usdmaya::fileio::translators::TranslatorAbstract

Public Types

typedef TranslatorTestPlugin This
 
typedef TfRefPtr< ThisRefPtr
 
typedef TfWeakPtr< ThisPtr
 
- Public Types inherited from AL::usdmaya::fileio::translators::TranslatorBase
typedef TranslatorBase This
 
typedef TfRefPtr< ThisRefPtr
 
- Public Types inherited from AL::usdmaya::fileio::translators::TranslatorAbstract
typedef TranslatorAbstract This
 this type
 
typedef TfRefPtr< ThisRefPtr
 the type of a reference this type
 
typedef TfWeakPtr< ThisPtr
 weak pointer to this type
 

Public Member Functions

MStatus initialize () override
 Override this to do a one time initialization of your translator. Primarily this is to allow you to extract some MObject attribute handles from an MNodeClass, to avoid the need for calling findPlug at runtime (and the inherent cost of the strcmps/hash lookup that entails) More...
 
MStatus import (const UsdPrim &prim, MObject &parent) override
 Override this method to import a prim into your scene. More...
 
MStatus postImport (const UsdPrim &prim) override
 If your node needs to set up any relationships after import (for example, adding the node to a set, or making attribute connections), then all of that work should be performed here. More...
 
MStatus preTearDown (UsdPrim &path) override
 This method will be called prior to the tear down process taking place. This is the last chance you have to do any serialisation whilst all of the existing nodes are available to query. More...
 
MStatus tearDown (const SdfPath &path) override
 If your plugin creates any nodes within Maya, then this method should be overridden to remove those nodes. This forms a central role within the variant switching system. More...
 
- Public Member Functions inherited from AL::usdmaya::fileio::translators::TranslatorBase
virtual ~TranslatorBase ()
 dtor
 
virtual TfType getTranslatedType () const override
 returns the translated prim type
 
virtual TranslatorContextPtr context () const
 returns the context currently being used to translate the USD prims. The context can be used to add references to prims you have created in your translator plugins (see:
 
UsdStageRefPtr getUsdStage () const
 return the usd stage associated with this context More...
 
- Public Member Functions inherited from AL::usdmaya::fileio::translators::TranslatorAbstract
virtual ~TranslatorAbstract ()
 dtor
 
virtual bool needsTransformParent () const
 if the custom node type you are importing requires a parent transform (e.g. you are importing a shape node), then this method should return true. If however you do not need a parent transform (e.g. you are importing a texture!), then you can return false here. More...
 
virtual bool supportsUpdate () const
 override this method and return true if the translator supports update More...
 
virtual MStatus update (const UsdPrim &prim)
 Optionally override this method to copy the attribute values from the prim onto the Maya nodes you have created. More...
 

Static Public Member Functions

static RefPtr create (TranslatorContextPtr context)
 
- Static Public Member Functions inherited from AL::usdmaya::fileio::translators::TranslatorBase
static RefPtr manufacture (const std::string &primType, TranslatorContextPtr context)=delete
 Internal method used to create a new instance of a plugin translator. More...
 

Additional Inherited Members

- Protected Member Functions inherited from AL::usdmaya::fileio::translators::TranslatorBase
virtual void setTranslatedType (const TfType &translatedType)
 internal method. Used within AL_USDMAYA_DEFINE_TRANSLATOR macro to set the schema type of the node we translate. More...
 
virtual void setContext (const TranslatorContextPtr context)
 internal method. Used within AL_USDMAYA_DEFINE_TRANSLATOR macro to set the translation context More...
 

Member Function Documentation

MStatus AL::usdmaya::fileio::translators::TranslatorTestPlugin::import ( const UsdPrim &  prim,
MObject &  parent 
)
overridevirtual

Override this method to import a prim into your scene.

Parameters
primthe usd prim to be imported into maya
parenta handle to an MObject that represents an AL_usd_Transform node. You should parent your DAG objects under this node. If the prim you are importing is NOT a DAG object (e.g. surface shader, etc), then you can ignore this parameter.
Returns
MS::kSuccess if all ok

Reimplemented from AL::usdmaya::fileio::translators::TranslatorAbstract.

MStatus AL::usdmaya::fileio::translators::TranslatorTestPlugin::initialize ( )
overridevirtual

Override this to do a one time initialization of your translator. Primarily this is to allow you to extract some MObject attribute handles from an MNodeClass, to avoid the need for calling findPlug at runtime (and the inherent cost of the strcmps/hash lookup that entails)

Returns
MS::kSuccess if all ok

Reimplemented from AL::usdmaya::fileio::translators::TranslatorAbstract.

MStatus AL::usdmaya::fileio::translators::TranslatorTestPlugin::postImport ( const UsdPrim &  prim)
overridevirtual

If your node needs to set up any relationships after import (for example, adding the node to a set, or making attribute connections), then all of that work should be performed here.

Parameters
primthe prim we are importing.
Returns
MS::kSuccess if all ok

Reimplemented from AL::usdmaya::fileio::translators::TranslatorAbstract.

MStatus AL::usdmaya::fileio::translators::TranslatorTestPlugin::preTearDown ( UsdPrim &  prim)
overridevirtual

This method will be called prior to the tear down process taking place. This is the last chance you have to do any serialisation whilst all of the existing nodes are available to query.

Parameters
primthe prim that may be modified or deleted as a result of a variant switch
Returns
MS::kSuccess if all ok

Reimplemented from AL::usdmaya::fileio::translators::TranslatorAbstract.

MStatus AL::usdmaya::fileio::translators::TranslatorTestPlugin::tearDown ( const SdfPath &  path)
overridevirtual

If your plugin creates any nodes within Maya, then this method should be overridden to remove those nodes. This forms a central role within the variant switching system.

Parameters
paththe path to the prim that should be removed. CRASH_ALERT : It is vitally important that you do not attempt to access the prim from the current usd stage. It is entirely possible that a variant switch has removed the prim from the stage, so any attempts to access the UsdPrim via this path, is more than likely to crash Maya.
Returns
MS::kSuccess if all ok

Reimplemented from AL::usdmaya::fileio::translators::TranslatorAbstract.


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