EvalContext.kl

Types

EvalContext (object)

The EvalContext provides contextual information about the evaluation within Splice. The EvalContext is a value generated by the Splice integrations and can be passed into your operators. You don’t need to add a port as this data is provided by Splice.

Operators can include an argument of type ‘EvalContext’ and name ‘context’, and splice will automatically provide the contextual information.

Some of the sample scenes provided with Splice highlight the use of the EvalContext, including the AnimatedAlembic and FbxCharacters scenes.

注釈

The Splice integration in Autodesk Softimage does not support access to the dirty inputs on the EvalContext, since the Softimage SDK doesn’t provide that information.

Members

String host The host application running, for example Maya or Softimage.
Scalar time the time of the evaluation in the host application.
/*
** Example: EvalContext
*/

require Util;
  
operator entry() {

      require Util;
      
      operator mySpliceOperator(io EvalContext context) {
        report('Running in '+context.host);
        report('The graph is '+context.graph);
        report(context.getDirtyInputs());
      }
      
  
}

/*
** Output:
(stdin):10:7: error: syntax error, unexpected require


*/

Functions

EvalContext_GetInstance

EvalContext EvalContext_GetInstance ()

Get the EvalContext singleton, or construct it if it didn’t already exist.