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

A class to transfer dag node data between Usd <–> Maya. More...

#include <DagNodeTranslator.h>

Inheritance diagram for AL::usdmaya::fileio::translators::DagNodeTranslator:
AL::usdmaya::fileio::translators::DgNodeTranslator AL::usdmaya::fileio::translators::TransformTranslator

Public Member Functions

AL_USDMAYA_PUBLIC MObject createNode (const UsdPrim &from, MObject parent, const char *nodeType, const ImporterParams &params) override
 Creates a new maya node of the given type and set attributes based on input prim. More...
 
AL_USDMAYA_PUBLIC MStatus copyAttributes (const UsdPrim &from, MObject to, const ImporterParams &params)
 helper method to copy attributes from the UsdPrim to the Maya node More...
 
AL_USDMAYA_PUBLIC MStatus applyDefaultMaterialOnShape (MObject shape)
 assign the default material to the shape specified More...
 
- Public Member Functions inherited from AL::usdmaya::fileio::translators::DgNodeTranslator
AL_USDMAYA_PUBLIC MStatus copyAttributes (const UsdPrim &from, MObject to, const ImporterParams &params)
 helper method to copy attributes from the UsdPrim to the Maya node More...
 
virtual AL_USDMAYA_PUBLIC bool attributeHandled (const UsdAttribute &usdAttr)
 A temporary solution. Given a custom attribute, if a translator handles it somehow (i.e. lazy approach to not creating a schema), then overload this method and return true on the attribute you are handling. This will prevent the attribute from being imported/exported as a dynamic attribute. More...
 

Static Public Member Functions

static AL_USDMAYA_PUBLIC MStatus registerType ()
 static type registration More...
 
static MStatus copyAttributes (const MObject &from, UsdPrim &to, const ExporterParams &params)
 Copies data from the maya node onto the usd primitive. More...
 
static AL_USDMAYA_PUBLIC void initialiseDefaultShadingGroup (MObject &target)
 
- Static Public Member Functions inherited from AL::usdmaya::fileio::translators::DgNodeTranslator
static AL_USDMAYA_PUBLIC MStatus registerType ()
 static type registration More...
 
static AL_USDMAYA_PUBLIC MStatus copyAttributes (const MObject &from, UsdPrim &to, const ExporterParams &params)
 Copies data from the maya node onto the usd primitive. More...
 

Static Protected Attributes

static MObject m_initialShadingGroup
 
static MObject m_visible
 the visibility attribute common to all dag nodes
 

Detailed Description

A class to transfer dag node data between Usd <–> Maya.

Member Function Documentation

AL_USDMAYA_PUBLIC MStatus AL::usdmaya::fileio::translators::DagNodeTranslator::applyDefaultMaterialOnShape ( MObject  shape)

assign the default material to the shape specified

Parameters
shapethe maya shape to assign a material to
Returns
MS::kSuccess if ok
AL_USDMAYA_PUBLIC MStatus AL::usdmaya::fileio::translators::DagNodeTranslator::copyAttributes ( const UsdPrim &  from,
MObject  to,
const ImporterParams params 
)

helper method to copy attributes from the UsdPrim to the Maya node

Parameters
fromthe UsdPrim to copy the data from
tothe maya node to copy the data to
paramsthe importer params to determine what to import
Returns
MS::kSuccess if ok
static MStatus AL::usdmaya::fileio::translators::DagNodeTranslator::copyAttributes ( const MObject &  from,
UsdPrim &  to,
const ExporterParams params 
)
inlinestatic

Copies data from the maya node onto the usd primitive.

Parameters
fromthe maya node to copy the data from
tothe USD prim to copy the attributes to
paramsthe exporter params to determine what should be exported
Returns
MS::kSuccess if ok
AL_USDMAYA_PUBLIC MObject AL::usdmaya::fileio::translators::DagNodeTranslator::createNode ( const UsdPrim &  from,
MObject  parent,
const char *  nodeType,
const ImporterParams params 
)
overridevirtual

Creates a new maya node of the given type and set attributes based on input prim.

Parameters
fromthe UsdPrim to copy the data from
parentthe parent Dag node to parent the newly created object under
nodeTypethe maya node type to create
paramsthe importer params that determines what will be imported
Returns
the newly created node

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

Reimplemented in AL::usdmaya::fileio::translators::TransformTranslator.

static AL_USDMAYA_PUBLIC MStatus AL::usdmaya::fileio::translators::DagNodeTranslator::registerType ( )
static

static type registration

Returns
MS::kSuccess if ok

Member Data Documentation

MObject AL::usdmaya::fileio::translators::DagNodeTranslator::m_initialShadingGroup
staticprotected

an MObject handle to the initial shading group, which can be assigned to newly imported geometry so that default shading is applied to the shading group


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