v4.0
Sets or returns the debug flags defined by the custom operator as a Long.
When the value is not zero Softimage will log extra information about the operator's evaluation.
Note: You can read this property from within the update function of a custom operator
but setting this property is blocked.
// get accessor Int32 rtn = CustomOperator.Debug; // set accessor CustomOperator.Debug = Int32; |
/* This example illustrates how to use the debug property to test an operator. The message Notify is sent to an operator to notify it that it's update ports are dirty. The RequestData and Evaluate messages are sent when the output is requested. The example below shows that the operator is only evaluated once even if the time is changed. This is because the inputs are not time dependent. Try setting a key on posy or enabling the CustomOperator.AlwaysEvaluate property, this forces the operator to re-evaluate on the second GetValue. */ NewScene( null, false ); var null1 = GetPrim( "null" ); var sop = null1.posx.AddScriptedOp( MyExpr_Update.toString(), null1.posy, "MyExpr","JScript" ); sop.Debug = 1; // SetKey( null1.posy ); // sop.AlwaysEvaluate = true; // Log the evaluated of posx val = GetValue( null1.posx, 1 ); Application.LogMessage( "first evaluated value " + val ); // Change the current frame SetValue( "PlayControl.Current", 50 ); // Log the new evaluated of posx val = GetValue( "null.kine.local.posx", 1 ); Application.LogMessage( "new evaluated value " + val ); // Operator's update function. function MyExpr_Update( ctx, out, in1 ) { Application.LogMessage( "MyExpr_Update: " + out.name ); out.Value = ctx.CurrentFrame; } |