Пример #1
0
 def __init__(self,parent,mainUi):
     
     self.mainUi = mainUi
     self.__popuItems = []
     
     pm.setParent(parent)
     self.mainL = pm.columnLayout(adj = 1)
     pm.separator(h = 10)
     
     #(self,baseName = 'arm',side = 'l',size = 1.5,
     self.name = pm.text(l = '**** Spine Module ****')       
     self.baseNameT = pm.textFieldGrp(l = 'baseName : ',ad2 = 1,text = 'spine',cl2 = ['left','left'])
     self.sideT = pm.textFieldGrp(l = 'side :',ad2 = 1,text = 'm',cl2 = ['left','left'])
     self.cntAxisT = pm.textFieldGrp(l = 'ctrl Axis :',ad2 = 1,text = 'y',cl2 = ['left','left'])
     self.cntSizeBody = pm.floatFieldGrp(l = 'ctrl Size : ',cl2 = ['left','left'],ad2 = 1,numberOfFields = 1,value1 = 2)    
     self.cntSizeIk = pm.floatFieldGrp(l = 'ik Size : ',cl2 = ['left','left'],ad2 = 1,numberOfFields = 1,value1 = 1.8)        
     self.segment = pm.intFieldGrp(l = 'segment Number : ',cl2 = ['left','left'],ad2 = 1,numberOfFields = 1,value1 = 9) 
     self.mainMetaNodeM = pm.optionMenu(l = 'mainMeta : ')
     metaUtils.metaSel()
     
     self.removeB = pm.button(l = 'remove',c = self.__removeInstance)
     pm.separator(h = 10)
     
     self.__pointerClass = None
Пример #2
0
    def __init__(self,parent,mainUi):
        
        #mirror para
        ###
        self.axis = [1,1,1]
        ###
        
        self.mainUi = mainUi
        self.__popuItems = []
 
        pm.setParent(parent)
        self.mainL = pm.columnLayout(adj = 1) 
        self.name = pm.text(l = '**** Tool Module ****')          
        pm.separator(h = 10)
                
        #metaSel
        #all
        self.jointSel = pm.frameLayout('joint Select Tool : ',cll=1,p = self.mainL,cl = 1)
        
        #skin Joint
        self.skinJointSel = pm.frameLayout('skinJoint Select Tool : ',cll=1,p = self.jointSel,cl = 1)
        self.skinJointMenu = pm.optionMenu(l = 'meta : ')
        metaUtils.metaSel()  
        pm.button(l = 'select Sel Meta Skin Joint',c = self.__selMetaSkinJoint,p = self.skinJointSel)
        pm.button(l = 'select All Skin Joint',c = self.__selAllMetaSkinJoint,p = self.skinJointSel)

        #partial Joint
        self.partialSkinJointSel = pm.frameLayout('skinPartialJoint Select Tool : ',cll=1,p = self.jointSel,cl = 1)
        self.partialSkinJointMenu = pm.optionMenu(l = 'meta : ')
        metaUtils.metaSel()
        pm.button(l = 'select PartialSkin Joint',c = self.__selPartialSkinJoint,p = self.partialSkinJointSel)
        
        #blendShape
        self.mirrorBlendShapeTool = pm.frameLayout('mirror Blend Shape',cl=1,cll=1,p = self.mainL)
        self.baseShapeSel = pm.textFieldGrp(l = 'baseShape : ',ad2 = 1,text = 'plz sel base shape',cl2 = ['left','left'],ed = 0)
        pm.button(l = 'load Base Shape',c = self.__loadBaseShapeSelection,p = self.mirrorBlendShapeTool)
        self.sculptedShapeSel = pm.textFieldGrp(l = 'sculptedShape : ',ad2 = 1,text = 'plz sel scuplted shape',cl2 = ['left','left'],ed = 0)
        pm.button(l = 'load Final Shape',c = self.__loadSculptedShapeSelection,p = self.mirrorBlendShapeTool)
        pm.button('Mirror',c = self.__mirrorBlendShape,p = self.mirrorBlendShapeTool)
        
        #skinTool
        self.skinAreaTool = pm.frameLayout('skin Area Tool : ',cll=1,p = self.mainL,cl = 1)      
        pm.button('skin Area Weight',c = self.__areaSkin) 
        
        #splitJoint
        self.splitJoint = pm.frameLayout('split Joint Tool : ',cll=1,p = self.mainL,cl = 1)
        self.splitNum = pm.intSliderGrp('intSliderGrp2',min = 1,max = 10,f = 1,s = 1,v = 1)
        pm.button('split Joint',c = self.__splitJointButton) 
        
        #shapeSize
        self.shape = pm.frameLayout('curve Shape Tool : ',cll=1,p = self.mainL,cl = 1)
        self.shapeLayout = pm.columnLayout('shapeLayout',adj=1)  
        
        #mirrorSize
        pm.text('mirror Axis : ')
        self.xAxis = pm.button('X axis ',c = self.__setXAxis)
        self.zAxis = pm.button('Z axis ',c = self.__setZAxis)
        
        #ctrlShapes
        self.ctrlShapeSel = pm.frameLayout('ctrl Curve Select Tool : ',cll=1,p = self.mainL,cl = 1)
        self.ctrlShapeSelMenu = pm.optionMenu(l = 'meta : ')
        metaUtils.metaSel()  
        pm.button(l = 'select Sel Meta Ctrl Tool',c = self.__selMetaCtrlShape,p = self.ctrlShapeSel)        
        
        #scaleCurve
        self.sizeLayout = pm.rowLayout(p = self.shapeLayout,adj = 1,nc = 10)
        pm.button('scale curve',c = self.__scaleCv) 
        self.sizeFloatSlider = pm.floatSliderGrp('cvSize',f=1,max=1.0,v=0.0,min=-1.0)
        
        #remove this panel
        pm.separator(h = 10,p = self.mainL)
        self.removeB = pm.button(l = 'remove',c = self.__removeInstance,p = self.mainL)
        pm.separator(h = 10)
        
        self.__pointerClass = None