meuH
12-08-2010, 12:19 PM
I would like to revisit some quick workflow scripts I made lately by adding the various button commands to the repeatLast queue.
all those scripts are 100% python and I can't get the repeatLast command to work for some reason that eludes me. I hope it's just me being dumb, but I just don't get it.
here's an example pulled from the maya command examples (watch out for the broken indents):
import maya.cmds as cmds
def defaultButtonPush(*args):
print 'Default was pushed.'
cmds.repeatLast(ac=defaultButtonPush, acl="testtest")
cmds.window( width=150 )
cmds.columnLayout( adjustableColumn=True )
cmds.button( label='Default', command=defaultButtonPush )
cmds.showWindow()
when executed and the button pushed, all things are fine.
when I press 'g' to repeat last, I get this error:
<function defaultButtonPush at 0x1C1B0370>;
// Error: <function defaultButtonPush at 0x1C1B0370>; //
// Error: Line 1.1: Syntax error //
I've tried a few variations with some extra functions, but I still get this error.
I would appreciate any infos anyone could have about it.
thanks :)
all those scripts are 100% python and I can't get the repeatLast command to work for some reason that eludes me. I hope it's just me being dumb, but I just don't get it.
here's an example pulled from the maya command examples (watch out for the broken indents):
import maya.cmds as cmds
def defaultButtonPush(*args):
print 'Default was pushed.'
cmds.repeatLast(ac=defaultButtonPush, acl="testtest")
cmds.window( width=150 )
cmds.columnLayout( adjustableColumn=True )
cmds.button( label='Default', command=defaultButtonPush )
cmds.showWindow()
when executed and the button pushed, all things are fine.
when I press 'g' to repeat last, I get this error:
<function defaultButtonPush at 0x1C1B0370>;
// Error: <function defaultButtonPush at 0x1C1B0370>; //
// Error: Line 1.1: Syntax error //
I've tried a few variations with some extra functions, but I still get this error.
I would appreciate any infos anyone could have about it.
thanks :)
