Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pymel.core import *
- import random as r
- def makeHouse(HouseAmnt):
- houseList = []
- def makeBase(height, width, depth):
- #base = polyCube(h=height, w=width, d=depth, sh=int(height*2), sw = int(width*2), sd = int(depth*2))[0]
- base = polyCube(h=height, w=width, d=depth)[0]
- move(base, 0,height/2,0)
- move(base.scalePivot, 0,0,0)
- move(base.rotatePivot, 0,0,0)
- makeIdentity(base, t=1,r=1,s=1,a=1)
- return base
- for h in range(1,HouseAmnt+1):
- rHeight = r.uniform(.2,2)
- rWidth = r.uniform(.2,2)
- rDepth = r.uniform(.5,1.5)
- newHouse = makeBase(rHeight, rWidth, rDepth)
- houseList.append(newHouse)
- return houseList
- HouseAmnt = 5
- houseList = makeHouse(HouseAmnt)
Advertisement
Add Comment
Please, Sign In to add comment