cwisbg

gui

Oct 1st, 2012
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #gui
  2. import pymel.core as pm
  3. class IdButtonWin(pm.ui.Window):
  4. _singleton = 1
  5. def __init__(self, *args):
  6. print 'here'
  7. self.title = "Test Return"
  8. self.buildUI()
  9. self.show()
  10. def sayHi(*args):
  11. if args is None:
  12. someValue += 1
  13. print "Hi"
  14. else:
  15. print "Args", someValue
  16. def buildUI(self):
  17. with self:
  18. with pm.frameLayout():
  19. pm.button(label='Hello', c=pm.Callback(self.sayHi))
  20. pm.button(label='Return', c=pm.Callback(self.sayHi, someValue))
  21. someValue = 0
  22. x = IdButtonWin()
Advertisement
Add Comment
Please, Sign In to add comment