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"
17 #include "pxr/usd/usdUI/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 
28 PXR_NAMESPACE_OPEN_SCOPE
29 
30 class SdfAssetPath;
31 
32 // -------------------------------------------------------------------------- //
33 // NODEGRAPHNODEAPI //
34 // -------------------------------------------------------------------------- //
35 
48 {
49 public:
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
74  virtual ~UsdUINodeGraphNodeAPI();
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
133  static UsdUINodeGraphNodeAPI
134  Apply(const UsdPrim &prim);
135 
136 protected:
140  USDUI_API
141  UsdSchemaKind _GetSchemaKind() const override;
142 
143 private:
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 
155 public:
156  // --------------------------------------------------------------------- //
157  // POS
158  // --------------------------------------------------------------------- //
180  USDUI_API
181  UsdAttribute GetPosAttr() const;
182 
188  USDUI_API
189  UsdAttribute CreatePosAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
190 
191 public:
192  // --------------------------------------------------------------------- //
193  // STACKINGORDER
194  // --------------------------------------------------------------------- //
213  USDUI_API
215 
221  USDUI_API
222  UsdAttribute CreateStackingOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
223 
224 public:
225  // --------------------------------------------------------------------- //
226  // DISPLAYCOLOR
227  // --------------------------------------------------------------------- //
238  USDUI_API
240 
246  USDUI_API
247  UsdAttribute CreateDisplayColorAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
248 
249 public:
250  // --------------------------------------------------------------------- //
251  // ICON
252  // --------------------------------------------------------------------- //
266  USDUI_API
267  UsdAttribute GetIconAttr() const;
268 
274  USDUI_API
275  UsdAttribute CreateIconAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
276 
277 public:
278  // --------------------------------------------------------------------- //
279  // EXPANSIONSTATE
280  // --------------------------------------------------------------------- //
295  USDUI_API
297 
303  USDUI_API
304  UsdAttribute CreateExpansionStateAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
305 
306 public:
307  // --------------------------------------------------------------------- //
308  // SIZE
309  // --------------------------------------------------------------------- //
325  USDUI_API
326  UsdAttribute GetSizeAttr() const;
327 
333  USDUI_API
334  UsdAttribute CreateSizeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
335 
336 public:
337  // --------------------------------------------------------------------- //
338  // DOCURI
339  // --------------------------------------------------------------------- //
351  USDUI_API
352  UsdAttribute GetDocURIAttr() const;
353 
359  USDUI_API
360  UsdAttribute CreateDocURIAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
361 
362 public:
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 
375 PXR_NAMESPACE_CLOSE_SCOPE
376 
377 #endif
USDUI_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
This api helps storing information about nodes in node graphs.
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.
USDUI_API UsdAttribute GetExpansionStateAttr() const
The current expansionState of the node in the ui.
USDUI_API UsdAttribute GetPosAttr() const
Declared relative position to the parent in a node graph.
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...
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.
The base class for all API schemas.
Definition: apiSchemaBase.h:94
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
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 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 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.
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
USDUI_API UsdAttribute GetDisplayColorAttr() const
This hint defines what tint the node should have in the node graph.
UsdUINodeGraphNodeAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdUINodeGraphNodeAPI on UsdPrim prim .
Single Apply API schema.
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.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:489
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:280
USDUI_API UsdAttribute GetSizeAttr() const
Optional size hint for a node in a node graph.
Contains an asset path and optional evaluated and resolved paths.
Definition: assetPath.h:78
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.
UsdUINodeGraphNodeAPI(const UsdSchemaBase &schemaObj)
Construct a UsdUINodeGraphNodeAPI on the prim held by schemaObj .
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.
virtual USDUI_API ~UsdUINodeGraphNodeAPI()
Destructor.
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.
TfType represents a dynamic runtime type.
Definition: type.h:47
Singleton registry that provides access to schema type information and the prim definitions for regis...
USDUI_API UsdAttribute GetDocURIAttr() const
A URI pointing to additional detailed documentation for this node or node type.
The base class for all schema types in Usd.
Definition: schemaBase.h:39
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:89
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
USDUI_API UsdAttribute GetStackingOrderAttr() const
This optional value is a useful hint when an application cares about the visibility of a node and whe...