Пример #1
0
    def setWorkUnits(self):

        #load path and config
        path_config = cfgl.configLoader()[99:101]

        if self.cboxSysUnits.currentIndex() == 0:
            cmds.currentUnit(linear='m')
            self.lblInfo_01.setText("Units changed to m")
            print "Units changed to m"
            cfgl.ConfigWriter('Units', 'Custom_System_type_units', 'm',
                              path_config[0], path_config[1])

        if self.cboxSysUnits.currentIndex() == 1:
            cmds.currentUnit(linear='cm')
            self.lblInfo_01.setText("Units changed to cm")
            print "Units changed to cm"
            cfgl.ConfigWriter('Units', 'Custom_System_type_units', 'cm',
                              path_config[0], path_config[1])

        if self.cboxSysUnits.currentIndex() == 2:
            cmds.currentUnit(linear='mm')
            self.lblInfo_01.setText("Units changed to mm")
            print "Units changed to mm"
            cfgl.ConfigWriter('Units', 'Custom_System_type_units', 'mm',
                              path_config[0], path_config[1])
Пример #2
0
    def setWorkUnits(self):

        #load path and config
        PathConfig = cfgl.configLoader()[99:101]

        if self.cboxSysUnits.currentIndex() == 0:
            rt.execute("units.Systemtype = #meters")
            self.lblInfo_01.setText("Units changed to meters")
            print(self.lblInfo_01.text())
            cfgl.ConfigWriter('Units', 'Custom_System_type_units', 'meters',
                              PathConfig[0], PathConfig[1])

        if self.cboxSysUnits.currentIndex() == 1:
            rt.execute("units.Systemtype = #centimeters")
            self.lblInfo_01.setText("Units changed to centimeters")
            print(self.lblInfo_01.text())
            cfgl.ConfigWriter('Units', 'Custom_System_type_units',
                              'centimeters', PathConfig[0], PathConfig[1])

        if self.cboxSysUnits.currentIndex() == 2:
            rt.execute("units.Systemtype = #millimeters")
            self.lblInfo_01.setText("Units changed to millimeters")
            print(self.lblInfo_01.text())
            cfgl.ConfigWriter('Units', 'Custom_System_type_units',
                              'millimeters', PathConfig[0], PathConfig[1])
Пример #3
0
 def textureResChange(self):
     path_config = cfgl.configLoader()[99:101]
     current_resolution_value = str(self.cboxTexRes.currentIndex())
     cfgl.ConfigWriter('Texel', 'Map_resolution', current_resolution_value, path_config[0], path_config[1])
     
     #check Square or Not
     self.checkSquareMap()   
Пример #4
0
    def btnRusLangPressed(self):
        
        self.btnEngLang.setChecked(False)

        #for press again
        if self.btnRusLang.isChecked() == True:
            self.btnEngLangPressed()

        #change lang
        path_config = cfgl.configLoader()[99:101]
        cfgl.ConfigWriter('Languge', 'current_languge', 'rus', path_config[0], path_config[1])
Пример #5
0
 def checkTexelValue(self):
     try:
         self.lblInfo_01.setText("")
         
         #Write to config
         path_config = cfgl.configLoader()[99:101]
         current_texel_value = self.edtCurTexel.text()
         cfgl.ConfigWriter('In-Range', 'Texel', current_texel_value, path_config[0], path_config[1])
         
     except:
         self.showInfo ("warn", "Please input correct Integer value in range 1-10000. Now default value (256) was returned.")
         self.edtCurTexel.setText("256")
Пример #6
0
 def tinyFinEdit(self):
     try:
         tiny_it = float(self.edtTinyIt.text())
         
         if (tiny_it<0.0001) or (tiny_it>1000):
             self.tinyWarning()
         
         #Write to config
         path_config = cfgl.configLoader()[99:101]
         current_tinit_value = self.edtTinyIt.text()
         cfgl.ConfigWriter('In-Range', 'Tiny_it', current_tinit_value, path_config[0], path_config[1])
                         
     except:
         self.tinyWarning()
Пример #7
0
 def checkDesiredTexel(self):
     
     try:
         texel = (float(self.edtSetTex.text())/100)
         
         if (texel<0.01):
             self.setTexelWarningText()
         
         #Write to config
         path_config = cfgl.configLoader()[99:101]
         current_desired_texel = self.edtSetTex.text()
         cfgl.ConfigWriter('Texel', 'desired_texel', current_desired_texel, path_config[0], path_config[1])        
                      
     except:
         self.setTexelWarningText()        
Пример #8
0
 def tinyPXFinEdit(self):
     #Write to config
     path_config = cfgl.configLoader()[99:101]
     current_tiny_value = self.edtTinyPX.text()
     cfgl.ConfigWriter('In-Range', 'Tiny UV', current_tiny_value, path_config[0], path_config[1])
Пример #9
0
 def diffFinEdit(self):
     #Write to config
     path_config = cfgl.configLoader()[99:101]
     current_diff_value = str(self.spnDiff.value())
     cfgl.ConfigWriter('In-Range', 'Difference', current_diff_value, path_config[0], path_config[1])