Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import maya.cmds as plg
- import random
- plg.polyCube( sx=5, sy=5, sz=5, n='plm' )
- scalingFactor = 6
- # Average all the vertices
- for x in range(0,len(plg.getAttr('plm.vtx[*]',size=True))):
- howFarX = random.random()/scalingFactor
- howFarY = random.random()/scalingFactor
- howFarZ = random.random()/scalingFactor
- whichOne = "plm.vtx[" + str(x) + "]"
- #plg.vtx[x].polyMoveVertex( setTranslateX=howFarX setTranslateY=howFarY setTranslateZ=howFarZ )
- plg.setAttr(whichOne, howFarX, howFarY, howFarZ, type="double3")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement