Loading...
Searching...
No Matches
materialBindingSchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef PXR_USD_IMAGING_USD_IMAGING_MATERIAL_BINDING_SCHEMA_H
19#define PXR_USD_IMAGING_USD_IMAGING_MATERIAL_BINDING_SCHEMA_H
20
22
23#include "pxr/usdImaging/usdImaging/api.h"
25
26#include "pxr/imaging/hd/schema.h"
27
28// --(BEGIN CUSTOM CODE: Includes)--
29#include "pxr/imaging/hd/vectorSchema.h"
30// --(END CUSTOM CODE: Includes)--
31
32PXR_NAMESPACE_OPEN_SCOPE
33
34// --(BEGIN CUSTOM CODE: Declares)--
37// --(END CUSTOM CODE: Declares)--
38
39#define USD_IMAGING_MATERIAL_BINDING_SCHEMA_TOKENS \
40 (usdMaterialBinding) \
41 (directMaterialBinding) \
42 (collectionMaterialBindings) \
43
44TF_DECLARE_PUBLIC_TOKENS(UsdImagingMaterialBindingSchemaTokens, USDIMAGING_API,
45 USD_IMAGING_MATERIAL_BINDING_SCHEMA_TOKENS);
46
47//-----------------------------------------------------------------------------
48
49
57{
58public:
61
62 UsdImagingMaterialBindingSchema(HdContainerDataSourceHandle container)
63 : HdSchema(container) {}
64
70 USDIMAGING_API
72 const HdContainerDataSourceHandle &fromParentContainer);
73
75
76// --(BEGIN CUSTOM CODE: Schema Methods)--
77// --(END CUSTOM CODE: Schema Methods)--
78
81
82 USDIMAGING_API
83 UsdImagingDirectMaterialBindingSchema GetDirectMaterialBinding() const;
84
85 USDIMAGING_API
86 UsdImagingCollectionMaterialBindingVectorSchema GetCollectionMaterialBindings() const;
87
89
92
95 USDIMAGING_API
96 static const TfToken &GetSchemaToken();
97
100 USDIMAGING_API
102
104
107
115 USDIMAGING_API
116 static HdContainerDataSourceHandle
118 const HdContainerDataSourceHandle &directMaterialBinding,
119 const HdVectorDataSourceHandle &collectionMaterialBindings
120 );
121
129 {
130 public:
131 USDIMAGING_API
132 Builder &SetDirectMaterialBinding(
133 const HdContainerDataSourceHandle &directMaterialBinding);
134 USDIMAGING_API
135 Builder &SetCollectionMaterialBindings(
136 const HdVectorDataSourceHandle &collectionMaterialBindings);
137
139 USDIMAGING_API
140 HdContainerDataSourceHandle Build();
141
142 private:
143 HdContainerDataSourceHandle _directMaterialBinding;
144 HdVectorDataSourceHandle _collectionMaterialBindings;
145
146 };
147
149};
150
151PXR_NAMESPACE_CLOSE_SCOPE
152
153#endif
Represents an object that can identify the location of a data source.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
Template class wrapping a vector data source whose children are container data source conforming to a...
Definition: vectorSchema.h:85
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
USDIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
The UsdImagingMaterialBindingSchema specifies a container for a prim's material bindings for a partic...
static USDIMAGING_API HdContainerDataSourceHandle BuildRetained(const HdContainerDataSourceHandle &directMaterialBinding, const HdVectorDataSourceHandle &collectionMaterialBindings)
static USDIMAGING_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
static USDIMAGING_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
static USDIMAGING_API UsdImagingMaterialBindingSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "usdMaterialBinding" from the ...
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92