Loading...
Searching...
No Matches
switchController.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 EXECIR_GENERATED_SWITCHCONTROLLER_H
8#define EXECIR_GENERATED_SWITCHCONTROLLER_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/exec/execIr/api.h"
15#include "pxr/usd/usd/prim.h"
16#include "pxr/usd/usd/stage.h"
18
19#include "pxr/base/vt/value.h"
20
21#include "pxr/base/gf/vec3d.h"
22#include "pxr/base/gf/vec3f.h"
24
25#include "pxr/base/tf/token.h"
26#include "pxr/base/tf/type.h"
27
28PXR_NAMESPACE_OPEN_SCOPE
29
30class SdfAssetPath;
31
32// -------------------------------------------------------------------------- //
33// IRSWITCHCONTROLLER //
34// -------------------------------------------------------------------------- //
35
62{
63public:
68
73 explicit ExecIrSwitchController(const UsdPrim& prim=UsdPrim())
74 : ExecIrController(prim)
75 {
76 }
77
81 explicit ExecIrSwitchController(const UsdSchemaBase& schemaObj)
82 : ExecIrController(schemaObj)
83 {
84 }
85
87 EXECIR_API
89
93 EXECIR_API
94 static const TfTokenVector &
95 GetSchemaAttributeNames(bool includeInherited=true);
96
106 EXECIR_API
108 Get(const UsdStagePtr &stage, const SdfPath &path);
109
132 EXECIR_API
134 Define(const UsdStagePtr &stage, const SdfPath &path);
135
136protected:
140 EXECIR_API
142
143private:
144 // needs to invoke _GetStaticTfType.
145 friend class UsdSchemaRegistry;
146 EXECIR_API
147 static const TfType &_GetStaticTfType();
148
149 static bool _IsTypedSchema();
150
151 // override SchemaBase virtuals.
152 EXECIR_API
153 const TfType &_GetTfType() const override;
154
155public:
156 // --------------------------------------------------------------------- //
157 // SWITCH
158 // --------------------------------------------------------------------- //
170 EXECIR_API
172
178 EXECIR_API
179 UsdAttribute CreateSwitchAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
180
181public:
182 // --------------------------------------------------------------------- //
183 // RIG1SPACE
184 // --------------------------------------------------------------------- //
194 EXECIR_API
196
202 EXECIR_API
203 UsdAttribute CreateRig1SpaceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
204
205public:
206 // --------------------------------------------------------------------- //
207 // RIG2SPACE
208 // --------------------------------------------------------------------- //
218 EXECIR_API
220
226 EXECIR_API
227 UsdAttribute CreateRig2SpaceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
228
229public:
230 // --------------------------------------------------------------------- //
231 // OUTSPACE
232 // --------------------------------------------------------------------- //
243 EXECIR_API
245
251 EXECIR_API
252 UsdAttribute CreateOutSpaceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
253
254public:
255 // ===================================================================== //
256 // Feel free to add custom code below this line, it will be preserved by
257 // the code generator.
258 //
259 // Just remember to:
260 // - Close the class declaration with };
261 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
262 // - Close the include guard with #endif
263 // ===================================================================== //
264 // --(BEGIN CUSTOM CODE)--
265};
266
267PXR_NAMESPACE_CLOSE_SCOPE
268
269#endif
An abstract schema that represents an invertible controller.
Definition controller.h:51
An invertible controller that can determine which of several rigs are active at a given time,...
static EXECIR_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
virtual EXECIR_API ~ExecIrSwitchController()
Destructor.
EXECIR_API UsdAttribute CreateOutSpaceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetOutSpaceAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
EXECIR_API UsdAttribute CreateRig2SpaceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetRig2SpaceAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
EXECIR_API UsdAttribute GetSwitchAttr() const
The value of this attribute determines which rig is selected at any given time.
static EXECIR_API ExecIrSwitchController Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
EXECIR_API UsdAttribute CreateSwitchAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSwitchAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static EXECIR_API ExecIrSwitchController Get(const UsdStagePtr &stage, const SdfPath &path)
Return a ExecIrSwitchController holding the prim adhering to this schema at path on stage.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
ExecIrSwitchController(const UsdPrim &prim=UsdPrim())
Construct a ExecIrSwitchController on UsdPrim prim .
EXECIR_API UsdAttribute GetRig2SpaceAttr() const
Takes as input the value of rig2's 'out:posed' space.
EXECIR_API UsdAttribute GetRig1SpaceAttr() const
Takes as input the value of rig1's 'out:posed' space.
ExecIrSwitchController(const UsdSchemaBase &schemaObj)
Construct a ExecIrSwitchController on the prim held by schemaObj .
EXECIR_API UsdAttribute GetOutSpaceAttr() const
Produces either the value of 'rig1:space' or 'rig2:space' depending on the value of the 'switch' attr...
EXECIR_API UsdAttribute CreateRig1SpaceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetRig1SpaceAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
EXECIR_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
Contains an asset path and optional evaluated and resolved paths.
Definition assetPath.h:79
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
TfType represents a dynamic runtime type.
Definition type.h:48
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition attribute.h:183
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition prim.h:117
The base class for all schema types in Usd.
Definition schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition value.h:90
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition common.h:112
@ ConcreteTyped
Represents a concrete typed schema.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition token.h:489