Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pymel.core import *
- import time
- import random as r
- import math
- start = time.clock()
- def grpr(name):
- g = ls(name)
- if g:
- delete(g)
- g = group(n=name,em=1)
- return g
- def MakePieces():
- pieceList = []
- PieceGrp = grpr("PiecesGrp")
- Floor = polyPlane(n="Floor",sw=1,sh=1)
- parent(Floor,PieceGrp)
- pieceList.append(Floor)
- return pieceList
- class BuildingPiece:
- def __init__(self):
- self.obj = []
- self.validId = [0,0,0,0,0] # Side identifyers
- self.validOk = [] # valid sides to match
- self.pieceId = 0 # object index in group
- pieceList = MakePieces()
- select(cl=1)
- elapsed = (time.clock() - start)
- print elapsed
Advertisement
Add Comment
Please, Sign In to add comment