AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Import.h
1 #pragma once
2 #include "AL/usdmaya/Common.h"
3 #include "AL/usdmaya/fileio/ImportParams.h"
4 
5 #include "maya/MPxCommand.h"
6 
7 #include <pxr/base/tf/token.h>
8 
9 namespace AL {
10 namespace usdmaya {
11 namespace fileio {
12 
13 //----------------------------------------------------------------------------------------------------------------------
16 //----------------------------------------------------------------------------------------------------------------------
17 class Import
18 {
19 public:
20 
24  Import(const ImporterParams& params);
25 
27  ~Import();
28 
30  inline operator bool () const
31  { return m_success; }
32 
33 private:
34  void doImport();
35  MStatus importTansform(const UsdPrim& prim, const MDagPath& parent);
36  const ImporterParams& m_params;
37  bool m_success;
38 };
39 
40 //----------------------------------------------------------------------------------------------------------------------
43 //----------------------------------------------------------------------------------------------------------------------
45  : public MPxCommand
46 {
47 public:
48  AL_MAYA_DECLARE_COMMAND();
49 
51  inline ImportCommand()
52  : m_params() {}
53 
55  inline ~ImportCommand()
56  {}
57 
58 private:
59  MStatus doIt(const MArgList& args);
60  MStatus redoIt();
61  MStatus undoIt();
62  bool isUndoable() const { return true; };
63  ImporterParams m_params;
64 };
65 
66 //----------------------------------------------------------------------------------------------------------------------
67 } // fileio
68 } // usdmaya
69 } // AL
70 //----------------------------------------------------------------------------------------------------------------------
71 
parameters for the importer
Definition: ImportParams.h:18
Import(const ImporterParams &params)
the ctor runs the main import process. Simply pass in a set of parameters that will determine what ma...
~ImportCommand()
dtor
Definition: Import.h:55
ImportCommand()
ctor
Definition: Import.h:51
A command to import a USD file into Maya (supporting A20 specific requirements)
Definition: Import.h:44
A class that performs the import of data from USD into Maya.
Definition: Import.h:17