So how do I capture it? I tried creating another function but it seems to be screwing it up...
Code:
def optionMenuCallback(*args): fn = cmds.menuItem (args[0], q=True, c=True) if fn: fn() def menu1Callback(): startAnimation = cmds.playbackOptions(query=True, minTime=True) endAnimation = cmds.playbackOptions(query=True, maxTime=True) def menu2Callback(): startAnimation = cmds.findKeyframe(which='first') endAnimation = cmds.findKeyframe(which='last') w = cmds.window(w=150, h=100) cmds.columnLayout(adjustableColumn=True) form = cmds.formLayout(numberOfDivisions=100) exportSelection = cmds.optionMenuGrp(label='example', cc=optionMenuCallback) menuItem1 = cmds.menuItem('item1', c = menu1Callback) menuItem2 = cmds.menuItem('item2', c= menu2Callback) okayBtn = cmds.button(label='okay!', command=self.buttonPressed, width=150, height=35) cmds.formLayout(form, edit=True, attachForm=[\ (exportSelection, 'top', 18),\ (exportSelection, 'left', 45),\ (okayBtn, 'left', 70),\ (okayBtn, 'top', 90)]) cmds.showWindow(w)