Advertisement
jeffwincek

The Wiggler

Sep 29th, 2011
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import maya.cmds as plg
  2. import random
  3. plg.polyCube( sx=5, sy=5, sz=5, n='plm' )
  4. scalingFactor = 6
  5.  
  6. # Average all the vertices
  7. for x in range(0,len(plg.getAttr('plm.vtx[*]',size=True))):
  8.     howFarX = random.random()/scalingFactor
  9.     howFarY = random.random()/scalingFactor
  10.     howFarZ = random.random()/scalingFactor
  11.     whichOne = "plm.vtx[" + str(x) + "]"
  12.     #plg.vtx[x].polyMoveVertex( setTranslateX=howFarX setTranslateY=howFarY  setTranslateZ=howFarZ )
  13.     plg.setAttr(whichOne,  howFarX, howFarY, howFarZ, type="double3")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement