AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
TranslatorTestType.h
1 #pragma once
2 
3 #include "pxr/usd/usd/typed.h"
4 #include "pxr/usd/usd/prim.h"
5 #include "pxr/usd/usd/stage.h"
6 #include "pxr/base/tf/token.h"
7 #include "pxr/base/tf/type.h"
8 
9 namespace AL {
10 namespace usdmaya {
11 namespace fileio {
12 namespace translators {
13 
14 //----------------------------------------------------------------------------------------------------------------------
15 #ifndef AL_GENERATING_DOCS
17  : public UsdTyped
18 {
19 public:
24  static const bool IsConcrete = true;
25 
30  explicit TranslatorTestType(const UsdPrim& prim=UsdPrim())
31  : UsdTyped(prim)
32  {
33  }
34 
38  explicit TranslatorTestType(const UsdSchemaBase& schemaObj)
39  : UsdTyped(schemaObj)
40  {
41  }
42 
44  virtual ~TranslatorTestType();
45 
49  static const TfTokenVector &
50  GetSchemaAttributeNames(bool includeInherited=true);
51 
61  static TranslatorTestType Get(const UsdStagePtr &stage, const SdfPath &path);
62 
85  static TranslatorTestType Define(const UsdStagePtr &stage, const SdfPath &path);
86 
87 private:
88  // needs to invoke _GetStaticTfType.
89  friend class UsdSchemaRegistry;
90  static const TfType &_GetStaticTfType();
91 
92  static bool _IsTypedSchema();
93 
94  // override SchemaBase virtuals.
95  virtual const TfType &_GetTfType() const;
96 };
97 #endif
98 
99 //----------------------------------------------------------------------------------------------------------------------
100 } // translators
101 } // fileio
102 } // usdmaya
103 } // AL
104 //----------------------------------------------------------------------------------------------------------------------
static const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
static TranslatorTestType Get(const UsdStagePtr &stage, const SdfPath &path)
Return a TranslatorTestType holding the prim adhering to this schema at path on stage. If no prim exists at path on stage, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:
Definition: TranslatorTestType.h:16
static const bool IsConcrete
Definition: TranslatorTestType.h:24
TranslatorTestType(const UsdSchemaBase &schemaObj)
Definition: TranslatorTestType.h:38
static TranslatorTestType Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
TranslatorTestType(const UsdPrim &prim=UsdPrim())
Definition: TranslatorTestType.h:30