HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Attribute Computations
+ Collaboration diagram for Attribute Computations:

Variables

const TfToken Exec_BuiltinComputationTokens::computeValue
 
const TfToken Exec_BuiltinComputationTokens::computeResolvedValue
 
const TfToken Exec_BuiltinComputationTokens::computePath
 

Detailed Description

Builtin computations for computing information about attributes.

Variable Documentation

const TfToken Exec_BuiltinComputationTokens::computePath

Computes the provider's scene path.

Returns
the path of the provider object, as an SdfPath.

Example

```{.cpp} self.PrimComputation(_tokens->pathAsString) .Callback<std::string>(+[](const VdfContext &ctx) { return ctx.GetInputValue<SdfPath>( ExecBuiltinComputations->computePath).GetString(); }) .Inputs( Computation(ExecBuiltinComputations->computePath) ); ```

Definition at line 146 of file builtinComputations.h.

const TfToken Exec_BuiltinComputationTokens::computeResolvedValue

Computes the provider attribute's resolved value as authored in scene description.

This computation always produces the resolved value of an attribute, even if an attribute has registered an attribute expression.

Returns
a value whose type is the provider attribute's scalar value type.

Example

```{.cpp} self.PrimComputation(_tokens->myComputation) .Callback<double>(&_MyCallback) .Inputs( Attribute(_tokens->myAttribute) .Computation(ExecBuiltinComputations->computeResolvedValue) ); ```

Definition at line 126 of file builtinComputations.h.

const TfToken Exec_BuiltinComputationTokens::computeValue

Computes the provider attribute's value.

Returns
a value whose type is the provider attribute's scalar value type. If the attribute has registered an attribute expression, this may produce a value of any type.
Note
The computation provider must be an attribute.

Example

```{.cpp} self.PrimComputation(_tokens->myComputation) .Callback<double>(&_MyCallback) .Inputs( Attribute(_tokens->myAttribute) .Computation<double>(ExecBuiltinComputations->computeValue) .Required() ); ```

Definition at line 102 of file builtinComputations.h.