Esempio n. 1
0
    def __init__(self,*args,**kwargs):
        super(SettingWindow,self).__init__(*args,**kwargs)
        self.setAutoFillBackground(True)
        self.resize(700,400)
        self.setWindowFlags( QtCore.Qt.WindowStaysOnTopHint);
        styleFile=os.path.join(os.path.split(__file__)[0],"darkorange.stylesheet")
        with open(styleFile,"r") as fh:
            self.setStyleSheet(fh.read())      
        self.setWindowIcon(QtGui.QIcon(':images/Snowball-icon.png'))
        self.setWindowTitle('Settings of Snowball Batch Renderer required to Initialize')
        self.setMinimumSize(400,200)
        self.setMaximumSize(700,200)

        self.settingFile   = settingFilePath.settingFile()
              
        self.defaultBatDir = ""
        self.mayaPrjPath   = ""
        self.nukePrjPath   = ""
        self.nukeAppl      = ""
        
        self.setFileDS={1:self.items,2:self.defaultBatDir,3:self.mayaPrjPath,4:self.nukePrjPath,5:self.nukeAppl}

        self.userDir = os.path.expanduser('~')
        winSvn= os.path.join(self.userDir,"Documents")
        if os.path.isdir(winSvn):
            snoBallSetting=os.path.join(winSvn,"Snowball","setting")
            if not os.path.isdir(snoBallSetting):
                os.makedirs(snoBallSetting)
            self.settingFile = os.path.join(snoBallSetting,"setting.txt")
        #####Create the UI#
        self.createUI()
        self.showReadSetting()
        self.connectSignals()
Esempio n. 2
0
    def __init__(self,*args,**kwargs):
        super(Window,self).__init__(*args,**kwargs)
        self.setWindowTitle("Snowball Batch Renderer")

        self.resize(700,400)
        self.setMinimumSize(400,300)
        self.setMaximumSize(700,400)
        self.setWindowIcon(QtGui.QIcon(':images/Snowball-icon.png'))
        self.defaultBatDir=""
        self.mayaPrjPath=""
        self.nukePrjPath=""
        self.nukeAppl=""
        # variable initialiezed to handle data to passed over to update nuke script
        self.updSf = ""      # isSettingChanged()
        self.updEf = ""      # updateNukeScript()
        self.updFmt = ""
        self.updChnl = ""

        self.css=("""
                    QPushButton {
                                font-size: 12px;
                                color: #272B39;
                                font-family: Segoe UI,MS Sans Serif;
                                border: 1px solid #000;
                                border-radius: 1px;
                                padding: 0px;
                                min-width: 20px;
                                background: qradialgradient(cx: 0.3, cy: -0.4,
                                fx: 0.3, fy: -0.4,
                                radius: 1.00, stop: 0 #888, stop: 1 #888);
                                }
                """)
        self.userDir = os.path.expanduser('~')
        self.settingFile = settingFilePath.settingFile()

        # set the default file filter
        #self.openfileFilters="All Image Formats(*.jpg *.png *.tiff *.gif *.tga *.cgi *.dpx);;"  
        self.openfileFilters="All Supported(*.ma *.mb *.nk);; Maya Ascii(*.ma);; Maya Binary( *.mb );; Nuke Script( *.nk ) ;; All Image Formats( *.jpg *.png *.tiff *.gif *.tga *.cgi *.dpx)"   

        self.items = self.readSettingFile()[1]

        self.createUI()

        self.setting=self.readSettingFile()

        self.nukePathApp = self.setting[5]
        self.batsDir=os.path.expanduser('~')
        self.getSelectedRendertype()
Esempio n. 3
0
        except Exception as e: print e
        finally: read_phile.close()

        lst = text.split("$i =")
        for each in lst:
            if each.split()[0].split(";")[0].isdigit() :
                if (each.split()[-1].split(";")[0].replace('"',"")).isalnum():
                    imageFormatIndex[each.split()[0].split(";")[0]] = each.split()[-1].split(";")[0].replace('"',"").upper()

        imageFormatIndex.update({'12':'YUV'})
        imageFormatIndex.update({'13':'SGI16'})
        imageFormatIndex.update({'4':'TIF16'})
        imageFormatIndex.update({'10':'MAYA16IFF'})
        imageFormatIndex.update({'7':'MAYAIFF'})
        return imageFormatIndex

def run():
    """Run the Snowball Batch Renderer"""    
    win = Window()
    win.show()
    win.raise_()
    sys.exit(app.exec_()) 

if __name__ =='__main__':    
    app = QtGui.QApplication(sys.argv)
    settingFile = settingFilePath.settingFile()
    if not os.path.isfile(settingFile):
        from settingWinUI import SettingWindow
        dialog = SettingWindow()
        if dialog.exec_() == dialog.Accepted: run()            
    else: run()