All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
settings.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_SETTINGS_H
8#define USDRENDER_GENERATED_SETTINGS_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// RENDERSETTINGS //
34// -------------------------------------------------------------------------- //
35
49{
50public:
54 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
55
60 explicit UsdRenderSettings(const UsdPrim& prim=UsdPrim())
62 {
63 }
64
68 explicit UsdRenderSettings(const UsdSchemaBase& schemaObj)
69 : UsdRenderSettingsBase(schemaObj)
70 {
71 }
72
74 USDRENDER_API
76
80 USDRENDER_API
81 static const TfTokenVector &
82 GetSchemaAttributeNames(bool includeInherited=true);
83
93 USDRENDER_API
95 Get(const UsdStagePtr &stage, const SdfPath &path);
96
119 USDRENDER_API
120 static UsdRenderSettings
121 Define(const UsdStagePtr &stage, const SdfPath &path);
122
123protected:
127 USDRENDER_API
129
130private:
131 // needs to invoke _GetStaticTfType.
132 friend class UsdSchemaRegistry;
133 USDRENDER_API
134 static const TfType &_GetStaticTfType();
135
136 static bool _IsTypedSchema();
137
138 // override SchemaBase virtuals.
139 USDRENDER_API
140 const TfType &_GetTfType() const override;
141
142public:
143 // --------------------------------------------------------------------- //
144 // INCLUDEDPURPOSES
145 // --------------------------------------------------------------------- //
157 USDRENDER_API
159
165 USDRENDER_API
166 UsdAttribute CreateIncludedPurposesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
167
168public:
169 // --------------------------------------------------------------------- //
170 // MATERIALBINDINGPURPOSES
171 // --------------------------------------------------------------------- //
183 USDRENDER_API
185
191 USDRENDER_API
192 UsdAttribute CreateMaterialBindingPurposesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
193
194public:
195 // --------------------------------------------------------------------- //
196 // RENDERINGCOLORSPACE
197 // --------------------------------------------------------------------- //
208 USDRENDER_API
210
216 USDRENDER_API
217 UsdAttribute CreateRenderingColorSpaceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
218
219public:
220 // --------------------------------------------------------------------- //
221 // PRODUCTS
222 // --------------------------------------------------------------------- //
229 USDRENDER_API
231
234 USDRENDER_API
236
237public:
238 // ===================================================================== //
239 // Feel free to add custom code below this line, it will be preserved by
240 // the code generator.
241 //
242 // Just remember to:
243 // - Close the class declaration with };
244 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
245 // - Close the include guard with #endif
246 // ===================================================================== //
247 // --(BEGIN CUSTOM CODE)--
248
253 USDRENDER_API
254 static UsdRenderSettings
255 GetStageRenderSettings(const UsdStageWeakPtr &stage);
256};
257
258PXR_NAMESPACE_CLOSE_SCOPE
259
260#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
Abstract base class that defines render settings that can be specified on either a RenderSettings pri...
Definition: settingsBase.h:48
A UsdRenderSettings prim specifies global settings for a render process, including an enumeration of ...
Definition: settings.h:49
USDRENDER_API UsdAttribute CreateRenderingColorSpaceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetRenderingColorSpaceAttr(), and also Create vs Get Property Methods for when to use Get vs Crea...
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: settings.h:54
UsdRenderSettings(const UsdSchemaBase &schemaObj)
Construct a UsdRenderSettings on the prim held by schemaObj .
Definition: settings.h:68
USDRENDER_API UsdAttribute GetIncludedPurposesAttr() const
The list of UsdGeomImageable purpose values that should be included in the render.
USDRENDER_API UsdRelationship GetProductsRel() const
The set of RenderProducts the render should produce.
virtual USDRENDER_API ~UsdRenderSettings()
Destructor.
UsdRenderSettings(const UsdPrim &prim=UsdPrim())
Construct a UsdRenderSettings on UsdPrim prim .
Definition: settings.h:60
static USDRENDER_API UsdRenderSettings Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdRenderSettings holding the prim adhering to this schema at path on stage.
USDRENDER_API UsdAttribute GetMaterialBindingPurposesAttr() const
Ordered list of material purposes to consider when resolving material bindings in the scene.
USDRENDER_API UsdAttribute GetRenderingColorSpaceAttr() const
Describes a renderer's working (linear) colorSpace where all the renderer/shader math is expected to ...
USDRENDER_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static USDRENDER_API UsdRenderSettings GetStageRenderSettings(const UsdStageWeakPtr &stage)
Fetch and return stage 's render settings, as indicated by root layer metadata.
USDRENDER_API UsdAttribute CreateMaterialBindingPurposesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetMaterialBindingPurposesAttr(), and also Create vs Get Property Methods for when to use Get vs ...
USDRENDER_API UsdAttribute CreateIncludedPurposesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetIncludedPurposesAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDRENDER_API UsdRenderSettings 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 CreateProductsRel() const
See GetProductsRel(), and also Create vs Get Property Methods for when to use Get vs Create.
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