>
> I will get `# Error: TypeError: file <maya console> line 9: Invalid
> arguments for flag 'changeCommand'. Expected string or function, got
> NoneType # `
>
You need to pass the function object to change commands, currently you are
passing the result of calling greet().
I think this should work for you:
import maya.cmds as cmds
def greet(value):
print 'greet was called with value: {0}'.format(value)
print 'hello'
def main():
cmds.window()
cmds.columnLayout()
# () was added into greet under the command flag
cmds.symbolCheckBox(image='circle.png', changeCommand=greet)
cmds.showWindow()
main()
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPaTLMQmo%3DUxJ1aRT2auQ7aQOGj_7b_aFmTSWnnYTw7m0RDSCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.