product.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 USDRENDER_GENERATED_PRODUCT_H
8 #define USDRENDER_GENERATED_PRODUCT_H
9 
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/usdRender/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"
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 // RENDERPRODUCT //
34 // -------------------------------------------------------------------------- //
35 
57 {
58 public:
63 
68  explicit UsdRenderProduct(const UsdPrim& prim=UsdPrim())
69  : UsdRenderSettingsBase(prim)
70  {
71  }
72 
76  explicit UsdRenderProduct(const UsdSchemaBase& schemaObj)
77  : UsdRenderSettingsBase(schemaObj)
78  {
79  }
80 
82  USDRENDER_API
83  virtual ~UsdRenderProduct();
84 
88  USDRENDER_API
89  static const TfTokenVector &
90  GetSchemaAttributeNames(bool includeInherited=true);
91 
101  USDRENDER_API
102  static UsdRenderProduct
103  Get(const UsdStagePtr &stage, const SdfPath &path);
104 
127  USDRENDER_API
128  static UsdRenderProduct
129  Define(const UsdStagePtr &stage, const SdfPath &path);
130 
131 protected:
135  USDRENDER_API
136  UsdSchemaKind _GetSchemaKind() const override;
137 
138 private:
139  // needs to invoke _GetStaticTfType.
140  friend class UsdSchemaRegistry;
141  USDRENDER_API
142  static const TfType &_GetStaticTfType();
143 
144  static bool _IsTypedSchema();
145 
146  // override SchemaBase virtuals.
147  USDRENDER_API
148  const TfType &_GetTfType() const override;
149 
150 public:
151  // --------------------------------------------------------------------- //
152  // PRODUCTTYPE
153  // --------------------------------------------------------------------- //
174  USDRENDER_API
176 
182  USDRENDER_API
183  UsdAttribute CreateProductTypeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
184 
185 public:
186  // --------------------------------------------------------------------- //
187  // PRODUCTNAME
188  // --------------------------------------------------------------------- //
199  USDRENDER_API
201 
207  USDRENDER_API
208  UsdAttribute CreateProductNameAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
209 
210 public:
211  // --------------------------------------------------------------------- //
212  // ORDEREDVARS
213  // --------------------------------------------------------------------- //
219  USDRENDER_API
221 
224  USDRENDER_API
226 
227 public:
228  // ===================================================================== //
229  // Feel free to add custom code below this line, it will be preserved by
230  // the code generator.
231  //
232  // Just remember to:
233  // - Close the class declaration with };
234  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
235  // - Close the include guard with #endif
236  // ===================================================================== //
237  // --(BEGIN CUSTOM CODE)--
238 };
239 
240 PXR_NAMESPACE_CLOSE_SCOPE
241 
242 #endif
static USDRENDER_API UsdRenderProduct Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
static USDRENDER_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 const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: product.h:62
A UsdRenderProduct describes an image or other file-like artifact produced by a render.
Definition: product.h:56
USDRENDER_API UsdRelationship GetOrderedVarsRel() const
Specifies the RenderVars that should be consumed and combined into the final product.
static USDRENDER_API UsdRenderProduct Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdRenderProduct holding the prim adhering to this schema at path on stage.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
Abstract base class that defines render settings that can be specified on either a RenderSettings pri...
Definition: settingsBase.h:47
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
USDRENDER_API UsdAttribute CreateProductNameAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetProductNameAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDRENDER_API UsdAttribute GetProductNameAttr() const
Specifies the name that the output/display driver should give the product.
UsdRenderProduct(const UsdSchemaBase &schemaObj)
Construct a UsdRenderProduct on the prim held by schemaObj .
Definition: product.h:76
USDRENDER_API UsdAttribute CreateProductTypeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetProductTypeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
Represents a concrete typed schema.
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
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:280
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Definition: relationship.h:111
virtual USDRENDER_API ~UsdRenderProduct()
Destructor.
UsdRenderProduct(const UsdPrim &prim=UsdPrim())
Construct a UsdRenderProduct on UsdPrim prim .
Definition: product.h:68
USDRENDER_API UsdAttribute GetProductTypeAttr() const
The type of output to produce.
USDRENDER_API UsdRelationship CreateOrderedVarsRel() const
See GetOrderedVarsRel(), and also Create vs Get Property Methods for when to use Get vs Create.
Contains an asset path and optional evaluated and resolved paths.
Definition: assetPath.h:78
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...
USDRENDER_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
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...