AL_USDMaya  0.29.4
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TranslatorTestType.h
1 //
2 // Copyright 2017 Animal Logic
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.//
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 #pragma once
17 
18 #include "../../Api.h"
19 
20 #include "pxr/pxr.h"
21 #include "pxr/usd/usd/typed.h"
22 #include "pxr/usd/usd/prim.h"
23 #include "pxr/usd/usd/stage.h"
24 #include "pxr/base/tf/token.h"
25 #include "pxr/base/tf/type.h"
26 
27 PXR_NAMESPACE_USING_DIRECTIVE
28 
29 
30 namespace AL {
31 namespace usdmaya {
32 namespace fileio {
33 namespace translators {
34 
35 //----------------------------------------------------------------------------------------------------------------------
36 #ifndef AL_GENERATING_DOCS
38  : public UsdTyped
39 {
40 public:
45  AL_USDMAYA_PUBLIC
46  static const bool IsConcrete = true;
47 
52  explicit TranslatorTestType(const UsdPrim& prim=UsdPrim())
53  : UsdTyped(prim)
54  {
55  }
56 
60  explicit TranslatorTestType(const UsdSchemaBase& schemaObj)
61  : UsdTyped(schemaObj)
62  {
63  }
64 
66  AL_USDMAYA_PUBLIC
67  virtual ~TranslatorTestType();
68 
72  AL_USDMAYA_PUBLIC
73  static const TfTokenVector& GetSchemaAttributeNames(bool includeInherited = true);
74 
84  AL_USDMAYA_PUBLIC
85  static TranslatorTestType Get(const UsdStagePtr &stage, const SdfPath &path);
86 
109  AL_USDMAYA_PUBLIC
110  static TranslatorTestType Define(const UsdStagePtr &stage, const SdfPath &path);
111 
112 private:
113  // needs to invoke _GetStaticTfType.
114  friend class UsdSchemaRegistry;
115  static const TfType &_GetStaticTfType();
116 
117  static bool _IsTypedSchema();
118 
119  // override SchemaBase virtuals.
120  virtual const TfType &_GetTfType() const;
121 };
122 #endif
123 
124 //----------------------------------------------------------------------------------------------------------------------
125 } // translators
126 } // fileio
127 } // usdmaya
128 } // AL
129 //----------------------------------------------------------------------------------------------------------------------
static AL_USDMAYA_PUBLIC const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
static AL_USDMAYA_PUBLIC 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...
Definition: TranslatorTestType.h:37
TranslatorTestType(const UsdSchemaBase &schemaObj)
Definition: TranslatorTestType.h:60
static AL_USDMAYA_PUBLIC 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:
virtual AL_USDMAYA_PUBLIC ~TranslatorTestType()
Destructor.
static AL_USDMAYA_PUBLIC const bool IsConcrete
Definition: TranslatorTestType.h:46
TranslatorTestType(const UsdPrim &prim=UsdPrim())
Definition: TranslatorTestType.h:52