Maya tmp

From Antoine Vienne | Wiki
Revision as of 02:33, 4 November 2019 by Walter (talk | contribs) (Created page with "=Maya tmp Scripts= === Maya Python - Random Translate === <pre> from maya import cmds import random numObjects = 4 for n in range(numObjects): obj = cmds.polyCube()...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Maya tmp Scripts

Maya Python - Random Translate

from maya import cmds
import random

numObjects = 4

for n in range(numObjects):
    obj = cmds.polyCube()
    cmds.setAttr(obj[0]+'.translateX', random.randint(0, 5))
    cmds.setAttr(obj[0]+'.translateY', random.randint(0, 5))
    cmds.setAttr(obj[0]+'.translateZ', random.randint(0, 5))