All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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"
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// RENDERPRODUCT //
34// -------------------------------------------------------------------------- //
35
57{
58public:
62 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
63
68 explicit UsdRenderProduct(const UsdPrim& prim=UsdPrim())
70 {
71 }
72
76 explicit UsdRenderProduct(const UsdSchemaBase& schemaObj)
77 : UsdRenderSettingsBase(schemaObj)
78 {
79 }
80
82 USDRENDER_API
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
131protected:
135 USDRENDER_API
137
138private:
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
150public:
151 // --------------------------------------------------------------------- //
152 // PRODUCTTYPE
153 // --------------------------------------------------------------------- //
174 USDRENDER_API
176
182 USDRENDER_API
183 UsdAttribute CreateProductTypeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
184
185public:
186 // --------------------------------------------------------------------- //
187 // PRODUCTNAME
188 // --------------------------------------------------------------------- //
199 USDRENDER_API
201
207 USDRENDER_API
208 UsdAttribute CreateProductNameAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
209
210public:
211 // --------------------------------------------------------------------- //
212 // ORDEREDVARS
213 // --------------------------------------------------------------------- //
219 USDRENDER_API
221
224 USDRENDER_API
226
227public:
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
240PXR_NAMESPACE_CLOSE_SCOPE
241
242#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
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
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Definition: relationship.h:111
A UsdRenderProduct describes an image or other file-like artifact produced by a render.
Definition: product.h:57
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.
UsdRenderProduct(const UsdSchemaBase &schemaObj)
Construct a UsdRenderProduct on the prim held by schemaObj .
Definition: product.h:76
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
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...
USDRENDER_API UsdRelationship CreateOrderedVarsRel() const
See GetOrderedVarsRel(), 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.
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 GetProductTypeAttr() const
The type of output to produce.
USDRENDER_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
virtual USDRENDER_API ~UsdRenderProduct()
Destructor.
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.
UsdRenderProduct(const UsdPrim &prim=UsdPrim())
Construct a UsdRenderProduct on UsdPrim prim .
Definition: product.h:68
USDRENDER_API UsdRelationship GetOrderedVarsRel() const
Specifies the RenderVars that should be consumed and combined into the final product.
Abstract base class that defines render settings that can be specified on either a RenderSettings pri...
Definition: settingsBase.h:48
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: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