from maya import cmdsimport myCode as my
WINID = "MyUI"
def ui(): if cmds.window(WINID, exists=True):
cmds.deleteUI(WINID)
cmds.window(WINID, title="TestUI", width=165, height=140, sizeable=False, resizeToFitChildren=True)
cmds.columnLayout(adjustableColumn=True)
cmd.rowColumnLayout(numberOfColumns=3, columnAttach=[1, "right", 0], columnWidth=[2, 250])
cmds.text(label="")
cmds.checkBox("chk01", label="My checkbox 01", value=True, changeCommand=my.get_state)
cmds.text(label="")
cmds.showWindow(WINID)
from maya import cmds
def get_state(*args): check_state = cmds.checkBox("chk01", value=True, query=True) print check_state# Error: get_state() takes no arguments (1 given)
# TypeError: get_state() takes no arguments (1 given) # --
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/4e7d9dea-a1de-4b9b-a01d-ad27c62e8de5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.