Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pymel.core import *
- import random as r
- print rando
- x = 0
- ping = []
- for i in range(-20,21): #Range for Ping
- ping.append(i)
- ra = 101 #Range
- xx = 0
- baseParent = [polyCube(n='baseParent',h=.5,d=.5,w=.5)[0]]
- rotate(baseParent, 5,3,19)
- for i in range(0,ra):
- if i == 0:
- x /= 2
- if x == len(ping):
- ping.reverse()
- x = 0
- rando = r.randint(0,len(ping)-1)
- rando2 = r.randint(0,len(ping)-1)
- rando3 = r.randint(0,1)
- cuby = [polyCube(n='pCube_{0}'.format(i))][0][0]
- yy = [rando, rando2]
- zz = [rando2, rando]
- # rotate(cuby,0,45,0,os=1)
- move(cuby.sp,0,0,-.5,r=1) # move scale pivot
- move(cuby.rp,0,0,-.5,r=1) # move rotate pivot
- move(cuby, yy[rando3], zz[rando3], i, ls=1) # move cube
- scale(cuby, 1,1,1,
- print ping[rando]
- #parent the cubes to each other in a line
- parent(cuby, baseParent[i])
- baseParent.append(cuby)
- x += 1
- xx += 1
- # print i
- print '_________________________________'
- x = ra
- for i in range(0,ra):
- sl = select(baseParent[x],add =1 )
- print x
- x -= 1
Advertisement
Add Comment
Please, Sign In to add comment