cwisbg

# rando selection face/vtx/edge (currently vtx)

Jan 8th, 2012
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. # rando selection face/vtx/edge (currently vtx)
  2.  
  3. from pymel.core import *
  4. import random as r
  5. sl = selected()
  6.  
  7. print sl[0].vtx
  8. randVtxSl=[]
  9. for i in range(0,len(sl[0].vtx),2):
  10.     randoVtx = r.randint(5,100)
  11.     randVtxSl.append('{0}.vtx[{1}]'.format(sl[0],i))  
  12. #for i in range(0,1):
  13. randoVtxX = r.randint(1,2)
  14. randoVtxY = r.randint(1,2)
  15. randoVtxZ = r.randint(1,2)
  16.    
  17. print randVtxSl
  18.  
  19. scale(randVtxSl, randoVtxX,randoVtxY,randoVtxZ, ws=1)
  20. rotate(randVtxSl, randoVtxX,randoVtxY,randoVtxZ, ws=1)
Advertisement
Add Comment
Please, Sign In to add comment