View Full Version : Running multiple commands from one button


bankievr6
08 August 2008, 11:41 PM
It seems as though I can't use the -command flag more than once per button. Is there a way to run multiple commands with one click? I'm trying to select a layer, then edit its properties, select a different layer, and so on.


button
-label "Ok"
-width 100
-command "editRenderLayerGlobals -currentRenderLayer Beauty;"
("window -edit -visible 0 $window");


is there a way to create seperate routines that can be called?

ashishdantu
08 August 2008, 03:47 AM
button -command ("editRenderLayerGlobals -currentRenderLayer Beauty;window -edit -visible 0 "+$window+";");



basically you can have a button execute two command strings by specifying the diff commands as part of a single string, each seprated by a ;

:)

bankievr6
08 August 2008, 03:54 AM
Excellent! Thanks.

Does this work for n number of commands in the string?

ashishdantu
08 August 2008, 04:50 AM
yes it should. as long as the commands are separated with a ;

:)

CGTalk Moderation
08 August 2008, 04:50 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.


1