hi
since scripted operaters's code runs every frame it initialize variables every time. can we declare global variables? How?
defining subroutine "sub( ) end sub "also causes syntax error
some body pls explain
Thanks
hi
since scripted operaters's code runs every frame it initialize variables every time. can we declare global variables? How?
defining subroutine "sub( ) end sub "also causes syntax error
some body pls explain
Thanks
If you want global variables in your vbscript operator then define them in the auxilary code section ( second pane ) for example
Sub Update(In_UpdateContext,out)
logmessage MyGlobalVariable
End Sub
Dim MyGlobalVariable : MyGlobalVariable = "Hello"
Just a side note:
A Scripted Operator doesnt run every frame.
It is triggered when one of its input has changed.
One way of triggering a Scripted Operator every frame is to create a variable, and set an expression with 'Fc', for instance. ( or 'T', etc.. ).