Exemplo n.º 1
0
    def addParentSpace(self):
        sel = pm.ls(sl=True)

        if not sel:
            logger.warn('Selecione um objeto para space switch')
            return

        # todo se nao existir um grupo pai, pedir pra adicionar

        if not sel[0].getParent():
            flags = QtGui.QMessageBox.StandardButton.Yes
            flags |= QtGui.QMessageBox.StandardButton.No
            question = "criar um grupo acima?"
            response = QtGui.QMessageBox.question(self, "Question",
                                                  question,
                                                  flags)
            if response:
                groupTools.zeroOut()

        spacelist = [x.text() for x in self.ui.spaceList_listWidget.selectedItems()]
        logger.debug(spacelist)

        # todo ver se ja existe o space a ser adicionado no switcher
        pm.undoInfo(openChunk=True)
        try:
            spaceTools.addSpc(target=sel[0], switcher=sel[0].getParent(),
                              type='parent', spaceList=spacelist)
        finally:
            pm.undoInfo(closeChunk=True)
Exemplo n.º 2
0
    def lookAt_doRig(self):
        headJnt = self.getObjFromField(self.ui.lookat_headJnt_txt)

        pm.undoInfo(openChunk=True)
        try:
            self.lookAt.doRig(upVectorObj=headJnt)

            try:
                space.addSpc(self.lookAt.lookAt_ctrl,
                             ['global', 'head', 'cog'],
                             self.lookAt.lookAt_ctrl.getParent())
            except:
                pass
        finally:
            pm.undoInfo(closeChunk=True)
Exemplo n.º 3
0
    def addOrientSpace(self):
        sel = pm.ls(sl=True)
        if len(sel) > 2:
            logger.warn('Selecione um objeto para space switch e outro para posicao')
            return

        spacelist = [x.text() for x in self.ui.spaceList_listWidget.selectedItems()]
        logger.debug(spacelist)

        # todo ver se ja existe o space a ser adicionado no switcher
        pm.undoInfo(openChunk=True)
        try:
            spaceTools.addSpc(target=sel[0], switcher=sel[0].getParent(),
                              type='orient', spaceList=spacelist, posSpc=sel[1])
        finally:
            pm.undoInfo(closeChunk=True)
Exemplo n.º 4
0
        pass

    try:
        srcGrp = pm.PyNode (src + '_sys_grp')
        pm.parent (jnt, srcGrp)
    except:
        pass


###Source01
#EYEDIR
ed = lookAt.EyesDir(name='lookAt')
ed.doGuide(eyeball=olhoesq)
headJnt = pm.PyNode('head_jnt')
ed.doRig(upVectorObj=headJnt)
space.addSpc(ed.lookAt_ctrl, ['global', 'head', 'cog'], ed.lookAt_ctrl.getParent())

j = jaw.Jaw(name='jaw')
j.doGuide()
j.doRig()
j.getDict()


#EYELIDS
e = eyelid.EyeLid(name='L_eyeLid', mesh='Esquimo_Cabeca_source01')
f = eyelid.EyeLid(name='R_eyeLid', mesh='Esquimo_Cabeca_source01')

edges = pm.ls(sl=True, fl=True) #selecione um edgeloop
eyeball = pm.PyNode(olhoesq)

e.doGuide(eyeball=eyeball, edgeLoop=edges)