All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sceneGraphPrimAPI.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 USDUI_GENERATED_SCENEGRAPHPRIMAPI_H
8#define USDUI_GENERATED_SCENEGRAPHPRIMAPI_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdUI/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// SCENEGRAPHPRIMAPI //
34// -------------------------------------------------------------------------- //
35
48{
49public:
53 static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
54
59 explicit UsdUISceneGraphPrimAPI(const UsdPrim& prim=UsdPrim())
60 : UsdAPISchemaBase(prim)
61 {
62 }
63
67 explicit UsdUISceneGraphPrimAPI(const UsdSchemaBase& schemaObj)
68 : UsdAPISchemaBase(schemaObj)
69 {
70 }
71
73 USDUI_API
75
79 USDUI_API
80 static const TfTokenVector &
81 GetSchemaAttributeNames(bool includeInherited=true);
82
92 USDUI_API
94 Get(const UsdStagePtr &stage, const SdfPath &path);
95
96
113 USDUI_API
114 static bool
115 CanApply(const UsdPrim &prim, std::string *whyNot=nullptr);
116
132 USDUI_API
134 Apply(const UsdPrim &prim);
135
136protected:
140 USDUI_API
142
143private:
144 // needs to invoke _GetStaticTfType.
145 friend class UsdSchemaRegistry;
146 USDUI_API
147 static const TfType &_GetStaticTfType();
148
149 static bool _IsTypedSchema();
150
151 // override SchemaBase virtuals.
152 USDUI_API
153 const TfType &_GetTfType() const override;
154
155public:
156 // --------------------------------------------------------------------- //
157 // DISPLAYNAME
158 // --------------------------------------------------------------------- //
169 USDUI_API
171
177 USDUI_API
178 UsdAttribute CreateDisplayNameAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
179
180public:
181 // --------------------------------------------------------------------- //
182 // DISPLAYGROUP
183 // --------------------------------------------------------------------- //
196 USDUI_API
198
204 USDUI_API
205 UsdAttribute CreateDisplayGroupAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
206
207public:
208 // ===================================================================== //
209 // Feel free to add custom code below this line, it will be preserved by
210 // the code generator.
211 //
212 // Just remember to:
213 // - Close the class declaration with };
214 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
215 // - Close the include guard with #endif
216 // ===================================================================== //
217 // --(BEGIN CUSTOM CODE)--
218};
219
220PXR_NAMESPACE_CLOSE_SCOPE
221
222#endif
Contains an asset path and an optional resolved path.
Definition: assetPath.h:30
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
TfType represents a dynamic runtime type.
Definition: type.h:48
The base class for all API schemas.
Definition: apiSchemaBase.h:99
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:160
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...
Utility schema for display properties of a prim.
USDUI_API UsdAttribute CreateDisplayNameAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDisplayNameAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdUISceneGraphPrimAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdUISceneGraphPrimAPI on UsdPrim prim .
static USDUI_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...
USDUI_API UsdAttribute GetDisplayGroupAttr() const
When publishing a nodegraph or a material, it can be useful to provide an optional display group,...
USDUI_API UsdAttribute CreateDisplayGroupAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDisplayGroupAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
virtual USDUI_API ~UsdUISceneGraphPrimAPI()
Destructor.
USDUI_API UsdAttribute GetDisplayNameAttr() const
When publishing a nodegraph or a material, it can be useful to provide an optional display name,...
UsdUISceneGraphPrimAPI(const UsdSchemaBase &schemaObj)
Construct a UsdUISceneGraphPrimAPI on the prim held by schemaObj .
static USDUI_API UsdUISceneGraphPrimAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdUISceneGraphPrimAPI holding the prim adhering to this schema at path on stage.
static USDUI_API bool CanApply(const UsdPrim &prim, std::string *whyNot=nullptr)
Returns true if this single-apply API schema can be applied to the given prim.
USDUI_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static USDUI_API UsdUISceneGraphPrimAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
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:440