def refreshUI(self):

        for f in utils.getUType('faceModule'):

            self.currentFacialNodeCMB.clear()

            self.currentFacialNodeCMB.addItem(f)

            self.currentFace = face.FaceModule(faceNode=f)

            self.maskControlsLBL.setText(
                'Mask Controls: ' +
                str(len(self.currentFace.faceMask.controls)))

            if self.currentFace.jointMovers:

                self.facialMoversLBL.setText(
                    'Facial Joint Movers: ' +
                    str(len(self.currentFace.jointMovers)))

            self.maskGeoLBL.setText('Mask Geo: ' +
                                    self.currentFace.faceMask.maskGeo)

            if self.currentFace.sdks:

                self.drivenNodesLBL.setText('Driven Nodes: ' +
                                            str(len(self.currentFace.sdks)))
Exemple #2
0
    def refreshUI(self):

        for f in utils.getUType('faceModule'):

            self.currentFacialNodeCMB.addItem(f)

            self.currentFace = face.FaceModule(faceNode=f)

            self.buildPoseList()
Exemple #3
0
    def refreshUI(self):

        for f in utils.getUType('faceModule'):

            self.currentFacialNodeCMB.addItem(f)

            self.currentFace = face.FaceModule(faceNode=f)

            self.buildExportTree(self.currentFace.jointMovers)
 def refreshUI(self):
     oldIndex = self.currentFacialNodeCMB.currentIndex()
     for f in utils.getUType('faceModule'):
         self.currentFacialNodeCMB.addItem(f)
     if oldIndex != -1:
         self.currentFacialNodeCMB.setCurrentIndex(oldIndex)
     self.updateFaceAndMask()
     if self.currentFace.renderMeshes:
         self.meshEdit.setText(self.currentFace.renderMeshes[0])
 def refreshUI(self):
     for f in utils.getUType('faceModule'):
         self.currentFacialNodeCMB.clear()
         self.currentFacialNodeCMB.addItem(f)
         self.currentFace = face.FaceModule(faceNode=f)
         self.maskControlsLBL.setText('Mask Controls: ' + str(len(self.currentFace.faceMask.controls)))
         if self.currentFace.jointMovers:
             self.facialMoversLBL.setText('Facial Joint Movers: ' + str(len(self.currentFace.jointMovers)))
         self.maskGeoLBL.setText('Mask Geo: ' + self.currentFace.faceMask.maskGeo)
         if self.currentFace.sdks:
             self.drivenNodesLBL.setText('Driven Nodes: ' + str(len(self.currentFace.sdks)))
Exemple #6
0
    def refreshUI(self):

        oldIndex = self.currentFacialNodeCMB.currentIndex()

        for f in utils.getUType('faceModule'):

            self.currentFacialNodeCMB.addItem(f)

        if oldIndex != -1:

            self.currentFacialNodeCMB.setCurrentIndex(oldIndex)

        self.updateFaceAndMask()

        if self.currentFace.renderMeshes:

            self.meshEdit.setText(self.currentFace.renderMeshes[0])
Exemple #7
0
    def __init__(self, parent=getMayaWindow(), mode='choose', edit=0):

        QtGui.QMainWindow.__init__(self, parent)

        self.edit = edit

        self.currentFace = None

        #TODO this won't work with multiple faces

        for f in utils.getUType('faceModule'):

            print 'poseChooser_UI: Face initialized from:', f

            self.currentFace = face.FaceModule(faceNode=f)

        ### BUILD USER INTERFACE

        ##############################

        #create/set a central widget

        wid = QtGui.QWidget()

        self.setCentralWidget(wid)

        #setArt v2 stylesheet

        utils.setArtV2StyleSheet(wid, imageDirectory='/art2images')

        self.resize(400, 514)

        #top face module picker

        self.label = QtGui.QLabel(self)

        self.label.setText("FacialNode:")

        self.horizontalLayout = QtGui.QHBoxLayout()

        self.horizontalLayout.setSpacing(2)

        self.label.setMaximumSize(QtCore.QSize(78, 16777215))

        self.horizontalLayout.addWidget(self.label)

        self.currentFacialNodeCMB = QtGui.QComboBox(self)

        self.horizontalLayout.addWidget(self.currentFacialNodeCMB)

        #header and instruction

        self.h2 = QtGui.QHBoxLayout()

        self.attachJointLBL = QtGui.QLabel(self)

        if self.edit:

            self.attachJointLBL.setText("Edit Face Poses")

        else:

            self.attachJointLBL.setText("Available Face Poses")

        font = self.attachJointLBL.font()

        font.setBold(True)

        font.setPointSize(13)

        self.attachJointLBL.setFont(font)

        #options horizontal layout

        self.optionsLayout = QtGui.QHBoxLayout()

        if self.edit:

            #zero out button

            self.zeroBTN = QtGui.QPushButton(self)

            self.zeroBTN.setText('ZERO ALL')

            self.zeroBTN.setMaximumSize(QtCore.QSize(75, 50))

            #mirror edit out button

            self.mirrorPoseBTN = QtGui.QPushButton(self)

            self.mirrorPoseBTN.setText('MIRROR SELECTED POSE')

            #checkboxes

            self.moveMirrorsCHK = QtGui.QCheckBox(self)

            self.moveMirrorsCHK.setText('Sync Movement of Mirror Poses')

        self.info = QtGui.QLabel(self)

        if self.edit:

            self.info.setText(
                "Check and edit the facial poses to make them better match your character"
            )

        else:

            self.info.setText(
                "These poses are available for your character's facial rig, based on the Facial Joint Movers you have selected"
            )

        self.info.setWordWrap(1)

        self.h2.setSpacing(2)

        self.h2.addWidget(self.attachJointLBL)

        #main vertical layout

        self.verticalLayout = QtGui.QVBoxLayout(wid)

        self.verticalLayout.addLayout(self.horizontalLayout)

        self.verticalLayout.addLayout(self.h2)

        self.verticalLayout.addWidget(self.info)

        #pose list

        self.poseList = QtGui.QListWidget(self)

        self.verticalLayout.addWidget(self.poseList)

        QtCore.QMetaObject.connectSlotsByName(self)

        self.setWindowTitle("Available Facial Poses")

        if self.edit:

            #options area

            self.verticalLayout.addWidget(self.moveMirrorsCHK)

            self.verticalLayout.addLayout(self.optionsLayout)

            self.optionsLayout.addWidget(self.zeroBTN)

            self.optionsLayout.addWidget(self.mirrorPoseBTN)

        #continue button

        self.continueBTN = QtGui.QPushButton(self)

        self.continueBTN.setText('>> Continue >>')

        self.continueBTN.setObjectName("blueButton")

        font = self.continueBTN.font()

        font.setBold(True)

        font.setPointSize(12)

        self.continueBTN.setFont(font)

        #back button

        self.backBTN = QtGui.QPushButton(self)

        self.backBTN.setText('<< Back <<')

        self.backBTN.setObjectName("blueButton")

        font = self.backBTN.font()

        font.setBold(True)

        font.setPointSize(12)

        self.backBTN.setFont(font)

        #button layout on bottom

        self.h3 = QtGui.QHBoxLayout()

        self.verticalLayout.addLayout(self.h3)

        self.h3.setSpacing(2)

        self.h3.addWidget(self.backBTN)

        self.h3.addWidget(self.continueBTN)

        #self.verticalLayout.setContentsMargins(2,2,2,2)

        self.verticalLayout.setSpacing(3)

        #Make SDK transforms editable

        #hide facial mask controls and mask

        #show special eye and jaw movers

        #unhide jointMovers, make LRAs unselectable

        #connections

        self.currentFacialNodeCMB.currentIndexChanged.connect(
            self.faceChangedFn)

        #self.moverTree.itemClicked.connect(self.check_status)

        #self.continueBTN.pressed.connect(self.continueFn)

        #set the mask

        self.mask = face.FaceMask

        self.mask.active = True

        ### CONNECTS

        if self.edit:

            self.zeroBTN.pressed.connect(self.zeroAllFn)

        ### FILL UI

        ##############################

        self.refreshUI()
Exemple #8
0
    def __init__(self, parent=getMayaWindow(), debug=0):

        QtGui.QMainWindow.__init__(self, parent)

        self.currentFace = None

        #facial folder

        facialDir = os.path.dirname(__file__)

        for f in utils.getUType('faceModule'):

            print 'jointMover_UI: Face initialized from:', f

            self.currentFace = face.FaceModule(faceNode=f)

        ### BUILD USER INTERFACE

        ##############################

        #create/set a central widget

        wid = QtGui.QWidget()

        self.setCentralWidget(wid)

        #setArt v2 stylesheet

        utils.setArtV2StyleSheet(wid, imageDirectory='/art2images')

        self.resize(315, 514)

        #top face module picker

        self.label = QtGui.QLabel(self)

        self.label.setText("FacialNode:")

        self.horizontalLayout = QtGui.QHBoxLayout()

        self.horizontalLayout.setSpacing(2)

        self.label.setMaximumSize(QtCore.QSize(78, 16777215))

        self.horizontalLayout.addWidget(self.label)

        self.currentFacialNodeCMB = QtGui.QComboBox(self)

        self.horizontalLayout.addWidget(self.currentFacialNodeCMB)

        #attachment joint

        self.h2 = QtGui.QHBoxLayout()

        self.attachJointLBL = QtGui.QLabel(self)

        self.attachJointLBL.setText("Face Attachment Joint:")

        self.h2.setSpacing(2)

        self.h2.addWidget(self.attachJointLBL)

        self.attachJointLINE = QtGui.QLineEdit(self)

        self.h2.addWidget(self.attachJointLINE)

        #main vertical layout

        self.verticalLayout = QtGui.QVBoxLayout(wid)

        self.verticalLayout.addLayout(self.horizontalLayout)

        self.verticalLayout.addLayout(self.h2)

        #joint mover tree

        self.moverTree = QtGui.QTreeWidget(self)

        self.moverTree.setObjectName("treeWidget")

        self.moverTree.headerItem().setText(0, "1")

        self.verticalLayout.addWidget(self.moverTree)

        self.moverTree.setHeaderHidden(True)

        QtCore.QMetaObject.connectSlotsByName(self)

        self.setWindowTitle("Select Joint Movers")

        #snap button

        self.continueBTN = QtGui.QPushButton(self)

        self.continueBTN.setText('>> Continue >>')

        self.continueBTN.setObjectName("blueButton")

        font = self.continueBTN.font()

        font.setBold(True)

        font.setPointSize(12)

        self.continueBTN.setFont(font)

        #load button

        self.loadBTN = QtGui.QPushButton(self)

        self.loadBTN.setText('Template...')

        font = self.loadBTN.font()

        font.setBold(True)

        font.setPointSize(12)

        self.loadBTN.setFont(font)

        self.loadBTN.setMaximumSize(QtCore.QSize(75, 16777215))

        #button layout on bottom

        self.h3 = QtGui.QHBoxLayout()

        self.verticalLayout.addLayout(self.h3)

        self.h3.setSpacing(2)

        self.h3.addWidget(self.loadBTN)

        self.h3.addWidget(self.continueBTN)

        #connections

        self.moverTree.itemClicked.connect(self.check_status)

        self.continueBTN.pressed.connect(self.continueFn)

        #set the mask

        self.mask = self.currentFace.faceMask

        self.mask.active = True

        cmds.showHidden(self.currentFace.sdks)

        ### FILL UI

        ##############################

        self.attachJointLINE.setText('head')

        self.refreshUI()
 def refreshUI(self):
     for f in utils.getUType('faceModule'):
         self.currentFacialNodeCMB.addItem(f)
         self.currentFace = face.FaceModule(faceNode=f)
         self.buildPoseList()
    def __init__(self, parent=getMayaWindow(), mode='choose', edit=0):
        QtGui.QMainWindow.__init__(self, parent)

        self.edit = edit
        self.currentFace = None

        #TODO this won't work with multiple faces
        for f in utils.getUType('faceModule'):
            print 'poseChooser_UI: Face initialized from:', f
            self.currentFace = face.FaceModule(faceNode=f)

        ### BUILD USER INTERFACE
        ##############################

        #create/set a central widget
        wid = QtGui.QWidget()
        self.setCentralWidget(wid)

        #setArt v2 stylesheet
        utils.setArtV2StyleSheet(wid, imageDirectory='/art2images')

        self.resize(400, 514)

        #top face module picker
        self.label = QtGui.QLabel(self)
        self.label.setText("FacialNode:")
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setSpacing(2)
        self.label.setMaximumSize(QtCore.QSize(78, 16777215))
        self.horizontalLayout.addWidget(self.label)
        self.currentFacialNodeCMB = QtGui.QComboBox(self)
        self.horizontalLayout.addWidget(self.currentFacialNodeCMB)

        #header and instruction
        self.h2 = QtGui.QHBoxLayout()
        self.attachJointLBL = QtGui.QLabel(self)

        if self.edit:
            self.attachJointLBL.setText("Edit Face Poses")
        else:
            self.attachJointLBL.setText("Available Face Poses")

        font = self.attachJointLBL.font()
        font.setBold(True)
        font.setPointSize(13)
        self.attachJointLBL.setFont(font)

        #options horizontal layout
        self.optionsLayout = QtGui.QHBoxLayout()

        if self.edit:
            #zero out button
            self.zeroBTN = QtGui.QPushButton(self)
            self.zeroBTN.setText('ZERO ALL')
            self.zeroBTN.setMaximumSize(QtCore.QSize(75, 50))

            #mirror edit out button
            self.mirrorPoseBTN = QtGui.QPushButton(self)
            self.mirrorPoseBTN.setText('MIRROR SELECTED POSE')

            #checkboxes
            self.moveMirrorsCHK = QtGui.QCheckBox(self)
            self.moveMirrorsCHK.setText('Sync Movement of Mirror Poses')

        self.info = QtGui.QLabel(self)
        if self.edit:
            self.info.setText("Check and edit the facial poses to make them better match your character")
        else:
            self.info.setText("These poses are available for your character's facial rig, based on the Facial Joint Movers you have selected")
        self.info.setWordWrap(1)

        self.h2.setSpacing(2)
        self.h2.addWidget(self.attachJointLBL)


        #main vertical layout
        self.verticalLayout = QtGui.QVBoxLayout(wid)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout.addLayout(self.h2)
        self.verticalLayout.addWidget(self.info)

        #pose list
        self.poseList = QtGui.QListWidget(self)
        self.verticalLayout.addWidget(self.poseList)

        QtCore.QMetaObject.connectSlotsByName(self)

        self.setWindowTitle("Available Facial Poses")

        if self.edit:
            #options area
            self.verticalLayout.addWidget(self.moveMirrorsCHK)
            self.verticalLayout.addLayout(self.optionsLayout)
            self.optionsLayout.addWidget(self.zeroBTN)
            self.optionsLayout.addWidget(self.mirrorPoseBTN)


        #continue button
        self.continueBTN = QtGui.QPushButton(self)
        self.continueBTN.setText('>> Continue >>')
        self.continueBTN.setObjectName("blueButton")
        font = self.continueBTN.font()
        font.setBold(True)
        font.setPointSize(12)
        self.continueBTN.setFont(font)

        #back button
        self.backBTN = QtGui.QPushButton(self)
        self.backBTN.setText('<< Back <<')
        self.backBTN.setObjectName("blueButton")
        font = self.backBTN.font()
        font.setBold(True)
        font.setPointSize(12)
        self.backBTN.setFont(font)

        #button layout on bottom
        self.h3 = QtGui.QHBoxLayout()
        self.verticalLayout.addLayout(self.h3)
        self.h3.setSpacing(2)
        self.h3.addWidget(self.backBTN)
        self.h3.addWidget(self.continueBTN)

        #self.verticalLayout.setContentsMargins(2,2,2,2)
        self.verticalLayout.setSpacing(3)

        #Make SDK transforms editable
        #hide facial mask controls and mask

        #show special eye and jaw movers

        #unhide jointMovers, make LRAs unselectable

        #connections
        self.currentFacialNodeCMB.currentIndexChanged.connect(self.faceChangedFn)
        #self.moverTree.itemClicked.connect(self.check_status)
        #self.continueBTN.pressed.connect(self.continueFn)

        #set the mask
        self.mask = face.FaceMask
        self.mask.active = True

        ### CONNECTS
        if self.edit:
            self.zeroBTN.pressed.connect(self.zeroAllFn)

        ### FILL UI
        ##############################

        self.refreshUI()
    def __init__(self, parent=getMayaWindow(), debug=0):
        QtGui.QMainWindow.__init__(self, parent)
        
        self.currentFace = None
        
        #facial folder
        facialDir = os.path.dirname(__file__)

        for f in utils.getUType('faceModule'):
            print 'jointMover_UI: Face initialized from:', f
            self.currentFace = face.FaceModule(faceNode=f)
        
        ### BUILD USER INTERFACE
        ##############################
        
        #create/set a central widget
        wid = QtGui.QWidget()
        self.setCentralWidget(wid)
        
        #setArt v2 stylesheet
        utils.setArtV2StyleSheet(wid, imageDirectory='/art2images')
        
        self.resize(315, 514)
        
        #top face module picker
        self.label = QtGui.QLabel(self)
        self.label.setText("FacialNode:")
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setSpacing(2)
        self.label.setMaximumSize(QtCore.QSize(78, 16777215))
        self.horizontalLayout.addWidget(self.label)
        self.currentFacialNodeCMB = QtGui.QComboBox(self)
        self.horizontalLayout.addWidget(self.currentFacialNodeCMB)
        
        #attachment joint
        self.h2 = QtGui.QHBoxLayout()
        self.attachJointLBL = QtGui.QLabel(self)
        self.attachJointLBL.setText("Face Attachment Joint:")
        self.h2.setSpacing(2)
        self.h2.addWidget(self.attachJointLBL)
        self.attachJointLINE = QtGui.QLineEdit(self)
        self.h2.addWidget(self.attachJointLINE)
        
        #main vertical layout
        self.verticalLayout = QtGui.QVBoxLayout(wid)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout.addLayout(self.h2)
        
        #joint mover tree
        self.moverTree = QtGui.QTreeWidget(self)
        self.moverTree.setObjectName("treeWidget")
        self.moverTree.headerItem().setText(0, "1")
        self.verticalLayout.addWidget(self.moverTree)
        self.moverTree.setHeaderHidden(True)
        
        QtCore.QMetaObject.connectSlotsByName(self)
        
        self.setWindowTitle("Select Joint Movers")

        
        #snap button
        self.continueBTN = QtGui.QPushButton(self)
        self.continueBTN.setText('>> Continue >>')
        self.continueBTN.setObjectName("blueButton")
        font = self.continueBTN.font()
        font.setBold(True)
        font.setPointSize(12)
        self.continueBTN.setFont(font)
        
        #load button
        self.loadBTN = QtGui.QPushButton(self)
        self.loadBTN.setText('Template...')
        font = self.loadBTN.font()
        font.setBold(True)
        font.setPointSize(12)
        self.loadBTN.setFont(font)
        self.loadBTN.setMaximumSize(QtCore.QSize(75, 16777215))
        
        #button layout on bottom
        self.h3 = QtGui.QHBoxLayout()
        self.verticalLayout.addLayout(self.h3)
        self.h3.setSpacing(2)
        self.h3.addWidget(self.loadBTN)
        self.h3.addWidget(self.continueBTN)
        
        #connections
        self.moverTree.itemClicked.connect(self.check_status)
        self.continueBTN.pressed.connect(self.continueFn)
        
        #set the mask
        self.mask = self.currentFace.faceMask
        self.mask.active = True
        cmds.showHidden(self.currentFace.sdks)
        
        ### FILL UI
        ##############################
        
        self.attachJointLINE.setText('head')
        self.refreshUI()
 def refreshUI(self):
     for f in utils.getUType('faceModule'):
         self.currentFacialNodeCMB.addItem(f)
         self.currentFace = face.FaceModule(faceNode=f)
         self.buildExportTree(self.currentFace.jointMovers)