AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
DagNodeTranslator.h
1 #pragma once
2 #include "AL/usdmaya/fileio/translators/DgNodeTranslator.h"
3 #include "maya/MObject.h"
4 #include <pxr/base/tf/token.h>
5 
6 namespace AL {
7 namespace usdmaya {
8 namespace fileio {
9 namespace translators {
10 //----------------------------------------------------------------------------------------------------------------------
13 //----------------------------------------------------------------------------------------------------------------------
15  : public DgNodeTranslator
16 {
17 public:
18 
21  static MStatus registerType();
22 
29  MObject createNode(const UsdPrim& from, MObject parent, const char* nodeType, const ImporterParams& params) override;
30 
36  MStatus copyAttributes(const UsdPrim& from, MObject to, const ImporterParams& params);
37 
43  static MStatus copyAttributes(const MObject& from, UsdPrim& to, const ExporterParams& params)
44  { return MS::kSuccess; }
45 
49  MStatus applyDefaultMaterialOnShape(MObject shape);
50 
51 protected:
54  static MObject m_initialShadingGroup;
55 
57  static MObject m_visible;
58 };
59 
60 //----------------------------------------------------------------------------------------------------------------------
61 } // translators
62 } // fileio
63 } // usdmaya
64 } // AL
65 //----------------------------------------------------------------------------------------------------------------------
A class to transfer dag node data between Usd <–> Maya.
Definition: DagNodeTranslator.h:14
parameters for the exporter. These parameters are constructed by any command or file translator that ...
Definition: ExportParams.h:17
parameters for the importer
Definition: ImportParams.h:18
MStatus applyDefaultMaterialOnShape(MObject shape)
assign the default material to the shape specified
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. ...
static MObject m_initialShadingGroup
Definition: DagNodeTranslator.h:54
static MStatus registerType()
static type registration
MStatus copyAttributes(const UsdPrim &from, MObject to, const ImporterParams &params)
helper method to copy attributes from the UsdPrim to the Maya node
static MObject m_visible
the visibility attribute common to all dag nodes
Definition: DagNodeTranslator.h:57
static MStatus copyAttributes(const MObject &from, UsdPrim &to, const ExporterParams &params)
Copies data from the maya node onto the usd primitive.
Definition: DagNodeTranslator.h:43
Utility class that transfers DgNodes between Maya and USD.
Definition: DgNodeTranslator.h:30