Loading...
Searching...
No Matches

Aliases are compact representations of compound input registrations, combining one or more object accessors with a value specifier into a single input registration. More...

+ Collaboration diagram for Aliases:

Functions

template<typename ValueType >
auto AttributeValue (const TfToken &attributeName)
 See AttributeValue().
 
template<typename ValueType >
auto AttributeValue (const TfToken &attributeName)
 Input alias that yields the value of the named attribute.
 

Detailed Description

Aliases are compact representations of compound input registrations, combining one or more object accessors with a value specifier into a single input registration.

Function Documentation

◆ AttributeValue() [1/2]

auto AttributeValue ( const TfToken attributeName)
inline

See AttributeValue().

Definition at line 774 of file computationBuilders.h.

◆ AttributeValue() [2/2]

auto AttributeValue ( const TfToken attributeName)

Input alias that yields the value of the named attribute.

This registration must follow a PrimComputation registration.

Note:

AttributeValue<T>(attrToken)

is equivalent to:

Attribute(attrToken)
.Compute<T>(ExecBuiltinComputations->computeValue)
.InputName(attrToken)
Attribute accessor, valid for providing input to a prim computation.

Example

{
// Register a prim computation that returns the computed value of an
// attribute.
self.PrimComputation(_tokens->eleven)
.Callback<double>(+[](const VdfContext &ctx) {
ctx->SetOutput(ctx.GetInputValue<double>(_tokens->myAttribute));
})
.Inputs(
AttributeValue<double>(_tokens->myAttribute).Required());
}
A context is the parameter bundle passed to callbacks of computations.
Definition: context.h:40
#define EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA(SchemaType)
Initiates registration of exec computations for the schema SchemaType.

Definition at line 1160 of file computationBuilders.h.