AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NodeFactory.h
1 #pragma once
2 #include "AL/usdmaya/Common.h"
3 #include <string>
4 #include <unordered_map>
5 
6 namespace AL {
7 namespace usdmaya {
8 namespace fileio {
9 
10 //----------------------------------------------------------------------------------------------------------------------
14 //----------------------------------------------------------------------------------------------------------------------
16 {
18  NodeFactory();
19 
21  ~NodeFactory();
22 
27  MObject createNode(const UsdPrim& from, const char* const nodeType, MObject parent);
28 
32  void setImportParams(const ImporterParams* params)
33  { m_params = params; }
34 
35 private:
36  std::unordered_map<std::string, translators::DgNodeTranslator*> m_builders;
37  const ImporterParams* m_params;
38 };
39 
40 //----------------------------------------------------------------------------------------------------------------------
43 //----------------------------------------------------------------------------------------------------------------------
44 NodeFactory& getNodeFactory();
45 
46 //----------------------------------------------------------------------------------------------------------------------
48 //----------------------------------------------------------------------------------------------------------------------
49 void freeNodeFactory();
50 
51 //----------------------------------------------------------------------------------------------------------------------
52 } // fileio
53 } // usdmaya
54 } // AL
55 //----------------------------------------------------------------------------------------------------------------------
56 
parameters for the importer
Definition: ImportParams.h:18
A simple node factory to convert nodes between Maya and USD.
Definition: NodeFactory.h:15
MObject createNode(const UsdPrim &from, const char *const nodeType, MObject parent)
create a node
void setImportParams(const ImporterParams *params)
Some of the translators rely on import settings specified in the import params. Prior to use of this ...
Definition: NodeFactory.h:32
NodeFactory()
ctor. Currently initialises the inbuilt translators.