8#ifndef PXR_USD_SDR_SHADER_NODE_METADATA_H
9#define PXR_USD_SDR_SHADER_NODE_METADATA_H
14#include "pxr/usd/sdr/api.h"
17PXR_NAMESPACE_OPEN_SCOPE
25#define SDR_NODE_METADATA_TOKENS \
26 ((Category, "category")) \
27 ((Domain, "domain")) \
28 ((Subdomain, "subdomain")) \
29 ((Context, "context")) \
31 ((TargetRenderer, "targetRenderer")) \
32 ((Collections, "collections")) \
33 ((Departments, "departments")) \
37 ((OpenPages, "openPages")) \
38 ((PagesShownIf, "pagesShownIf")) \
39 ((Primvars, "primvars")) \
40 ((ImplementationName, "__SDR__implementationName")) \
41 ((Target, "__SDR__target")) \
42 ((SdrUsdEncodingVersion, "sdrUsdEncodingVersion")) \
43 ((SdrDefinitionNameFallbackPrefix, "sdrDefinitionNameFallbackPrefix"))
45#define SDR_NODE_DOMAIN_TOKENS \
46 ((Rendering, "rendering")) \
47 ((General, "general"))
49#define SDR_NODE_SUBDOMAIN_TOKENS \
51 ((Shading, "shading")) \
52 ((Filtering, "filtering")) \
53 ((Lighting, "lighting")) \
54 ((Rendering, "rendering"))
56#define SDR_NODE_CONTEXT_TOKENS \
58 ((Pattern, "pattern")) \
59 ((Surface, "surface")) \
60 ((Volume, "volume")) \
61 ((Displacement, "displacement")) \
64 ((LightFilter, "lightFilter")) \
66 ((DisplayFilter, "displayFilter")) \
67 ((PixelFilter, "pixelFilter")) \
68 ((SampleFilter, "sampleFilter")) \
69 ((VolumeFilter, "volumeFilter")) \
70 ((EnergyFilter, "energyFilter")) \
72 ((Integrator, "integrator")) \
73 ((Projection, "projection"))
75#define SDR_NODE_ROLE_TOKENS \
76 ((Primvar, "primvar")) \
77 ((Texture, "texture")) \
126 const std::initializer_list<std::pair<TfToken, std::string>>& init
151 template <
typename T>
170 template <
typename T>
226 void SetLabel(
const TfToken& v);
262 bool HasDomain()
const;
266 void SetDomain(
const TfToken& v);
278 bool HasSubdomain()
const;
282 void SetSubdomain(
const TfToken& v);
284 void ClearSubdomain();
294 bool HasContext()
const;
298 void SetContext(
const TfToken& v);
308 bool HasRole()
const;
312 void SetRole(
const TfToken& v);
332 bool HasTargetRenderer()
const;
334 TfToken GetTargetRenderer()
const;
336 void SetTargetRenderer(
const TfToken& v);
338 void ClearTargetRenderer();
352 bool HasCollections()
const;
354 SdrTokenVec GetCollections()
const;
356 void SetCollections(
const SdrTokenVec& v);
358 void ClearCollections();
362 bool HasHelp()
const;
364 std::string GetHelp()
const;
366 void SetHelp(
const std::string& v);
413 bool HasOpenPages()
const;
415 SdrTokenVec GetOpenPages()
const;
417 void SetOpenPages(
const SdrTokenVec& v);
419 void ClearOpenPages();
432 bool HasPagesShownIf()
const;
434 SdrTokenMap GetPagesShownIf()
const;
436 void SetPagesShownIf(
const SdrTokenMap& v);
438 void ClearPagesShownIf();
442 bool HasPrimvars()
const;
444 SdrStringVec GetPrimvars()
const;
446 void SetPrimvars(
const SdrStringVec& v);
448 void ClearPrimvars();
451 bool HasImplementationName()
const;
453 std::string GetImplementationName()
const;
455 void SetImplementationName(
const std::string& v);
457 void ClearImplementationName();
460 bool HasSdrUsdEncodingVersion()
const;
462 int GetSdrUsdEncodingVersion()
const;
464 void SetSdrUsdEncodingVersion(
const int& v);
466 void ClearSdrUsdEncodingVersion();
469 bool HasSdrDefinitionNameFallbackPrefix()
const;
471 std::string GetSdrDefinitionNameFallbackPrefix()
const;
473 void SetSdrDefinitionNameFallbackPrefix(
const std::string& v);
475 void ClearSdrDefinitionNameFallbackPrefix();
486 SdrTokenMap _EncodeLegacyMetadata()
const;
489 SdrTokenMap _LegacyCtorFromInitializer(
490 std::initializer_list<std::pair<TfToken, std::string>> f)
492 return SdrTokenMap(f.begin(), f.end());
500 void _SetDefaultInitializations();
505PXR_NAMESPACE_CLOSE_SCOPE
Represents a node that holds shading information.
Token for efficient comparison, assignment, and hashing of known strings.
A map with string keys and VtValue values.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
VtValue & Cast()
Return this holding value type cast to T.
bool IsEmpty() const
Returns true iff this value is empty.
T const & UncheckedGet() const &
Returns a const reference to the held object if the held object is of type T.
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.