AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ImportTranslator.h
1 #pragma once
3 #include "AL/usdmaya/fileio/ImportParams.h"
4 
5 namespace AL {
6 namespace usdmaya {
7 namespace fileio {
8 
9 //----------------------------------------------------------------------------------------------------------------------
12 //----------------------------------------------------------------------------------------------------------------------
13 AL_MAYA_TRANSLATOR_BEGIN(ImportTranslator, "AL usdmaya import", true, false, "*.usda", "*.usdc;*.usda;*.usd;*.usdt");
14 
18 
21 
24 
25  // specify the option names (These will uniquely identify the exporter options)
26  static constexpr const char* const kParentPath = "Parent Path";
27  static constexpr const char* const kMeshes = "Import Meshes";
28  static constexpr const char* const kNurbsCurves = "Import Curves";
29  static constexpr const char* const kAnimations = "Import Animations";
30  static constexpr const char* const kDynamicAttributes = "Import Dynamic Attributes";
31 
35  static MStatus specifyOptions(maya::FileTranslatorOptions& options)
36  {
37  if(!options.addFrame("AL USD Importer Options")) return MS::kFailure;
38  if(!options.addString(kParentPath, "")) return MS::kFailure;
39  if(!options.addBool(kMeshes, true)) return MS::kFailure;
40  if(!options.addBool(kNurbsCurves, true)) return MS::kFailure;
41  if(!options.addBool(kAnimations, true)) return MS::kFailure;
42  if(!options.addBool(kDynamicAttributes, true)) return MS::kFailure;
43  return MS::kSuccess;
44  }
45 
46 private:
47  MStatus reader(const MFileObject& file, const maya::OptionsParser& options, FileAccessMode mode);
48  ImporterParams m_params;
49 
51 
52 //----------------------------------------------------------------------------------------------------------------------
53 } // fileio
54 } // usdmaya
55 } // AL
56 //----------------------------------------------------------------------------------------------------------------------
57 
#define AL_MAYA_TRANSLATOR_END()
Macro to wrap some boiler plate creation of a file translator.
Definition: FileTranslatorBase.h:98
#define AL_MAYA_TRANSLATOR_BEGIN(ClassName, TranslatorName, HaveRead, HaveWrite, DefaultExtension, FilterString)
Macro to wrap some boiler plate creation of a file translator.
Definition: FileTranslatorBase.h:84
This file contains a few macros and templates to help automate the tedious boiler plate setup of Maya...