|
This class contains a set of utility functions used when authoring and querying shading networks. More...
#include <utils.h>
Static Public Member Functions | |
static USDSHADE_API std::string | GetPrefixForAttributeType (UsdShadeAttributeType sourceType) |
Returns the namespace prefix of the USD attribute associated with the given shading attribute type. | |
static USDSHADE_API SdfPath | GetConnectedSourcePath (const UsdShadeConnectionSourceInfo &srcInfo) |
For a valid UsdShadeConnectionSourceInfo, return the complete path to the source property; otherwise the empty path. | |
static USDSHADE_API std::pair< TfToken, UsdShadeAttributeType > | GetBaseNameAndType (const TfToken &fullName) |
Given the full name of a shading attribute, returns it's base name and shading attribute type. | |
static USDSHADE_API UsdShadeAttributeType | GetType (const TfToken &fullName) |
Given the full name of a shading attribute, returns its shading attribute type. | |
static USDSHADE_API TfToken | GetFullName (const TfToken &baseName, const UsdShadeAttributeType type) |
Returns the full shading attribute name given the basename and the shading attribute type. | |
static USDSHADE_API UsdShadeAttributeVector | GetValueProducingAttributes (UsdShadeInput const &input, bool shaderOutputsOnly=false) |
Find what is connected to an Input or Output recursively. | |
static USDSHADE_API UsdShadeAttributeVector | GetValueProducingAttributes (UsdShadeOutput const &output, bool shaderOutputsOnly=false) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
This class contains a set of utility functions used when authoring and querying shading networks.
|
static |
Given the full name of a shading attribute, returns it's base name and shading attribute type.
|
static |
For a valid UsdShadeConnectionSourceInfo, return the complete path to the source property; otherwise the empty path.
|
static |
Returns the full shading attribute name given the basename and the shading attribute type.
baseName
is the name of the input or output on the shading node. type
is the UsdShadeAttributeType of the shading attribute.
|
static |
Returns the namespace prefix of the USD attribute associated with the given shading attribute type.
|
static |
Given the full name of a shading attribute, returns its shading attribute type.
|
static |
Find what is connected to an Input or Output recursively.
GetValueProducingAttributes implements the UsdShade connectivity rules described in Connection Resolution Utilities .
When tracing connections within networks that contain containers like UsdShadeNodeGraph nodes, the actual output(s) or value(s) at the end of an input or output might be multiple connections removed. The methods below resolves this across multiple physical connections.
An UsdShadeInput is getting its value from one of these sources:
An UsdShadeOutput on a container can get its value from the same type of sources as a UsdShadeInput on either a UsdShadeShader or UsdShadeNodeGraph. Outputs on non-containers (UsdShadeShaders) cannot be connected.
This function returns a vector of UsdAttributes. The vector is empty if no valid attribute was found. The type of each attribute can be determined with the UsdShadeUtils::GetType
function.
If shaderOutputsOnly
is true, it will only report attributes that are outputs of non-containers (UsdShadeShaders). This is a bit faster and what is need when determining the connections for Material terminals.
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.