AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Export.h
1 #pragma once
2 #include "AL/usdmaya/Common.h"
3 #include "AL/usdmaya/fileio/ExportParams.h"
4 
5 #include "maya/MPxCommand.h"
6 
7 namespace AL {
8 namespace usdmaya {
9 namespace fileio {
10 
11 //----------------------------------------------------------------------------------------------------------------------
14 //----------------------------------------------------------------------------------------------------------------------
15 class Export
16 {
17 public:
18 
21  Export(const ExporterParams& params);
22 
24  ~Export();
25 
26 private:
27  void exportSceneHierarchy(MDagPath path);
28  UsdPrim exportMesh(MDagPath path, const SdfPath& usdPath);
29  UsdPrim exportNurbsCurve(MDagPath path, const SdfPath& usdPath);
30  UsdPrim exportAssembly(MDagPath path, const SdfPath& usdPath);
31  UsdPrim exportPluginLocatorNode(MDagPath path, const SdfPath& usdPath);
32  UsdPrim exportPluginShape(MDagPath path, const SdfPath& usdPath);
33  UsdPrim exportCamera(MDagPath path, const SdfPath& usdPath);
34  void copyTransformParams(UsdPrim prim, MFnTransform& fnTransform);
35 
36  struct Impl;
37  void doExport();
38  const ExporterParams& m_params;
39  Impl* m_impl;
40 };
41 
42 //----------------------------------------------------------------------------------------------------------------------
45 //----------------------------------------------------------------------------------------------------------------------
47  : public MPxCommand
48 {
49 public:
50  AL_MAYA_DECLARE_COMMAND();
51 
53  ExportCommand();
54 
57 
58 private:
59  MStatus doIt(const MArgList& args);
60  MStatus redoIt();
61  MStatus undoIt();
62  bool isUndoable() const { return true; };
63  ExporterParams m_params;
64 };
65 
66 //----------------------------------------------------------------------------------------------------------------------
67 } // fileio
68 } // usdmaya
69 } // AL
70 //----------------------------------------------------------------------------------------------------------------------
parameters for the exporter. These parameters are constructed by any command or file translator that ...
Definition: ExportParams.h:17
A class that wraps up the entire export process.
Definition: Export.h:15
Export(const ExporterParams &params)
The constructor performs the export from Maya to USD based on the input parameters.
A thin MEL command layer that just wraps the AL::usdmaya::fileio::Export process. ...
Definition: Export.h:46