Created
May 20, 2015 06:59
-
-
Save santosh/ebeff0b4a995c9735815 to your computer and use it in GitHub Desktop.
Create multiple poly objects and translate it to random locations. #AutodeskMaya
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.cmds as mc | |
import random | |
for i in range(5): | |
x = random.uniform(-10.0, 10.0) | |
y = random.uniform(-10.0, 10.0) | |
z = random.uniform(-10.0, 10.0) | |
mycube = mc.polyCube(h=2, w=2, d=2, n="Object#") | |
mc.move(x, y, z, mycube) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment