sceneGlobalsSchema.h
1 //
2 // Copyright 2022 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
25 
26 /* ************************************************************************** */
27 /* ** This file is generated by a script. Do not edit directly. Edit ** */
28 /* ** defs.py or the (*)Schema.template.h files to make changes. ** */
29 /* ************************************************************************** */
30 
31 #ifndef PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
32 #define PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
33 
34 #include "pxr/imaging/hd/api.h"
35 
36 #include "pxr/imaging/hd/schema.h"
37 
38 PXR_NAMESPACE_OPEN_SCOPE
39 
40 //-----------------------------------------------------------------------------
41 
42 #define HDSCENEGLOBALS_SCHEMA_TOKENS \
43  (sceneGlobals) \
44  (activeRenderSettingsPrim) \
45 
46 TF_DECLARE_PUBLIC_TOKENS(HdSceneGlobalsSchemaTokens, HD_API,
47  HDSCENEGLOBALS_SCHEMA_TOKENS);
48 
49 //-----------------------------------------------------------------------------
50 
61 
63 {
64 public:
65  HdSceneGlobalsSchema(HdContainerDataSourceHandle container)
66  : HdSchema(container) {}
67 
68  //ACCESSORS
69 
70  HD_API
71  HdPathDataSourceHandle GetActiveRenderSettingsPrim();
72 
73  // RETRIEVING AND CONSTRUCTING
74 
80  HD_API
81  static HdContainerDataSourceHandle
83  const HdPathDataSourceHandle &activeRenderSettingsPrim
84  );
85 
92  class Builder
93  {
94  public:
95  HD_API
96  Builder &SetActiveRenderSettingsPrim(
97  const HdPathDataSourceHandle &activeRenderSettingsPrim);
98 
100  HD_API
101  HdContainerDataSourceHandle Build();
102 
103  private:
104  HdPathDataSourceHandle _activeRenderSettingsPrim;
105  };
106 
112  HD_API
114  const HdContainerDataSourceHandle &fromParentContainer);
115 
118  HD_API
119  static const HdDataSourceLocator &GetDefaultLocator();
120 
121 
126  HD_API
128 
129 };
130 
131 PXR_NAMESPACE_CLOSE_SCOPE
132 
133 #endif
The HdSceneGlobalsSchema encapsulates "global" state to orchestrate a render.
static HD_API HdSceneGlobalsSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "sceneGlobals" from the parent...
static HD_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
Represents an object that can identify the location of a data source.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
static HD_API const HdDataSourceLocator & GetActiveRenderSettingsPrimLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the activerendersetting...
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
static HD_API HdContainerDataSourceHandle BuildRetained(const HdPathDataSourceHandle &activeRenderSettingsPrim)
Builds a container data source which includes the provided child data sources.