|
HDK
|
Collaboration diagram for Aliases:Functions | |
| template<typename ValueType > | |
| auto | exec_registration::Prim::AttributeValue (const TfToken &attributeName) |
| See AttributeValue() More... | |
| template<typename ValueType > | |
| auto | exec_registration::AttributeValue (const TfToken &attributeName) |
Aliases are compact representations of compound input registrations, combining one or more object accessors with a value specifier into a single input registration.
|
inline |
See AttributeValue()
Definition at line 786 of file computationBuilders.h.
| auto exec_registration::AttributeValue | ( | const TfToken & | attributeName | ) |
Input alias that yields the value of the named attribute.
This registration must follow a PrimComputation registration.
Note: ```{.cpp} AttributeValue<T>(attrToken) ```
is equivalent to:
```{.cpp} Attribute(attrToken) .Compute<T>(ExecBuiltinComputations->computeValue) .InputName(attrToken) ```
```{.cpp} EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA(MySchemaType) { // 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()); } ```
Definition at line 1184 of file computationBuilders.h.