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' )
- def wiggler(whichOne, howMuch):
- activeO = whichOne
- scalingFactor = int(howMuch)
- # iterate through all of the verticies and wiggle them
- for x in range(0,len(plg.getAttr(activeO[0]+ '.vtx[*]',size=True))):
- plm = str(activeO[0]) + '.vtx[' + str(x) + ']'
- print 'changing ' + plm + ' now'
- howFarX = random.random()/scalingFactor
- howFarY = random.random()/scalingFactor
- howFarZ = random.random()/scalingFactor
- #plg.vtx[x].polyMoveVertex( setTranslateX=howFarX setTranslateY=howFarY setTranslateZ=howFarZ )
- plg.setAttr(plm, howFarX, howFarY, howFarZ, type="double3")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement