Skip to content

Instantly share code, notes, and snippets.

@heiths
Last active December 17, 2015 15:18
Show Gist options
  • Save heiths/5630258 to your computer and use it in GitHub Desktop.
Save heiths/5630258 to your computer and use it in GitHub Desktop.
cube test
from pymel.core import *
def cubeCube():
rows = int(raw_input("rows"))
columns = int(raw_input("columns"))
hight = int(raw_input("hight"))
r = 0
c = 0
h = 0
for i in range(0, rows * columns * hight):
p = polyCube(name = "box_i-{0}_r-{1}_c-{2}_h-{3}".format(i, r, c, h))[0]
if c == columns and r == rows:
h += 1
c = 0
r = 0
if c == columns:
r += 1
c = 0
p.t.set(r, h, c)
c += 1
print("i = {0}\tr = {1}\tc = {2}\th = {3}".format(i, r, c, h))
cubeCube()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment