SHARE
TWEET

The Wiggler

jeffwincek Sep 29th, 2011 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top