7#ifndef USDSHADE_GENERATED_NODEGRAPH_H
8#define USDSHADE_GENERATED_NODEGRAPH_H
13#include "pxr/usd/usdShade/api.h"
19#include "pxr/usd/usd/editTarget.h"
20#include "pxr/usd/usd/relationship.h"
21#include "pxr/usd/usdShade/input.h"
22#include "pxr/usd/usdShade/output.h"
26#include "pxr/base/vt/value.h"
33#include "pxr/base/tf/type.h"
35PXR_NAMESPACE_OPEN_SCOPE
149 static const TfType &_GetStaticTfType();
151 static bool _IsTypedSchema();
155 const TfType &_GetTfType()
const override;
215 std::vector<UsdShadeOutput>
GetOutputs(
bool onlyAuthored=
true)
const;
237 UsdShadeAttributeType *sourceType)
const;
296 std::vector<UsdShadeInput>
GetInputs(
bool onlyAuthored=
true)
const;
337 typedef std::unordered_map<UsdShadeInput, std::vector<UsdShadeInput>,
364 bool computeTransitiveConsumers=
false)
const;
370PXR_NAMESPACE_CLOSE_SCOPE
Contains an asset path and an optional resolved path.
A path value used to locate objects in layers or scenegraphs.
Represents a value type name, i.e.
Token for efficient comparison, assignment, and hashing of known strings.
TfType represents a dynamic runtime type.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
The base class for all schema types in Usd.
UsdPrim GetPrim() const
Return this schema object's held prim.
Singleton registry that provides access to schema type information and the prim definitions for regis...
UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and mak...
A node-graph is a container for shading nodes, as well as other node-graphs.
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...
UsdShadeNodeGraph(const UsdSchemaBase &schemaObj)
Construct a UsdShadeNodeGraph on the prim held by schemaObj .
USDSHADE_API UsdShadeNodeGraph(const UsdShadeConnectableAPI &connectable)
Constructor that takes a ConnectableAPI object.
USDSHADE_API UsdShadeConnectableAPI ConnectableAPI() const
Contructs and returns a UsdShadeConnectableAPI object with this node-graph.
std::unordered_map< UsdShadeInput, std::vector< UsdShadeInput >, UsdShadeInput::Hash > InterfaceInputConsumersMap
Map of interface inputs to corresponding vectors of inputs that consume their values.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
USDSHADE_API UsdShadeOutput CreateOutput(const TfToken &name, const SdfValueTypeName &typeName) const
Create an output which can either have a value or can be connected.
USDSHADE_API UsdShadeInput GetInput(const TfToken &name) const
Return the requested input if it exists.
virtual USDSHADE_API ~UsdShadeNodeGraph()
Destructor.
USDSHADE_API UsdShadeShader ComputeOutputSource(const TfToken &outputName, TfToken *sourceName, UsdShadeAttributeType *sourceType) const
USDSHADE_API UsdShadeInput CreateInput(const TfToken &name, const SdfValueTypeName &typeName) const
Create an Input which can either have a value or can be connected.
USDSHADE_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
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...
std::unordered_map< UsdShadeNodeGraph, InterfaceInputConsumersMap, NodeGraphHasher, NodeGraphEqualFn > NodeGraphInputConsumersMap
Map of node-graphs to their associated input-consumers map.
USDSHADE_API std::vector< UsdShadeInput > GetInterfaceInputs() const
Returns all the "Interface Inputs" of the node-graph.
USDSHADE_API UsdShadeOutput GetOutput(const TfToken &name) const
Return the requested output if it exists.
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.
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...
USDSHADE_API std::vector< UsdShadeInput > GetInputs(bool onlyAuthored=true) const
Returns all inputs present on the node-graph.
USDSHADE_API std::vector< UsdShadeOutput > GetOutputs(bool onlyAuthored=true) const
Outputs are represented by attributes in the "outputs:" namespace.
UsdShadeNodeGraph(const UsdPrim &prim=UsdPrim())
Construct a UsdShadeNodeGraph on UsdPrim prim .
This class encapsulates a shader or node-graph output, which is a connectable attribute representing ...
Base class for all USD shaders.
The base class for all typed schemas (those that can impart a typeName to a UsdPrim),...
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Equality comparator for UsdShadeNodeGraph objects.
Hash functor for UsdShadeNodeGraph objects.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
size_t hash_value(const TfToken &x)
Overload hash_value for TfToken.
std::vector< TfToken > TfTokenVector
Convenience types.