![]() |
|
Computation registrations initiate the process of defining computations. More...
Collaboration diagram for Computation Registrations:Functions | |
| EXEC_API ExecPrimComputationBuilder | PrimComputation (const TfToken &computationName) |
Registers a prim computation named computationName. | |
| EXEC_API ExecAttributeComputationBuilder | AttributeComputation (const TfToken &attributeName, const TfToken &computationName) |
Registers an attribute computation named computationName on attributes named attributeName. | |
| EXEC_API ExecAttributeExpressionBuilder | AttributeExpression (const TfToken &attributeName) |
Registers an attribute expression for attributes named attributeName. | |
| template<class... DispatchedOntoSchemaTypes> | |
| ExecPrimComputationBuilder | DispatchedPrimComputation (const TfToken &computationName, DispatchedOntoSchemaTypes &&...schemaTypes) |
Registers a dispatched prim computation named computationName. | |
| EXEC_API ExecPrimComputationBuilder | DispatchedPrimComputation (const TfToken &computationName, ExecDispatchesOntoSchemas &&ontoSchemas) |
| template<class... DispatchedOntoSchemaTypes> | |
| ExecAttributeComputationBuilder | DispatchedAttributeComputation (const TfToken &computationName, DispatchedOntoSchemaTypes &&...schemaTypes) |
Registers a dispatched attribute computation named computationName. | |
| EXEC_API ExecAttributeComputationBuilder | DispatchedAttributeComputation (const TfToken &computationName, ExecDispatchesOntoSchemas &&ontoSchemas) |
| template<typename ResultType = _UnspecifiedType, typename ReturnType = _UnspecifiedType> | |
| Derived & | Callback (ReturnType(*callback)(const VdfContext &)) |
| Registers a callback function that implements the evaluation logic for a computation. | |
| template<typename... Args> | |
| ExecPrimComputationBuilder & | Inputs (Args &&... args) |
| Takes one or more input registrations that specify how to source input values for a prim computation. | |
| template<typename... Args> | |
| ExecAttributeComputationBuilder & | Inputs (Args &&... args) |
| Takes one or more input registrations that specify how to source input values for an attribute computation. | |
| template<typename... Args> | |
| ExecAttributeExpressionBuilder & | Inputs (Args &&... args) |
| Takes one or more input registrations that specify how to source input values for an attribute expression. | |
Computation registrations initiate the process of defining computations.
The object returned by a computation registration has methods that are used to specify the callback that implements the computation and the inputs that are provided to the callback at evaluation time.
| EXEC_API ExecAttributeComputationBuilder AttributeComputation | ( | const TfToken & | attributeName, |
| const TfToken & | computationName | ||
| ) |
Registers an attribute computation named computationName on attributes named attributeName.
| EXEC_API ExecAttributeExpressionBuilder AttributeExpression | ( | const TfToken & | attributeName | ) |
Registers an attribute expression for attributes named attributeName.
All attributes have a computed value that can be consumed by computation inputs, either by explicitly requesting the built-in computation computeValue or by using AttributeValue. The attribute expression allows plugin-writers to customize this computed value. If no attribute expression is defined, then computeValue simply provides the resolved value of the attribute.
When defining an attribute expression, it is often desired that it consume the attribute's resolved value. The expression can obtain the resolved value by registering an input from the computation computeResolvedValue on the provider attribute.
| Derived & Callback | ( | ReturnType(*)(const VdfContext &) | callback | ) |
Registers a callback function that implements the evaluation logic for a computation.
This registration must follow a computation registration.
Callback functions must be function pointers where the signature is ReturnType (*)(const VdfContext &) and ReturnType can be any of the following:
ResultType can be deduced from the callback type.ResultType must be explicitly specified as a template parameter.void in which case ResultType must be explicitly specified as a template parameter and the callback must call VdfContext::SetOutput to provide the output value.Note that the types used as computation result types (and as computation input value types) must be known to the execution system. All types that can be used to author attribute and metadata values in USD are known to exec by default. User-defined types must be registered by calling ExecTypeRegistry::RegisterType.
Definition at line 1841 of file computationBuilders.h.
| ExecAttributeComputationBuilder DispatchedAttributeComputation | ( | const TfToken & | computationName, |
| DispatchedOntoSchemaTypes &&... | schemaTypes | ||
| ) |
Registers a dispatched attribute computation named computationName.
Definition at line 1964 of file computationBuilders.h.
| ExecPrimComputationBuilder DispatchedPrimComputation | ( | const TfToken & | computationName, |
| DispatchedOntoSchemaTypes &&... | schemaTypes | ||
| ) |
Registers a dispatched prim computation named computationName.
A dispatched prim computation is only visible to computations on the prim that does the dispatching. I.e., the computation registrations for a schema can include dispatched computations and inputs to computations registered on the same schema can request the dispatched computations, using the input option FallsBackToDispatched(), from other provider prims and find them there. Other schema computation registrations will not be able to find the dispatched computations, however.
Dispatched computations can be restricted as to which prims they can dispatch onto, based on the typed and applied schemas of a given target prim. The second parameter to the DispatchedPrimComputation registration function can be used to specify zero or more schema types (as TfTypes). If any types are given, the dispatched computation will only be found on a target prim if that prim's typed schema type (or one of its base type) is among the given schema types or if the fully expanded list of API schemas applied to the prim includes a schema that is among the given schema types.
Definition at line 1949 of file computationBuilders.h.
| ExecPrimComputationBuilder & Inputs | ( | Args &&... | args | ) |
Takes one or more input registrations that specify how to source input values for a prim computation.
This registration must follow a computation registration.
Definition at line 1892 of file computationBuilders.h.
| ExecAttributeComputationBuilder & Inputs | ( | Args &&... | args | ) |
Takes one or more input registrations that specify how to source input values for an attribute computation.
This registration must follow a computation registration.
Definition at line 1911 of file computationBuilders.h.
| ExecAttributeExpressionBuilder & Inputs | ( | Args &&... | args | ) |
Takes one or more input registrations that specify how to source input values for an attribute expression.
This registration must follow a computation registration.
Definition at line 1930 of file computationBuilders.h.
| EXEC_API ExecPrimComputationBuilder PrimComputation | ( | const TfToken & | computationName | ) |
Registers a prim computation named computationName.