All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
nodeGraphNodeAPI.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_NODEGRAPHNODEAPI_H
8#define USDUI_GENERATED_NODEGRAPHNODEAPI_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// NODEGRAPHNODEAPI //
34// -------------------------------------------------------------------------- //
35
48{
49public:
53 static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
54
59 explicit UsdUINodeGraphNodeAPI(const UsdPrim& prim=UsdPrim())
60 : UsdAPISchemaBase(prim)
61 {
62 }
63
67 explicit UsdUINodeGraphNodeAPI(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 // POS
158 // --------------------------------------------------------------------- //
180 USDUI_API
182
188 USDUI_API
189 UsdAttribute CreatePosAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
190
191public:
192 // --------------------------------------------------------------------- //
193 // STACKINGORDER
194 // --------------------------------------------------------------------- //
213 USDUI_API
215
221 USDUI_API
222 UsdAttribute CreateStackingOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
223
224public:
225 // --------------------------------------------------------------------- //
226 // DISPLAYCOLOR
227 // --------------------------------------------------------------------- //
238 USDUI_API
240
246 USDUI_API
247 UsdAttribute CreateDisplayColorAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
248
249public:
250 // --------------------------------------------------------------------- //
251 // ICON
252 // --------------------------------------------------------------------- //
266 USDUI_API
268
274 USDUI_API
275 UsdAttribute CreateIconAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
276
277public:
278 // --------------------------------------------------------------------- //
279 // EXPANSIONSTATE
280 // --------------------------------------------------------------------- //
295 USDUI_API
297
303 USDUI_API
304 UsdAttribute CreateExpansionStateAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
305
306public:
307 // --------------------------------------------------------------------- //
308 // SIZE
309 // --------------------------------------------------------------------- //
325 USDUI_API
327
333 USDUI_API
334 UsdAttribute CreateSizeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
335
336public:
337 // --------------------------------------------------------------------- //
338 // DOCURI
339 // --------------------------------------------------------------------- //
351 USDUI_API
353
359 USDUI_API
360 UsdAttribute CreateDocURIAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
361
362public:
363 // ===================================================================== //
364 // Feel free to add custom code below this line, it will be preserved by
365 // the code generator.
366 //
367 // Just remember to:
368 // - Close the class declaration with };
369 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
370 // - Close the include guard with #endif
371 // ===================================================================== //
372 // --(BEGIN CUSTOM CODE)--
373};
374
375PXR_NAMESPACE_CLOSE_SCOPE
376
377#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...
This api helps storing information about nodes in node graphs.
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 GetStackingOrderAttr() const
This optional value is a useful hint when an application cares about the visibility of a node and whe...
USDUI_API UsdAttribute CreateIconAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetIconAttr(), 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.
UsdUINodeGraphNodeAPI(const UsdSchemaBase &schemaObj)
Construct a UsdUINodeGraphNodeAPI on the prim held by schemaObj .
USDUI_API UsdAttribute GetPosAttr() const
Declared relative position to the parent in a node graph.
UsdUINodeGraphNodeAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdUINodeGraphNodeAPI on UsdPrim prim .
USDUI_API UsdAttribute CreateStackingOrderAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetStackingOrderAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDUI_API UsdAttribute CreateDocURIAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDocURIAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDUI_API UsdUINodeGraphNodeAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdUINodeGraphNodeAPI holding the prim adhering to this schema at path on stage.
static USDUI_API UsdUINodeGraphNodeAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
USDUI_API UsdAttribute GetIconAttr() const
This points to an image that should be displayed on the node.
USDUI_API UsdAttribute CreateDisplayColorAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDisplayColorAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDUI_API UsdAttribute GetExpansionStateAttr() const
The current expansionState of the node in the ui.
USDUI_API UsdAttribute GetDisplayColorAttr() const
This hint defines what tint the node should have in the node graph.
USDUI_API UsdAttribute GetDocURIAttr() const
A URI pointing to additional detailed documentation for this node or node type.
virtual USDUI_API ~UsdUINodeGraphNodeAPI()
Destructor.
USDUI_API UsdAttribute CreateSizeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSizeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
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 UsdAttribute GetSizeAttr() const
Optional size hint for a node in a node graph.
USDUI_API UsdAttribute CreatePosAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetPosAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDUI_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDUI_API UsdAttribute CreateExpansionStateAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetExpansionStateAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
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