AFAIK, maya provides no way to get this information. under the hood pymel is doing the equivalent of this:
cmds.button(str(but), q=1, command=1) which just returns an empty string. On Mon, May 24, 2010 at 3:59 PM, hapgilmore <[email protected]> wrote: > Example Code: > > def printFoo(): > print 'foo' > > win = Window() > col = columnLayout() > but = Button() > but.setCommand(Callback(printFoo)) > cmd = but.getCommand() > # Result: # > > but.setCommand('Callback(printFoo)') > cmd = but.getCommand() > # Result: Callback(printFoo) # > #however, turning the command into a string prevents it from working > > is this a PyMel bug? > > -- > http://groups.google.com/group/python_inside_maya -- http://groups.google.com/group/python_inside_maya
