HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
houdiniApexScene.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef USDHOUDINI_GENERATED_HOUDINIAPEXSCENE_H
8 #define USDHOUDINI_GENERATED_HOUDINIAPEXSCENE_H
9 
10 /// \file usdHoudini/houdiniApexScene.h
11 
12 #include "pxr/pxr.h"
13 #include "./api.h"
14 #include "pxr/usd/usd/typed.h"
15 #include "pxr/usd/usd/prim.h"
16 #include "pxr/usd/usd/stage.h"
17 #include "./tokens.h"
18 
19 #include "pxr/base/vt/value.h"
20 
21 #include "pxr/base/gf/vec3d.h"
22 #include "pxr/base/gf/vec3f.h"
23 #include "pxr/base/gf/matrix4d.h"
24 
25 #include "pxr/base/tf/token.h"
26 #include "pxr/base/tf/type.h"
27 
29 
30 class SdfAssetPath;
31 
32 // -------------------------------------------------------------------------- //
33 // HOUDINIAPEXSCENE //
34 // -------------------------------------------------------------------------- //
35 
36 /// \class UsdHoudiniHoudiniApexScene
37 ///
38 /// Houdini primitive schema representing an APEX animation scene.
39 ///
40 /// Characters can be bound to the scene via the
41 /// HoudiniApexCharacterBindingAPI multiple-apply API schema.
42 ///
43 ///
44 class
47 {
48 public:
49  /// Compile time constant representing what kind of schema this class is.
50  ///
51  /// \sa UsdSchemaKind
52  static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
53 
54  /// Construct a UsdHoudiniHoudiniApexScene on UsdPrim \p prim .
55  /// Equivalent to UsdHoudiniHoudiniApexScene::Get(prim.GetStage(), prim.GetPath())
56  /// for a \em valid \p prim, but will not immediately throw an error for
57  /// an invalid \p prim
58  explicit UsdHoudiniHoudiniApexScene(const UsdPrim& prim=UsdPrim())
59  : UsdTyped(prim)
60  {
61  }
62 
63  /// Construct a UsdHoudiniHoudiniApexScene on the prim held by \p schemaObj .
64  /// Should be preferred over UsdHoudiniHoudiniApexScene(schemaObj.GetPrim()),
65  /// as it preserves SchemaBase state.
66  explicit UsdHoudiniHoudiniApexScene(const UsdSchemaBase& schemaObj)
67  : UsdTyped(schemaObj)
68  {
69  }
70 
71  /// Destructor.
72  virtual ~UsdHoudiniHoudiniApexScene() override;
73 
74  /// Return a vector of names of all pre-declared attributes for this schema
75  /// class and all its ancestor classes. Does not include attributes that
76  /// may be authored by custom/extended methods of the schemas involved.
77  static const TfTokenVector &
78  GetSchemaAttributeNames(bool includeInherited=true);
79 
80  /// Return a UsdHoudiniHoudiniApexScene holding the prim adhering to this
81  /// schema at \p path on \p stage. If no prim exists at \p path on
82  /// \p stage, or if the prim at that path does not adhere to this schema,
83  /// return an invalid schema object. This is shorthand for the following:
84  ///
85  /// \code
86  /// UsdHoudiniHoudiniApexScene(stage->GetPrimAtPath(path));
87  /// \endcode
88  ///
90  Get(const UsdStagePtr &stage, const SdfPath &path);
91 
92  /// Attempt to ensure a \a UsdPrim adhering to this schema at \p path
93  /// is defined (according to UsdPrim::IsDefined()) on this stage.
94  ///
95  /// If a prim adhering to this schema at \p path is already defined on this
96  /// stage, return that prim. Otherwise author an \a SdfPrimSpec with
97  /// \a specifier == \a SdfSpecifierDef and this schema's prim type name for
98  /// the prim at \p path at the current EditTarget. Author \a SdfPrimSpec s
99  /// with \p specifier == \a SdfSpecifierDef and empty typeName at the
100  /// current EditTarget for any nonexistent, or existing but not \a Defined
101  /// ancestors.
102  ///
103  /// The given \a path must be an absolute prim path that does not contain
104  /// any variant selections.
105  ///
106  /// If it is impossible to author any of the necessary PrimSpecs, (for
107  /// example, in case \a path cannot map to the current UsdEditTarget's
108  /// namespace) issue an error and return an invalid \a UsdPrim.
109  ///
110  /// Note that this method may return a defined prim whose typeName does not
111  /// specify this schema class, in case a stronger typeName opinion overrides
112  /// the opinion at the current EditTarget.
113  ///
115  Define(const UsdStagePtr &stage, const SdfPath &path);
116 
117 protected:
118  /// Returns the kind of schema this class belongs to.
119  ///
120  /// \sa UsdSchemaKind
121  UsdSchemaKind _GetSchemaKind() const override;
122 
123 private:
124  // needs to invoke _GetStaticTfType.
125  friend class UsdSchemaRegistry;
126  static const TfType &_GetStaticTfType();
127 
128  static bool _IsTypedSchema();
129 
130  // override SchemaBase virtuals.
131  const TfType &_GetTfType() const override;
132 
133 public:
134  // --------------------------------------------------------------------- //
135  // SCENEFILES
136  // --------------------------------------------------------------------- //
137  /// List of geometry files to merge into the APEX scene. These are
138  /// loaded after the characters' geometry files (from
139  /// HoudiniApexCharacterAPI) and typically contain animation and
140  /// constraints.
141  ///
142  ///
143  /// | ||
144  /// | -- | -- |
145  /// | Declaration | `uniform asset[] sceneFiles = []` |
146  /// | C++ Type | VtArray<SdfAssetPath> |
147  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->AssetArray |
148  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
149  UsdAttribute GetSceneFilesAttr() const;
150 
151  /// See GetSceneFilesAttr(), and also
152  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
153  /// If specified, author \p defaultValue as the attribute's default,
154  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
155  /// the default for \p writeSparsely is \c false.
156  UsdAttribute CreateSceneFilesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
157 
158 public:
159  // --------------------------------------------------------------------- //
160  // INHERITANIMATIONLAYERS
161  // --------------------------------------------------------------------- //
162  /// For each entry in sceneFiles, indicates whether existing
163  /// animation layers are inherited from the input scene when applying
164  /// the scene delta.
165  ///
166  ///
167  /// | ||
168  /// | -- | -- |
169  /// | Declaration | `uniform bool[] inheritAnimationLayers = []` |
170  /// | C++ Type | VtArray<bool> |
171  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->BoolArray |
172  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
173  UsdAttribute GetInheritAnimationLayersAttr() const;
174 
175  /// See GetInheritAnimationLayersAttr(), and also
176  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
177  /// If specified, author \p defaultValue as the attribute's default,
178  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
179  /// the default for \p writeSparsely is \c false.
180  UsdAttribute CreateInheritAnimationLayersAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
181 
182 public:
183  // ===================================================================== //
184  // Feel free to add custom code below this line, it will be preserved by
185  // the code generator.
186  //
187  // Just remember to:
188  // - Close the class declaration with };
189  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
190  // - Close the include guard with #endif
191  // ===================================================================== //
192  // --(BEGIN CUSTOM CODE)--
193 };
194 
196 
197 #endif
#define USDHOUDINI_API
Definition: api.h:23
UsdHoudiniHoudiniApexScene(const UsdSchemaBase &schemaObj)
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
UsdHoudiniHoudiniApexScene(const UsdPrim &prim=UsdPrim())
Represents a concrete typed schema.
Definition: prim.h:116
Definition: typed.h:44
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
Definition: path.h:280
UsdSchemaKind
Definition: common.h:112
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: type.h:47
Definition: value.h:89