示例#1
0
文件: Queue.py 项目: lightvfx/LYPA
    def refreshMe(self):
        model.setup_all()
        self.ui.list.clear()

        
        for task in model.Task.query.all():
            item = QtGui.QTreeWidgetItem([str(task.Name),str(task.Type),str(task.Status),str(task.Node),str(task.Pid)])

            
            item.setForeground(1,QtGui.QColor(160, 165, 170))
            if task.Status < 100:
                item.setForeground(0,QtGui.QColor(160, 250, 160))
                item.setForeground(2,QtGui.QColor(160, 250, 160))
            elif task.Status == 101:
                item.setForeground(0,QtGui.QColor(250, 220, 160))
                item.setForeground(2,QtGui.QColor(250, 220, 160))
            else:
                item.setForeground(0,QtGui.QColor(160, 165, 170))
                item.setForeground(2,QtGui.QColor(160, 165, 170))
            item.setForeground(3,QtGui.QColor(160, 165, 170))
            #item.setText(0, str(rec["comment"]))
            self.ui.list.addTopLevelItem(item)
        
        for column in range(self.ui.list.columnCount()):   
            self.ui.list.resizeColumnToContents(column)
示例#2
0
文件: Queue.py 项目: lightvfx/LYPA
    def refreshMe(self):
        model.setup_all()
        self.ui.list.clear()

        for task in model.Task.query.all():
            item = QtGui.QTreeWidgetItem([
                str(task.Name),
                str(task.Type),
                str(task.Status),
                str(task.Node),
                str(task.Pid)
            ])

            item.setForeground(1, QtGui.QColor(160, 165, 170))
            if task.Status < 100:
                item.setForeground(0, QtGui.QColor(160, 250, 160))
                item.setForeground(2, QtGui.QColor(160, 250, 160))
            elif task.Status == 101:
                item.setForeground(0, QtGui.QColor(250, 220, 160))
                item.setForeground(2, QtGui.QColor(250, 220, 160))
            else:
                item.setForeground(0, QtGui.QColor(160, 165, 170))
                item.setForeground(2, QtGui.QColor(160, 165, 170))
            item.setForeground(3, QtGui.QColor(160, 165, 170))
            #item.setText(0, str(rec["comment"]))
            self.ui.list.addTopLevelItem(item)

        for column in range(self.ui.list.columnCount()):
            self.ui.list.resizeColumnToContents(column)
示例#3
0
    def startNode(self):
        # Init the database before doing anything else
        n = self.Node
        model.setup_all()
        #print "hey"
        for task in model.Task.query.all():
            #print task.done
            if task.Status == 101:
                self.labelText = "rendering: " + task.Name
                self.refreshMe()

            if task.Status == 101:
                task.Status = 0

                #print n
                n.Tasks.append(task)
                model.saveData()

                taskFile = task.Command.split(" -taskFile ")
                newProcess = modo601Job(taskFile[1])
                #newProcess.modoTaskfile =
                newProcess.run()
                #self.logIt()
                task.Status = newProcess.progress

                if task.Status == 100:
                    task.job.Status += 1
                if task.Status == 600:
                    task.job.Status = 600

                model.saveData()
            else:
                self.labelText = "waiting....."
                self.refreshMe()
示例#4
0
    def __init__(self):
	QtGui.QWidget.__init__(self)
	self.ui=Ui_Form()
	self.ui.setupUi(self)
	self.ProjectFilter = "none"
	#self.DB = LYPA_cl.accessDB()
	#self.userFilter = "all"
	self.SeqFilter = "all"
	self.ShotFilter = "all"
	self.TypeFilter = "all"
	self.ProjectFilter = "none"
	self.SearchFilter  = ""
	#self.curUser = model.User.get_by(Name= os.getenv("USERNAME"))
        self.UserFilter = os.getenv("USERNAME")
        self.pixmap = QtGui.QPixmap("j:/modoPipeline/OUT/tl211_0010.0000_th.jpg")
	self.timer = QtCore.QTimer(self)
        self.timer.timeout.connect(self.refreshMe)
        self.timer.start(3000)
	
	model.setup_all()
	self.refreshCombos()

	self.ui.list.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.connect(self.ui.list, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.openMenu)
        self.connect(self.ui.UserComboBox, QtCore.SIGNAL('activated(QString)'), self.onUserComboBoxActivated)
	self.connect(self.ui.SequComboBox, QtCore.SIGNAL('activated(QString)'), self.onSequComboBoxActivated)
	self.connect(self.ui.ShotComboBox, QtCore.SIGNAL('activated(QString)'), self.onShotComboBoxActivated)
	self.connect(self.ui.ProjectComboBox, QtCore.SIGNAL('activated(QString)'), self.onProjectComboBoxActivated)
	self.connect(self.ui.thumbScale, QtCore.SIGNAL('valueChanged(int)'),self.changeThumbnailScale)
	self.ui.thumbScale.setRange(16,256 )
	self.ui.thumbScale.setValue(16)
        #for task in model.Shot.query.all():
	self.refreshMe()
示例#5
0
def main():
    # Init the database before doing anything else
    model.setup_all()
    
    # Again, this is boilerplate, it's going to be the same on 
    # almost every app you write
    app = QtGui.QApplication(sys.argv)
    window=Main()
    window.show()
    # It's exec_ because exec is a reserved word in Python
    sys.exit(app.exec_())
示例#6
0
def main():
    # Init the database before doing anything else
    model.setup_all()
    
    # Again, this is boilerplate, it's going to be the same on 
    # almost every app you write
    app = QtGui.QApplication(sys.argv)
    window=Main()
    window.show()
    # It's exec_ because exec is a reserved word in Python
    sys.exit(app.exec_())
示例#7
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        #super(Main, self).__init__()
        self.windowList = []
        ####### login##############################
        curUserName = os.getenv('USERNAME')
        model.setup_all()
        newUser = model.User.get_by(Name=unicode(curUserName))
        if newUser == None:
            newUser = model.User(Name=unicode(curUserName))
            model.saveData()

        ##################################################
        self.curProject = "none"
        self.full = 0
        self.toggleMe = 0
        # This is always the same
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.setWindowTitle('LYPA beta 101 :  ' + curUserName)
        self.GLviewer = GLWidget()
        self.ui.Dailies.setMainGUI(self)
        self.ui.Renders.setMainGUI(self)
        self.ui.Grade.setGL(self.GLviewer)
        self.ui.Renders.setGL(self.GLviewer)
        self.ui.GLLayout.addWidget(self.GLviewer)
        self.ui.tabWidget.setCurrentIndex(0)
        nukeSS.setStyleSheet(self)
        screen = QtGui.QDesktopWidget().screenGeometry()
        sself.resize(screen.width(), screen.height())
        size = self.geometry()
        self.move((screen.width() - size.width()) / 2,
                  (screen.height() - size.height()) / 2)
        self.ui.TimeLineSlider.setSingleStep(1)
        self.ui.TimeLineSlider.setTickInterval(1)
        self.ui.TimeLineSlider.setTickPosition(1)
        self.curProjectLUT = 2.2
        self.connect(self.ui.LUTcomboBox, QtCore.SIGNAL('activated(QString)'),
                     self.onLUTcomboBoxActivated)
        self.ui.TimeLineSlider.valueChanged.connect(
            self.GLviewer.setCurrentFrame)
        self.ui.TimeLineSlider.valueChanged.connect(self.ui.lcdNumber.display)
        ####################################
        # init default parameters on openGL viewer

        self.GLviewer.currentFrameChanged.connect(
            self.ui.TimeLineSlider.setValue)
        self.GLviewer.currentFrameChanged.connect(self.ui.lcdNumber.display)
        self.GLviewer.ExpChanged.connect(self.set_infobarExp)
        self.GLviewer.colorSampleChanged.connect(self.set_infobarColor)
        self.ui.actionImport.triggered.connect(self.importFile)
        self.ui.ExpLabel.setText("Exp: 1.0")
        self.ui.Renders.setInfo(self.ui.Info)
示例#8
0
 def __init__(self,computerName,Node):
     QtGui.QMainWindow.__init__(self)
     print "yeehhaa"
     self.computerName = computerName
     self.Node = Node
     self.timer = QtCore.QTimer()
     self.timer.timeout.connect(self.startNode)
     self.timer.start(5000)
     self.labelText = "waiting...."
     #self.app = app
     self.ui=LYPA_renderNodeUI.Ui_MainWindow()
     self.ui.setupUi(self)
     model.setup_all()
     self.setWindowTitle(QtGui.QApplication.translate("MainWindow", "LYPA_renderNode alpha 101   " + self.computerName, None, QtGui.QApplication.UnicodeUTF8))
示例#9
0
 def __init__(self):
     QtGui.QMainWindow.__init__(self)
     #super(Main, self).__init__()
     self.windowList = []
     ####### login##############################
     curUserName = os.getenv('USERNAME')
     model.setup_all()
     newUser = model.User.get_by(Name= unicode(curUserName))
     if newUser == None:
         newUser = model.User(Name= unicode(curUserName))
         model.saveData()
         
     ##################################################
     self.curProject = "none"
     self.full = 0
     self.toggleMe = 0
     # This is always the same
     self.ui=Ui_MainWindow()
     self.ui.setupUi(self)
     self.setWindowTitle('LYPA beta 101 :  ' + curUserName)
     self.GLviewer = GLWidget()
     self.ui.Dailies.setMainGUI(self)
     self.ui.Renders.setMainGUI(self)
     self.ui.Grade.setGL(self.GLviewer)
     self.ui.Renders.setGL(self.GLviewer)
     self.ui.GLLayout.addWidget(self.GLviewer)
     self.ui.tabWidget.setCurrentIndex(0)
     nukeSS.setStyleSheet(self)
     screen = QtGui.QDesktopWidget().screenGeometry()
     sself.resize(screen.width(),screen.height() )
     size =  self.geometry()
     self.move((screen.width()-size.width())/2, (screen.height()-size.height())/2)
     self.ui.TimeLineSlider.setSingleStep(1)
     self.ui.TimeLineSlider.setTickInterval(1)
     self.ui.TimeLineSlider.setTickPosition(1)
     self.curProjectLUT = 2.2
     self.connect(self.ui.LUTcomboBox, QtCore.SIGNAL('activated(QString)'), self.onLUTcomboBoxActivated)
     self.ui.TimeLineSlider.valueChanged.connect(self.GLviewer.setCurrentFrame)
     self.ui.TimeLineSlider.valueChanged.connect(self.ui.lcdNumber.display)
     ####################################
     # init default parameters on openGL viewer
     
     self.GLviewer.currentFrameChanged.connect(self.ui.TimeLineSlider.setValue)
     self.GLviewer.currentFrameChanged.connect(self.ui.lcdNumber.display)
     self.GLviewer.ExpChanged.connect(self.set_infobarExp)
     self.GLviewer.colorSampleChanged.connect(self.set_infobarColor)
     self.ui.actionImport.triggered.connect(self.importFile)
     self.ui.ExpLabel.setText("Exp: 1.0")
     self.ui.Renders.setInfo(self.ui.Info)
示例#10
0
def main():

    model.setup_all()
    comp = os.getenv('COMPUTERNAME')
    print comp

    newNode = model.Node.get_by(Name=unicode(comp))
    if newNode == None:
        print "hello"
        newNode = model.Node(Name=unicode(comp))
        model.saveData()
        print newNode
    app = QtGui.QApplication(sys.argv)
    window = RN_window(comp, newNode)
    window.show()
    # It's exec_ because exec is a reserved word in Python
    sys.exit(app.exec_())
示例#11
0
 def __init__(self, computerName, Node):
     QtGui.QMainWindow.__init__(self)
     print "yeehhaa"
     self.computerName = computerName
     self.Node = Node
     self.timer = QtCore.QTimer()
     self.timer.timeout.connect(self.startNode)
     self.timer.start(5000)
     self.labelText = "waiting...."
     #self.app = app
     self.ui = LYPA_renderNodeUI.Ui_MainWindow()
     self.ui.setupUi(self)
     model.setup_all()
     self.setWindowTitle(
         QtGui.QApplication.translate(
             "MainWindow",
             "LYPA_renderNode alpha 101   " + self.computerName, None,
             QtGui.QApplication.UnicodeUTF8))
示例#12
0
文件: Node.py 项目: lightvfx/LYPA
 def __init__(self):
     QtGui.QMainWindow.__init__(self)
     #print "yeehhaa"
     #self.computerName = computerName
     #self.Node = Node
     self.timer = QtCore.QTimer()
     self.timer.timeout.connect(self.start)
     self.timer.start(8000)
     self.labelText = "waiting...."
     #self.app = app
     self.ui = LYPA_renderNodeUI.Ui_MainWindow()
     self.ui.setupUi(self)
     model.setup_all()
     comp = os.getenv('COMPUTERNAME')
     self.newNode = model.Node.get_by(Name=unicode(comp))
     if self.newNode == None:
         self.newNode = model.Node(Name=unicode(comp))
         model.saveData()
     self.start()
示例#13
0
文件: Node.py 项目: lightvfx/LYPA
 def __init__(self):
     QtGui.QMainWindow.__init__(self)
     #print "yeehhaa"
     #self.computerName = computerName
     #self.Node = Node
     self.timer = QtCore.QTimer()
     self.timer.timeout.connect(self.start)
     self.timer.start(8000)
     self.labelText = "waiting...."
     #self.app = app
     self.ui=LYPA_renderNodeUI.Ui_MainWindow()
     self.ui.setupUi(self)
     model.setup_all()
     comp = os.getenv('COMPUTERNAME')
     self.newNode = model.Node.get_by(Name= unicode(comp))
     if self.newNode == None:
         self.newNode = model.Node(Name= unicode(comp))
         model.saveData()
     self.start()
示例#14
0
 def refreshMe(self):
     #self.ui.list.clear()
     #self.mainGui.curProject.Dailies
     #if self.mainGui.curProject == "none": return
     #self.curProject = model.Project.get_by(Name=str(self.mainGui.curProject))
     #for dailie in self.curProject.Dailies:
     #print render.ShotName
     #tags=','.join([t.name for t in task.tags])
     #   try:
     #    item=QtGui.QTreeWidgetItem([dailie.Renders.Name])
     #    item.dailie=dailie
     #   self.ui.list.addTopLevelItem(item)
     # except:
     #  pass
     #for column in range(self.ui.list.columnCount()):
     #    self.ui.list.resizeColumnToContents(column)
     #self.connect(self.ui.sessionSelComboBox, QtCore.SIGNAL('activated(QString)'), self.onSessionSelComboBoxActivated)
     model.setup_all()
     for wlabel in self.list.labels:
         self.list.gridLayout.removeWidget(wlabel)
         sip.delete(wlabel)
         wlabel = None
     self.list.labels = []
     id = 0
     for daily in model.Dailie.query.all():
         label = CustomWidget2(self)
         label.currentDailyItemChanged.connect(self.curDailyItemChanged)
         label.setCheckable(True)
         label.Id = id
         #label.res = self.res -50
         label.Daily = daily
         label.setup_label()
         #label.setMinimumSize(QtCore.QSize(self.list.Res,self.list.Res))
         #print self.list.Res
         self.list.labels.append(label)
         id += 1
     #self.list.redrawThb()
     self.list.Redraw()
示例#15
0
 def refreshMe(self):
     #self.ui.list.clear()
     #self.mainGui.curProject.Dailies
     #if self.mainGui.curProject == "none": return
     #self.curProject = model.Project.get_by(Name=str(self.mainGui.curProject))
     #for dailie in self.curProject.Dailies:
         #print render.ShotName
         #tags=','.join([t.name for t in task.tags])
      #   try:
       #    item=QtGui.QTreeWidgetItem([dailie.Renders.Name])
       #    item.dailie=dailie
        #   self.ui.list.addTopLevelItem(item)
        # except:
         #  pass
     #for column in range(self.ui.list.columnCount()):   
     #    self.ui.list.resizeColumnToContents(column)
     #self.connect(self.ui.sessionSelComboBox, QtCore.SIGNAL('activated(QString)'), self.onSessionSelComboBoxActivated)
     model.setup_all()
     for wlabel in self.list.labels:      
       self.list.gridLayout.removeWidget(wlabel)
       sip.delete(wlabel)
       wlabel = None
     self.list.labels = []
     id = 0
     for daily in model.Dailie.query.all():
         label = CustomWidget2(self)
         label.currentDailyItemChanged.connect(self.curDailyItemChanged)
         label.setCheckable(True)
         label.Id = id
         #label.res = self.res -50
         label.Daily = daily
         label.setup_label()
         #label.setMinimumSize(QtCore.QSize(self.list.Res,self.list.Res))
         #print self.list.Res
         self.list.labels.append(label)
         id +=1 
     #self.list.redrawThb()
     self.list.Redraw()
示例#16
0
 def __init__(self, parent=None):
   QtGui.QWidget.__init__(self, parent)
   model.setup_all()
   self.DB = LYPA_cl.accessDB()
   self.ui = Ui_importDialog()
   self.ui.setupUi(self)
   nukeSS.setStyleSheet(self)
   self.connect(self.ui.SequComboBox, QtCore.SIGNAL('activated(QString)'), self.onSequComboBoxActivated)
   self.connect(self.ui.ShotComboBox, QtCore.SIGNAL('activated(QString)'), self.onShotComboBoxActivated)
   self.connect(self.ui.ProjectComboBox, QtCore.SIGNAL('activated(QString)'), self.onProjectComboBoxActivated)
   self.elemName = ""
   self.SeqFilter = ""
   self.shotFilter = ""
   self.ProjectFilter = ""
   self.In = 0
   self.Out = 0
   self.DBIn = 0
   self.DBOut = 0
   self.Offset = 0
   self.ver = 0
   self.labels = []
   self.ui.OffsetlineEdit.setText(str(self.Offset))
   self.ui.OffsetlineEdit.setInputMask("0000")
   self.refreshCombos()
示例#17
0
                result = funk(c, e, ch, server, command, argv)
            except Exception, e:
                logging.error("error while executing {0}: {1}".format(
                    command, e))
                if logging.root.level == logging.DEBUG:
                    print "-" * 40
                    import traceback
                    traceback.print_exc()
                    print "-" * 40
                return
            logging.debug("command '{0}' executed, by {1} on {2}".format(
                command, e.source(), repr(server)))
            if result and isinstance(result, basestring):
                for line in result.strip().splitlines():
                    c.privmsg(e.target(), line)


if __name__ == "__main__":
    model.metadata.bind.echo = False
    model.setup_all(True)
    inst = SIrc(
        ServerInfo("xkcd.nl.smurfnet.ch", 6697, "koenbot", "koen", None, True))
    try:
        inst.start()
    except KeyboardInterrupt:
        print "quit"
        inst.stop("KeyboardInterrupt")
        sleep(1)

# vim: expandtab tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79:
示例#18
0
文件: LYPA_cl.py 项目: lightvfx/LYPA
 def __init__(self):
     self.contentDirectory = "J:/"
     model.setup_all()
示例#19
0
    def __init__(self):
        model.setup_all()
        QtGui.QWidget.__init__(self)

        self.ui=Ui_Form()
        self.ui.setupUi(self)
示例#20
0
    def __init__(self):
        model.setup_all()
        QtGui.QWidget.__init__(self)

        self.ui = Ui_Form()
        self.ui.setupUi(self)
示例#21
0
文件: LYPA_cl.py 项目: lightvfx/LYPA
 def __init__(self):
     self.contentDirectory = "J:/"
     model.setup_all()
示例#22
0
        self.label.setScaledContents(True)
        self.label.setMaximumSize(QtCore.QSize(256,256))
        #self.label.setMinimumSize(QtCore.QSize(256,256))
        self.label.setPixmap(pixmap)
        self.ShotLabel.setText(self.Daily.Name)
        #self.TypeLabel.setText("yeaah")
        self.horizontalLayout = QtGui.QVBoxLayout(self)
        self.horizontalLayout.setContentsMargins(3, 4, 3, 4)
        self.horizontalLayout.setAlignment(QtCore.Qt.AlignCenter)
        self.horizontalLayout.addWidget(self.label)
        self.horizontalLayout.addWidget(self.ShotLabel)
        #self.horizontalLayout.addWidget(self.TypeLabel)
        self.ShotLabel.setAlignment(QtCore.Qt.AlignCenter)
        #self.TypeLabel.setAlignment(QtCore.Qt.AlignCenter)
      
    def selectDaily(self):
      self.currentDailyItemChanged.emit(self.Id)
      
     

if __name__ == "__main__":
    import sys
    model.setup_all()
    app = QtGui.QApplication(sys.argv)
    window=dailiesViewer()
    window.show()
    # It's exec_ because exec is a reserved word in Python
    sys.exit(app.exec_())
    
    
  
示例#23
0
from flask import Flask
from model import metadata, setup_all
import page, board, admin

# create application
app = Flask(__name__)

# load config
app.config.from_pyfile('config.py')

# register modules
app.register_module(admin.module)
app.register_module(page.module)
app.register_module(board.module)

# init database
metadata.bind = app.config.get('DATABASE')
setup_all(True)

@app.route('/')
def index():
    return 'index page'

示例#24
0
文件: test.py 项目: lightvfx/LYPA
# Import Qt modules
from PyQt4 import QtCore, QtGui

# Import the compiled UI module
from testUI import Ui_Form

# The backend
import model

# Misc.


class editor(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self)

        self.ui = Ui_Form()
        self.ui.setupUi(self)

        # Start with no task item to edit
        self.item = None


if __name__ == "__main__":
    import sys
    model.setup_all()
    app = QtGui.QApplication(sys.argv)
    window = editor()
    window.show()
    # It's exec_ because exec is a reserved word in Python
    sys.exit(app.exec_())
示例#25
0
文件: sirc.py 项目: koenbollen/sirc
            try:
                result = funk(c, e, ch, server, command, argv)
            except Exception, e:
                logging.error( "error while executing {0}: {1}"
                        .format( command, e ) )
                if logging.root.level == logging.DEBUG:
                    print "-"*40
                    import traceback
                    traceback.print_exc()
                    print "-"*40
                return
            logging.debug( "command '{0}' executed, by {1} on {2}"
                    .format(command, e.source(),repr(server)) )
            if result and isinstance(result, basestring):
                for line in result.strip().splitlines():
                    c.privmsg(e.target(), line)


if __name__ == "__main__":
    model.metadata.bind.echo = False
    model.setup_all(True)
    inst = SIrc( ServerInfo("xkcd.nl.smurfnet.ch",6697,"koenbot","koen",None,True) )
    try:
        inst.start()
    except KeyboardInterrupt:
        print "quit"
        inst.stop("KeyboardInterrupt")
        sleep(1)

# vim: expandtab tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79: