cwisbg

Quick animate

Jun 4th, 2014
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. #Quick animate
  2. from pymel.core import *
  3. """
  4. sj = scriptJob(e= "SelectionChanged", ct)
  5. for s in sj:
  6.    print s
  7. """
  8. def selector():
  9.     sl = selected()
  10.     print "_______"
  11.     print sl
  12.    
  13. def startS():
  14.     global sj
  15.     sj = scriptJob(e= ("SelectionChanged",selector))
  16.     print "Start"
  17. def stopS():
  18.     scriptJob(k=sj)
  19.     print "Stop"
  20.  
  21.  
  22.  
  23.  
  24. from pymel.core import *    
  25. win = window(title= "Gui", s=0)
  26. mainLayout = rowColumnLayout(nc=1)
  27.  
  28. startBtn = button(l="Start", command=Callback(startS),w=100)
  29. stopBtn = button(l="Stop", command=Callback(stopS))
  30.  
  31.  
  32. win.show()
Advertisement
Add Comment
Please, Sign In to add comment