 |
| Alright, looking good! |
I managed to execute the floors and the side walls. All is left is the outer walls. I have difficulties executing the duplicates of the floor. I ask help from my friends and they gave me a hint about about making a group, and have 2 different functions for the pattern and the dimensions.
Followed their advice closely, and I managed to pull it off! YES!
My Script As At 20th January:
import maya.cmds as mc
import math
def createFloor():
myFloor = mc.polyCube( name = 'floor' )
mc.scale( 5, 1, 10, myFloor[0] )
mc.move( 0, 0.5, 0, myFloor[0] )
mc.polyMoveVertex( 'floor.vtx[5]', tx=-1.0 )
mc.polyMoveVertex( 'floor.vtx[7]', tx=-1.0 )
mc.polyMoveVertex( 'floor.vtx[4]', tx=1.0 )
mc.polyMoveVertex( 'floor.vtx[6]', tx=1.0 )
return myFloor
def multiFloors (exCreateFloor):
floorList = []
n = 0
nA = 0.2
for each in range(3):
myDup = mc.duplicate(exCreateFloor)
print myDup
mc.move( 0, n+5, 0, myDup[0] )
n = n+5
mc.polyMoveFacet( 'floor.f[2]', tz= 1+nA )
floorList.append( myDup[0] )
mc.delete('floor')
return floorList