Beispiel #1
0
def createRing(name, index):
    cmds.polyCylinder(r=1.288, sx=48, n=fn('cyl', index))
    cmds.polyTorus(n=fn('torus', index), sx=48, sy=24)
    cmds.polyBoolOp(fn('torus', index),
                    fn('cyl', index),
                    op=2,
                    n=fn(name, index))
    cmds.move(.407, y=True)
Beispiel #2
0
    def _createGeometry(self, side):
        mc.select(cl=True)
        self.r_hand_palm = mc.polyCube(sx=4,
                                       sy=4,
                                       sz=4,
                                       w=10,
                                       h=10,
                                       d=3,
                                       n='R_palm')[0]
        mc.move(0, 5, -1.5)
        self.r_hand_heal = mc.polyCube(w=10, h=2, d=2, n='R_heal')[0]
        mc.move(0, 1, 1, r=True)

        if side == Side.right:
            mc.select(self.r_hand_heal + '.e[7]')
        elif side == Side.left:
            mc.select(self.r_hand_heal + '.e[6]')

        mc.move(0, 2, 0, r=True)

        self.r_hand = mc.polyUnite(self.r_hand_heal,
                                   self.r_hand_palm,
                                   n='r_hand')[0]

        self.r_hand_n_1 = mc.polySphere(r=1.2, n="r_hand_n_1")[0]
        mc.move(-3.75, 9.25, -.5)
        self.r_hand_n_2 = mc.polySphere(r=1.2, n="r_hand_n_2")[0]
        mc.move(-1.25, 9.25, -.5)
        self.r_hand_n_3 = mc.polySphere(r=1.2, n="r_hand_n_3")[0]
        mc.move(1.25, 9.25, -.5)
        self.r_hand_n_4 = mc.polySphere(r=1.2, n="r_hand_n_4")[0]
        mc.move(3.75, 9.25, -.5)
        self.r_hand_n_t = mc.polySphere(r=1.2, n="r_hand_n_t")[0]

        if side == Side.right:
            mc.move(4.5, 2, 1.5)
        elif side == Side.left:
            mc.move(-4.5, 2, 1.5)

        #self.hand = mc.polyCBoolOp(self.r_hand, self.r_hand_n_1, self.r_hand_n_2, self.r_hand_n_3, self.r_hand_n_4, self.r_hand_n_t,
        #                       op=2, n='r_hand')

        ### we did this becuase maya is stupid, and 2014 does not have polyCBoolOp()

        self.hand = mc.polyBoolOp(self.r_hand,
                                  self.r_hand_n_1,
                                  op=2,
                                  n='r_hand')[0]
        self.hand = mc.polyBoolOp(self.hand, self.r_hand_n_2, op=2,
                                  n='r_hand')[0]
        self.hand = mc.polyBoolOp(self.hand, self.r_hand_n_3, op=2,
                                  n='r_hand')[0]
        self.hand = mc.polyBoolOp(self.hand, self.r_hand_n_4, op=2,
                                  n='r_hand')[0]
        self.hand = mc.polyBoolOp(self.hand, self.r_hand_n_t, op=2,
                                  n='r_hand')[0]
Beispiel #3
0
    def _createCalfArmor(self, name, side):
        p1 = mc.polySphere(r=10)[0]
        mc.scale(.35, 1.5, .75)
        mc.move(5, 0, 0)

        p2 = mc.polySphere(r=10)[0]
        mc.scale(.35, 1.5, .75)
        mc.move(-5, 0, 0)

        p3 = mc.polyCylinder(r=10, sx=40)[0]
        mc.rotate(0, 0, '90deg')
        mc.scale(1.5, 5, .75)

        #claf1 = mc.polyUnite(p1,p2,p3)
        #print calf1
        #calf1 = mc.polyBoolOp(p1, p3, op=1, n='calf')[0]
        #calf2 = mc.polyBoolOp(calf1, p2, op=1, n='calf')[0]

        p4 = mc.polyCube(w=10, h=10, d=10)[0]
        mc.move(0, 10, -5)
        p5 = mc.polyCube(w=10, h=10, d=10)[0]
        mc.move(0, 10, -5)
        p6 = mc.polyCube(w=10, h=10, d=10)[0]
        mc.move(0, 10, -5)

        c1 = mc.polyBoolOp(p1, p4, op=2)[0]
        c2 = mc.polyBoolOp(p2, p5, op=2)[0]
        c3 = mc.polyBoolOp(p3, p6, op=2)[0]
        claf1 = mc.polyUnite(c1, c2, c3)
        mc.sets(e=True, forceElement=self.color1)
        mc.move(0, 45, -10)

        self.tibia = mc.polyUnite(self.tibia, claf1)

        t1 = mc.polyCube(sx=3, sy=3, sz=3, w=10, h=10, d=10, n='thigh')[0]
        t1r = mc.polyBevel(ws=1, oaf=1, o=.5, sa=30)[0]
        mc.scale(1, 5, 1)
        mc.move(0, 75, -12, r=True)

        t3 = mc.polyCube(sx=3, sy=3, sz=3, w=10, h=15, d=10,
                         n='thight_armor')[0]
        mc.sets(e=True, forceElement=self.color1)
        t3r = mc.polyBevel(ws=1, oaf=1, o=.5, sa=30)[0]
        mc.scale(1.75, 3, 1.4)

        mc.move(0, 90, -9, r=True)

        self.femur = mc.polyUnite(self.femur, t1, t3)

        pass