cwisbg

fibTree v_0.1

Jan 30th, 2012
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.56 KB | None | 0 0
  1. """___________________
  2.    fibTree
  3.    version_0.1
  4.    
  5.    cwisbg
  6.    Brandon Gillespie
  7.    1/29/2012
  8. ______________________      
  9. """
  10.  
  11. from pymel.core import*
  12. import maya.cmds as mc
  13. import random as r
  14. def dupFib(c):# c = duplicate item
  15.     next = 0
  16.     x,z = 1,0
  17.     SideRange = 5
  18.     SideRange2 = 4
  19.     rotateY = 0
  20.     selection = []
  21.     for i in range(0,SideRange):
  22.         if i == SideRange2:  
  23.             copy = duplicate(c, n = 'copy_{0}'.format(i))[0]
  24.             move(copy, 0,6.18,0, os=1,r=1)
  25.             scale(copy, .618,.618,.618, ls=1,r=1)
  26.             selection.append(copy)
  27.         else:
  28.             copy = duplicate(c, n = 'copy_{0}'.format(i))[0]
  29.             move(copy, 0,6.18,0, os=1,r=1)
  30.             rotate(copy, 0,rotateY,0, os=1,r=1)
  31.             scale(copy, .618,.618,.618, ls=1,r=1)
  32.             rotate(copy, 61.8,0,0, os=1,r=1)
  33.             rotate(copy, 0,61.8,0, os=1,r=1)
  34.             selection.append(copy)
  35.             next += 1
  36.             rotateY += 90
  37.     return selection
  38. sl = selected()
  39. incra = 0
  40. for i in sl:
  41.     print 'on:',incra,'of', len(sl)
  42.     incra += 1
  43.     selection = dupFib(i)
  44.     for x in selection:
  45.         refresh(cw=1)
  46.         y = dupFib(x)
  47.         for z in y:
  48.             refresh(cw=1)
  49.             zz= dupFib(z)
  50. """            
  51.            for zy in zz:
  52.                refresh(cw=1)
  53.                xxx = dupFib(zy)
  54.            
  55.                for i in xxx:
  56.                    lo = dupFib(i)
  57.                    for x in lo:
  58.                        dupFib(lo)
  59.  
  60. """
Advertisement
Add Comment
Please, Sign In to add comment