Truespace Script Buffer

trueSpace scripts create an undo step for each command in the script that changes the graph. So a single script can have many undo steps generated. The trueSpace script buffer will run a collection of script commands in the form of a string and generate only 1 undo.

Function Set variables can be used to pass complex data structures to the buffer.

If Node.Value() is used inside of a function set then it cannot be called directly from a toolbar button. The Node object seems to be incomplete and will fail with an warning message in the log, but no alert dialog like normal errors. If called using the script buffer command the Node.Value function will work when called from a toolbar button.

var cmd = ''
// note that if System.ThisOwner() is included in the buffer tS will crash
var thisowner = System.ThisOwner()
cmd += var owner = "' + thisowner + '";'
cmd += 'System.Trace(owner)'
RsApp.RunScriptBuffer(cmd);

Leave a Reply

Your email address will not be published.