directMaterialBindingSchema.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_DIRECT_MATERIAL_BINDING_SCHEMA_H
19 #define PXR_USD_IMAGING_USD_IMAGING_DIRECT_MATERIAL_BINDING_SCHEMA_H
20 
22 
23 #include "pxr/usdImaging/usdImaging/api.h"
24 
25 #include "pxr/imaging/hd/schema.h"
26 
27 // --(BEGIN CUSTOM CODE: Includes)--
28 // --(END CUSTOM CODE: Includes)--
29 
30 PXR_NAMESPACE_OPEN_SCOPE
31 
32 // --(BEGIN CUSTOM CODE: Declares)--
33 // --(END CUSTOM CODE: Declares)--
34 
35 #define USD_IMAGING_DIRECT_MATERIAL_BINDING_SCHEMA_TOKENS \
36  (directMaterialBinding) \
37  (materialPath) \
38  (bindingStrength) \
39 
40 TF_DECLARE_PUBLIC_TOKENS(UsdImagingDirectMaterialBindingSchemaTokens, USDIMAGING_API,
41  USD_IMAGING_DIRECT_MATERIAL_BINDING_SCHEMA_TOKENS);
42 
43 //-----------------------------------------------------------------------------
44 
45 
46 class UsdImagingDirectMaterialBindingSchema : public HdSchema
47 {
48 public:
51 
52  UsdImagingDirectMaterialBindingSchema(HdContainerDataSourceHandle container)
53  : HdSchema(container) {}
54 
60  USDIMAGING_API
61  static UsdImagingDirectMaterialBindingSchema GetFromParent(
62  const HdContainerDataSourceHandle &fromParentContainer);
63 
65 
66 // --(BEGIN CUSTOM CODE: Schema Methods)--
67 // --(END CUSTOM CODE: Schema Methods)--
68 
71 
72  USDIMAGING_API
73  HdPathDataSourceHandle GetMaterialPath() const;
74 
75  USDIMAGING_API
76  HdTokenDataSourceHandle GetBindingStrength() const;
77 
79 
82 
85  USDIMAGING_API
86  static const TfToken &GetSchemaToken();
87 
90  USDIMAGING_API
91  static const HdDataSourceLocator &GetDefaultLocator();
92 
94 
97 
105  USDIMAGING_API
106  static HdContainerDataSourceHandle
107  BuildRetained(
108  const HdPathDataSourceHandle &materialPath,
109  const HdTokenDataSourceHandle &bindingStrength
110  );
111 
118  class Builder
119  {
120  public:
121  USDIMAGING_API
122  Builder &SetMaterialPath(
123  const HdPathDataSourceHandle &materialPath);
124  USDIMAGING_API
125  Builder &SetBindingStrength(
126  const HdTokenDataSourceHandle &bindingStrength);
127 
129  USDIMAGING_API
130  HdContainerDataSourceHandle Build();
131 
132  private:
133  HdPathDataSourceHandle _materialPath;
134  HdTokenDataSourceHandle _bindingStrength;
135 
136  };
137 
139 };
140 
141 PXR_NAMESPACE_CLOSE_SCOPE
142 
143 #endif
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.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:80
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:92
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:25