|
HDK
|
Collaboration diagram for Input Options:Functions | |
| This & | Exec_ComputationBuilderComputationValueSpecifier< allowed >::InputName (const TfToken &inputName) |
| This & | Exec_ComputationBuilderComputationValueSpecifier< allowed >::Required () |
| This & | Exec_ComputationBuilderComputationValueSpecifier< allowed >::FallsBackToDispatched () |
An input option is an element of an input registration that applies to a value specifier, modifying its behavior.
A value specifier may be followed by zero or more input options.
|
inline |
Declares the input can find dispatched computations if the requested computation name doesn't match a local computation on the provider.
```{.cpp} EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA(MySchemaType) { // Register a dispatched prim computation. self.DispatchedPrimComputation(_tokens->myDispatchedComputation) .Callback<double>(+[](const VdfContext &) { return 11.0; })
// Register a prim computation that requests the above dispatched // computation via uses relationship targets. self.PrimComputation(_tokens->myComputation) .Callback<double>(+[](const VdfContext &ctx) { const double *const valuePtr = ctx.GetInputValuePtr<double>( _tokens->myDispatchedComputation); return valuePtr ? *valuePtr : -1.0; }) .Inputs( Relationship(_tokens->myRelationship) .TargetedObjects<double>( _tokens->myDispatchedComputation) .FallsBackToDispatched()) } ```
Definition at line 414 of file computationBuilders.h.
|
inline |
Overrides the default input name, setting it to inputName.
```{.cpp} EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA(MySchemaType) { // Register a prim computation that returns the value of another // prim computation, using a non-default input name. self.PrimComputation(_tokens->myComputation) .Callback<double>(+[](const VdfContext &ctx) { const double *const valuePtr = ctx.GetInputValuePtr<double>(_tokens->myInputName); return valuePtr ? *valuePtr : 0.0; }) .Inputs( Computation<double>(_tokens->anotherComputation) .InputName(_tokens->myInputName)); } ```
Definition at line 346 of file computationBuilders.h.
|
inline |
Declares the input is required, i.e., that the computation expects an input value always to be provided at evaluation time.
If exec compilation is unable to compile input connections for a required input, an error will be emitted.
```{.cpp} EXEC_REGISTER_COMPUTATIONS_FOR_SCHEMA(MySchemaType) { // Register a prim computation that returns the value of another // prim computation, using a non-default input name. self.PrimComputation(_tokens->myComputation) .Callback<int>(+[](const VdfContext &ctx) { return ctx.GetInputValue<int>(_tokens->myInputName); }) .Inputs( Computation<int>(_tokens->anotherComputation).Required()); } ```
Definition at line 375 of file computationBuilders.h.