AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SchemaPrims.h
1 #pragma once
2 #include "AL/usdmaya/Common.h"
3 #include "AL/usdmaya/fileio/translators/TranslatorBase.h"
4 #include "AL/usdmaya/fileio/translators/TranslatorContext.h"
5 
6 #include <pxr/base/tf/token.h>
7 
8 #include <unordered_set>
9 #include <string>
10 
11 namespace AL {
12 namespace usdmaya {
13 namespace fileio {
14 
16 extern const TfToken ALCamera;
17 extern const TfToken ALSchemaType;
18 extern const TfToken ALExcludedPrimSchema;
19 
20 //----------------------------------------------------------------------------------------------------------------------
25 //----------------------------------------------------------------------------------------------------------------------
26 bool isSchemaPrim(const UsdPrim& prim);
27 
28 //----------------------------------------------------------------------------------------------------------------------
37 //----------------------------------------------------------------------------------------------------------------------
38 bool importSchemaPrim(
39  const UsdPrim& usdPrim,
40  MObject& parent,
41  MObject* created = 0,
42  translators::TranslatorContextPtr context = TfNullPtr,
43  const translators::TranslatorRefPtr translator = TfNullPtr);
44 
45 //----------------------------------------------------------------------------------------------------------------------
51 //----------------------------------------------------------------------------------------------------------------------
52 bool isSchemaOfType(const UsdPrim& prim, const TfToken& typeToken);
53 
54 //----------------------------------------------------------------------------------------------------------------------
57 //----------------------------------------------------------------------------------------------------------------------
59 {
60 public:
61 
64 
68  bool needsTransformParent(const UsdPrim& prim);
69 
70 private:
71  std::unordered_set<std::string> m_nonTransformParentTypes;
72 };
73 
74 
75 //----------------------------------------------------------------------------------------------------------------------
76 } // fileio
77 } // usdmaya
78 } // AL
79 //----------------------------------------------------------------------------------------------------------------------
bool importSchemaPrim(const UsdPrim &usdPrim, MObject &parent, MObject *created=0, translators::TranslatorContextPtr context=TfNullPtr, const translators::TranslatorRefPtr translator=TfNullPtr)
a method called to import a schema prim into maya
utility class to determine whether a usd transform chain should be created
Definition: SchemaPrims.h:58
bool isSchemaPrim(const UsdPrim &prim)
utility function to determine if a prim is one of our custom schema prims
bool isSchemaOfType(const UsdPrim &prim, const TfToken &typeToken)
utility function to determine whether the prim specified is of the given type
bool needsTransformParent(const UsdPrim &prim)
returns true if the prim specified requires a transform when importing custom nodes into the maya sce...