View Full Version : not in command history ??
swardson 03-21-2008, 08:33 PM Hey all,
Trying to write a script that will run a procedure uppon button click in a UI. Got that no problem. However, I also want the script to be repeatable via the 'g' hotkey. Looking at the script editor, it seems to be that the command run when hitting a UI button is not added to the command history and therefore is not repeatable via the 'g' hotkey.
Is there a special flag or line of code I need to add to allow the button command run to be added to the command history?
Thanks,
Brad
|
|
NextDesign
03-21-2008, 08:43 PM
By command history, do you mean in the channel box, or the command being shown in the script editor?
If you want to show it up in the script editor just turn on "Echo all commands" in the script editor.
If you want the command to run with a hotkey, you might need to write something in the hotkey editor as well.
swardson
03-21-2008, 09:58 PM
script editor.
I don't want to have to have echo all commands on because it slowes down maya horribly while working. I also don't want it to have to be set to a hotkey as it is already a shelf button.
When I click the shelf button the command (or procedure call) is run and output to the script editor.
From within the UI that is opened upon clicking the shelf button I have an intField and a go button. When I click the button it calls the same procedure as the shelf button. But this time it isnt output to the script editor. Therefore if I have the UI open, create a cube or something then put in a new value in the UI and click the button, the last command output to the script editor was the cube creation and therefore the 'g' hotkey repeats the cube creation and not the procedure run from the scripts UI.
-Brad
swardson
03-21-2008, 10:28 PM
ok so in my UI, if I create a shelfButton instead of a button widget to run the procedure it shows up in the script editor. Is this something broken with the button widget, or simply a limitation by it? I will use an embedded shelf button if I need to, but I would prefer to use the button widget if I can.
-Brad
CGTalk Moderation
03-21-2008, 10:28 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.