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.

EvalContext EvalContext EvalContext

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:3: error: syntax error, unexpected require


*/

Methods in detail

EvalContext ( in EvalContext other )

copy constructor


EvalContext ()


EvalContext EvalContext.clone? ()

clone method


String EvalContext.getHost? ()

returns the name of the host of this EvalContext


EvalContext EvalContext.getInstance? ()

Get the EvalContext singleton, but through a method


Scalar EvalContext.getTime? ()

returns the current time of this EvalContext