cwisbg

Mesh Seperator v_0.2

Feb 15th, 2012
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. """___________________
  2.    Mesh Seperator    
  3.    version_0.2
  4.    
  5.    cwisbg
  6.    
  7.    2/15/2012
  8. ______________________      
  9. """
  10. from pymel.core import*
  11. import time
  12. start = time.clock()
  13. sl = selected()
  14. faceLength = len(sl[0].f)
  15. face = []
  16. a = 0
  17. b = 249   # Split by b faces
  18. incra = b + 1
  19. x = 1
  20. z = 0
  21. while x:
  22.     face.append(sl[0].f[a:b])
  23.     polyChipOff(face[:], ch=1, kft=1, dup=0)
  24.     a += incra
  25.     b += incra    
  26.     face = []
  27.     if b >= faceLength:
  28.         x -= 1
  29. polySeparate(sl[0], ch=0)
  30. elapsed = (time.clock() - start)
  31. print "done, took:", elapsed
Advertisement
Add Comment
Please, Sign In to add comment