Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #gui
- import pymel.core as pm
- class IdButtonWin(pm.ui.Window):
- _singleton = 1
- def __init__(self, *args):
- print 'here'
- self.title = "Test Return"
- self.buildUI()
- self.show()
- def sayHi(*args):
- if args is None:
- someValue += 1
- print "Hi"
- else:
- print "Args", someValue
- def buildUI(self):
- with self:
- with pm.frameLayout():
- pm.button(label='Hello', c=pm.Callback(self.sayHi))
- pm.button(label='Return', c=pm.Callback(self.sayHi, someValue))
- someValue = 0
- x = IdButtonWin()
Advertisement
Add Comment
Please, Sign In to add comment