24 #ifndef USDSHADE_GENERATED_NODEGRAPH_H
25 #define USDSHADE_GENERATED_NODEGRAPH_H
30 #include "pxr/usd/usdShade/api.h"
31 #include "pxr/usd/usd/typed.h"
36 #include "pxr/usd/usd/editTarget.h"
37 #include "pxr/usd/usd/relationship.h"
38 #include "pxr/usd/usdShade/input.h"
39 #include "pxr/usd/usdShade/output.h"
43 #include "pxr/base/vt/value.h"
50 #include "pxr/base/tf/type.h"
52 PXR_NAMESPACE_OPEN_SCOPE
127 Get(
const UsdStagePtr &stage,
const SdfPath &path);
166 static const TfType &_GetStaticTfType();
168 static bool _IsTypedSchema();
172 const TfType &_GetTfType()
const override;
229 std::vector<UsdShadeOutput>
GetOutputs(
bool onlyAuthored=
true)
const;
251 UsdShadeAttributeType *sourceType)
const;
310 std::vector<UsdShadeInput>
GetInputs(
bool onlyAuthored=
true)
const;
320 return hash_value(nodeGraph.
GetPrim());
351 typedef std::unordered_map<UsdShadeInput, std::vector<UsdShadeInput>,
378 bool computeTransitiveConsumers=
false)
const;
389 std::string *reason)
const override;
392 bool IsContainer()
const override;
397 PXR_NAMESPACE_CLOSE_SCOPE
USDSHADE_API UsdShadeInput CreateInput(const TfToken &name, const SdfValueTypeName &typeName) const
Create an Input which can either have a value or can be connected.
UsdShadeNodeGraph provides its own connectability behavior, to support nesting of node graphs...
std::unordered_map< UsdShadeInput, std::vector< UsdShadeInput >, UsdShadeInput::Hash > InterfaceInputConsumersMap
Map of interface inputs to corresponding vectors of inputs that consume their values.
Represents a value type name, i.e.
USDSHADE_API std::vector< UsdShadeOutput > GetOutputs(bool onlyAuthored=true) const
Outputs are represented by attributes in the "outputs:" namespace.
Scenegraph object for authoring and retrieving numeric, string, and array valued data, sampled over time.
A node-graph is a container for shading nodes, as well as other node-graphs.
USDSHADE_API UsdShadeOutput CreateOutput(const TfToken &name, const SdfValueTypeName &typeName) const
Create an output which can either have a value or can be connected.
virtual USDSHADE_API ~UsdShadeNodeGraph()
Destructor.
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
static USDSHADE_API UsdShadeNodeGraph Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdShadeNodeGraph holding the prim adhering to this schema at path on stage.
Token for efficient comparison, assignment, and hashing of known strings.
std::unordered_map< UsdShadeNodeGraph, InterfaceInputConsumersMap, NodeGraphHasher, NodeGraphEqualFn > NodeGraphInputConsumersMap
Map of node-graphs to their associated input-consumers map.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
UsdShadeNodeGraph(const UsdPrim &prim=UsdPrim())
Construct a UsdShadeNodeGraph on UsdPrim prim .
UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and mak...
Represents a concrete typed schema.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
The base class for all typed schemas (those that can impart a typeName to a UsdPrim), and therefore the base class for all instantiable and "IsA" schemas.
USDSHADE_API UsdShadeInput GetInput(const TfToken &name) const
Return the requested input if it exists.
std::vector< TfToken > TfTokenVector
Convenience types.
USDSHADE_API InterfaceInputConsumersMap ComputeInterfaceInputConsumersMap(bool computeTransitiveConsumers=false) const
Walks the namespace subtree below the node-graph and computes a map containing the list of all inputs...
A path value used to locate objects in layers or scenegraphs.
USDSHADE_API UsdShadeConnectableAPI ConnectableAPI() const
Contructs and returns a UsdShadeConnectableAPI object with this node-graph.
static USDSHADE_API UsdShadeNodeGraph Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
Hash functor for UsdShadeNodeGraph objects.
USDSHADE_API std::vector< UsdShadeInput > GetInputs(bool onlyAuthored=true) const
Returns all inputs present on the node-graph.
Contains an asset path and an optional resolved path.
static USDSHADE_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...
Base class for all USD shaders.
TfType represents a dynamic runtime type.
Singleton registry that provides access to schema type information and the prim definitions for regis...
UsdShadeNodeGraph(const UsdSchemaBase &schemaObj)
Construct a UsdShadeNodeGraph on the prim held by schemaObj .
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
The base class for all schema types in Usd.
USDSHADE_API std::vector< UsdShadeInput > GetInterfaceInputs() const
Returns all the "Interface Inputs" of the node-graph.
Equality comparator for UsdShadeNodeGraph objects.
USDSHADE_API UsdShadeShader ComputeOutputSource(const TfToken &outputName, TfToken *sourceName, UsdShadeAttributeType *sourceType) const
UsdShadeConnectableAPIBehavior defines the compatibilty and behavior UsdShadeConnectableAPIof when ap...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
USDSHADE_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDSHADE_API UsdShadeOutput GetOutput(const TfToken &name) const
Return the requested output if it exists.
UsdPrim GetPrim() const
Return this schema object's held prim.