24 #ifndef USDSHADE_GENERATED_NODEGRAPH_H 25 #define USDSHADE_GENERATED_NODEGRAPH_H 30 #include "pxr/usd/usdShade/api.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;
232 std::vector<UsdShadeOutput>
GetOutputs(
bool onlyAuthored=
true)
const;
254 UsdShadeAttributeType *sourceType)
const;
313 std::vector<UsdShadeInput>
GetInputs(
bool onlyAuthored=
true)
const;
323 return hash_value(nodeGraph.
GetPrim());
354 typedef std::unordered_map<UsdShadeInput, std::vector<UsdShadeInput>,
381 bool computeTransitiveConsumers=
false)
const;
387 PXR_NAMESPACE_CLOSE_SCOPE
std::unordered_map< UsdShadeInput, std::vector< UsdShadeInput >, UsdShadeInput::Hash > InterfaceInputConsumersMap
Map of interface inputs to corresponding vectors of inputs that consume their values.
UsdPrim GetPrim() const
Return this schema object's held prim.
USDSHADE_API UsdShadeInput GetInput(const TfToken &name) const
Return the requested input if it exists.
Represents a value type name, i.e.
USDSHADE_API UsdShadeInput CreateInput(const TfToken &name, const SdfValueTypeName &typeName) const
Create an Input which can either have a value or can be connected.
A node-graph is a container for shading nodes, as well as other node-graphs.
virtual USDSHADE_API ~UsdShadeNodeGraph()
Destructor.
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
USDSHADE_API std::vector< UsdShadeInput > GetInputs(bool onlyAuthored=true) const
Returns all inputs present on the node-graph.
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...
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.
USDSHADE_API std::vector< UsdShadeOutput > GetOutputs(bool onlyAuthored=true) const
Outputs are represented by attributes in the "outputs:" namespace.
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 .
USDSHADE_API UsdShadeConnectableAPI ConnectableAPI() const
Contructs and returns a UsdShadeConnectableAPI object with this node-graph.
USDSHADE_API std::vector< UsdShadeInput > GetInterfaceInputs() const
Returns all the "Interface Inputs" of the node-graph.
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),...
std::vector< TfToken > TfTokenVector
Convenience types.
USDSHADE_API UsdShadeShader ComputeOutputSource(const TfToken &outputName, TfToken *sourceName, UsdShadeAttributeType *sourceType) const
A path value used to locate objects in layers or scenegraphs.
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.
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...
USDSHADE_API UsdShadeOutput GetOutput(const TfToken &name) const
Return the requested output if it exists.
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 .
USDSHADE_API UsdShadeOutput CreateOutput(const TfToken &name, const SdfValueTypeName &typeName) const
Create an output which can either have a value or can be connected.
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
The base class for all schema types in Usd.
Equality comparator for UsdShadeNodeGraph objects.
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.