Toolbar Button Bug

Post Reply
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Toolbar Button Bug

Post by clintonman »

When you use a toolbar button to call a script with a Node.Value() method it fails in certain cases. I think the toolbar buttons only have access to part of the Node object class.

It will fail if called with ScriptObject.Execute and it will fail if the button directly calls a Function Set function.

This is a toolbar button command that fails because Node.Value is used in the Parent() function script.

Code: Select all

GlobalFS = Node.AccessFnSet("Scripts/CustomCommands/Global Function Set");GlobalFS.Parent();
a workaround is to use a script buffer to call it

Code: Select all

cmd='GlobalFS = Node.AccessFnSet("Scripts/CustomCommands/Global Function Set");GlobalFS.Parent();';RsApp.RunScriptBuffer(cmd);
Clinton Reese

http://clintons3d.com
Post Reply