Skip to content

Commit

Permalink
update Main file
Browse files Browse the repository at this point in the history
update Main file
  • Loading branch information
nervYu committed Apr 1, 2020
1 parent 76266f1 commit 11da902
Show file tree
Hide file tree
Showing 6 changed files with 472 additions and 0 deletions.
Binary file added icon/launchPad_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions moudle/ws8basic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
'''
Powered by Panda Yu
E-mail: yutao@workshop8.cn
'''
import gazu
import os

def loopPrintEXP(colum, keyName, keyId):
n = 0
tempdict = {}
while n <= len(colum)-1:
tempdict[colum[n][keyName]] = colum[n][keyId]
n += 1
return tempdict

def logIn(userName, passwd, host="kistu.workshop8.cn"):
gazu.client.set_host("https://"+host+"/api")
try:
gazu.log_in(userName+"@workshop8.cn", passwd)
except:
return ['Bad UserName or Password Refill Again', 1]
else:
return ['Hello '+gazu.client.get_current_user()["first_name"], 0]


def getProject4User():
projects = gazu.user.all_open_projects()
projectsDict = loopPrintEXP(projects, 'name', 'id')
return projectsDict

def getSeq(project):
sequence = gazu.user.all_sequences_for_project(project)
sequenceDict = loopPrintEXP(sequence, 'name', 'id')
return sequenceDict

def getShot4User(sequence):
shots = gazu.user.all_shots_for_sequence(sequence)
shotDict = loopPrintEXP(shots, 'name', 'id')
return shotDict

def getVer4User(project, shot, kind):
path = f"d:/project/{project}/shot/{shot}/{kind}/task"
version = os.listdir(path)
return version

def getAssets(project, label):
labelName = label.lower()
path = f"d:/project/{project}/{labelName}"
return path

def getTools4User():
pass

def getUser():
return gazu.client.get_current_user()

def getTaskDict(colum, ids):
n = 0
taskdict = {}
while n <= len(colum)-1:
taskType = colum[n] + '_task'
shotName = ids[0] + "_" + ids[1] + "_" + ids[2]
taskList = getVer4User(ids[0], shotName, colum[n])
taskdict[taskType] = taskList
n += 1
return taskdict
4 changes: 4 additions & 0 deletions moudle/ws8class.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
listK = ['cmp', 'mod', 'lgt']
for task in listK :
taskName = task + '_Task'
print(taskName)
112 changes: 112 additions & 0 deletions ui/login.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'login_ui.ui'
##
## Created by: Qt User Interface Compiler version 5.14.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
from PySide2.QtWidgets import *


class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(301, 191)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
self.centralwidget.setSizePolicy(sizePolicy)
self.centralwidget.setMinimumSize(QSize(300, 150))
self.centralwidget.setMaximumSize(QSize(300, 150))
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.username = QLineEdit(self.centralwidget)
self.username.setObjectName(u"username")
self.username.setMaxLength(50)
self.username.setClearButtonEnabled(True)

self.gridLayout.addWidget(self.username, 6, 0, 1, 1)

self.host = QLineEdit(self.centralwidget)
self.host.setObjectName(u"host")
self.host.setEchoMode(QLineEdit.Normal)

self.gridLayout.addWidget(self.host, 5, 0, 1, 1)

self.passwd = QLineEdit(self.centralwidget)
self.passwd.setObjectName(u"passwd")
self.passwd.setEchoMode(QLineEdit.Password)

self.gridLayout.addWidget(self.passwd, 7, 0, 1, 1)

self.pushButton = QPushButton(self.centralwidget)
self.pushButton.setObjectName(u"pushButton")
sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
self.pushButton.setSizePolicy(sizePolicy1)
self.pushButton.setMaximumSize(QSize(100, 100))
font = QFont()
font.setBold(True)
font.setWeight(75)
self.pushButton.setFont(font)
self.pushButton.setCursor(QCursor(Qt.CrossCursor))
self.pushButton.setFlat(False)

self.gridLayout.addWidget(self.pushButton, 5, 2, 3, 1)

self.label = QLabel(self.centralwidget)
self.label.setObjectName(u"label")
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setMinimumSize(QSize(20, 10))
font1 = QFont()
font1.setPointSize(10)
font1.setBold(False)
font1.setItalic(True)
font1.setWeight(50)
self.label.setFont(font1)
self.label.setLayoutDirection(Qt.RightToLeft)
self.label.setAutoFillBackground(False)
self.label.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignVCenter)

self.gridLayout.addWidget(self.label, 0, 0, 1, 3)

MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(MainWindow)
self.menubar.setObjectName(u"menubar")
self.menubar.setGeometry(QRect(0, 0, 301, 21))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName(u"statusbar")
MainWindow.setStatusBar(self.statusbar)

self.retranslateUi(MainWindow)
self.pushButton.clicked.connect(self.pushButton.show)

QMetaObject.connectSlotsByName(MainWindow)
# setupUi

def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"login", None))
self.username.setPlaceholderText(QCoreApplication.translate("MainWindow", u"\u7528\u6237\u540d", None))
self.host.setText(QCoreApplication.translate("MainWindow", u"kistu.workshop8.cn", None))
self.host.setPlaceholderText(QCoreApplication.translate("MainWindow", u"\u670d\u52a1\u5668", None))
self.passwd.setPlaceholderText(QCoreApplication.translate("MainWindow", u"\u5bc6\u7801", None))
self.pushButton.setText(QCoreApplication.translate("MainWindow", u"Launch", None))
self.label.setText(QCoreApplication.translate("MainWindow", u" workShop8 launchBox ", None))
# retranslateUi

159 changes: 159 additions & 0 deletions ui/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'main_Ui.ui'
##
## Created by: Qt User Interface Compiler version 5.14.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
from PySide2.QtWidgets import *


class Ui_ws8Main(object):
def setupUi(self, ws8Main):
if ws8Main.objectName():
ws8Main.setObjectName(u"ws8Main")
ws8Main.resize(598, 586)
sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(ws8Main.sizePolicy().hasHeightForWidth())
ws8Main.setSizePolicy(sizePolicy)
icon = QIcon()
icon.addFile(u"C:/Users/Yutao/Desktop/\u516b\u53f7\u5de5\u574a_logo.png", QSize(), QIcon.Normal, QIcon.Off)
ws8Main.setWindowIcon(icon)
ws8Main.setWindowOpacity(1.000000000000000)
ws8Main.setStyleSheet(u"background-color: rgb(241, 241, 241);")
ws8Main.setIconSize(QSize(60, 60))
self.actionAbout = QAction(ws8Main)
self.actionAbout.setObjectName(u"actionAbout")
self.centralwidget = QWidget(ws8Main)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout")
self.seqView = QTreeWidget(self.centralwidget)
self.seqView.setObjectName(u"seqView")

self.gridLayout.addWidget(self.seqView, 2, 1, 1, 1)

self.tabArea01 = QTabWidget(self.centralwidget)
self.tabArea01.setObjectName(u"tabArea01")
self.assetTab = QWidget()
self.assetTab.setObjectName(u"assetTab")
self.assetTree = QTreeView(self.assetTab)
self.assetTree.setObjectName(u"assetTree")
self.assetTree.setGeometry(QRect(-2, -1, 511, 221))
self.tabArea01.addTab(self.assetTab, "")
self.tab = QWidget()
self.tab.setObjectName(u"tab")
self.refTree = QTreeView(self.tab)
self.refTree.setObjectName(u"refTree")
self.refTree.setGeometry(QRect(-1, -6, 511, 231))
self.tabArea01.addTab(self.tab, "")
self.toolTab = QWidget()
self.toolTab.setObjectName(u"toolTab")
self.horizontalLayout = QHBoxLayout(self.toolTab)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.tabArea01.addTab(self.toolTab, "")

self.gridLayout.addWidget(self.tabArea01, 1, 1, 1, 3)

self.tabArea_Task = QTabWidget(self.centralwidget)
self.tabArea_Task.setObjectName(u"tabArea_Task")
font = QFont()
font.setBold(False)
font.setUnderline(False)
font.setWeight(50)
self.tabArea_Task.setFont(font)
self.tab_FX = QWidget()
self.tab_FX.setObjectName(u"tab_FX")
self.listWidget_FX = QListWidget(self.tab_FX)
self.listWidget_FX.setObjectName(u"listWidget_FX")
self.listWidget_FX.setGeometry(QRect(-1, -1, 251, 231))
self.listWidget_FX.setStyleSheet(u"border-top-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255));")
self.tabArea_Task.addTab(self.tab_FX, "")
self.tab_CMP = QWidget()
self.tab_CMP.setObjectName(u"tab_CMP")
self.listWidget_CMP = QListWidget(self.tab_CMP)
self.listWidget_CMP.setObjectName(u"listWidget_CMP")
self.listWidget_CMP.setGeometry(QRect(-1, -1, 261, 231))
self.tabArea_Task.addTab(self.tab_CMP, "")
self.tab_Lgt = QWidget()
self.tab_Lgt.setObjectName(u"tab_Lgt")
self.listWidget_LGT = QListWidget(self.tab_Lgt)
self.listWidget_LGT.setObjectName(u"listWidget_LGT")
self.listWidget_LGT.setGeometry(QRect(-1, -1, 250, 231))
self.listWidget_LGT.setStyleSheet(u"border-top-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255));")
self.tabArea_Task.addTab(self.tab_Lgt, "")
self.tab_MOD = QWidget()
self.tab_MOD.setObjectName(u"tab_MOD")
self.listWidget_MOD = QListWidget(self.tab_MOD)
self.listWidget_MOD.setObjectName(u"listWidget_MOD")
self.listWidget_MOD.setGeometry(QRect(-1, -1, 251, 241))
self.tabArea_Task.addTab(self.tab_MOD, "")

self.gridLayout.addWidget(self.tabArea_Task, 2, 3, 1, 1)

self.curUser = QLabel(self.centralwidget)
self.curUser.setObjectName(u"curUser")
font1 = QFont()
font1.setPointSize(16)
self.curUser.setFont(font1)
self.curUser.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)

self.gridLayout.addWidget(self.curUser, 0, 3, 1, 1)

self.projectSelect = QListWidget(self.centralwidget)
self.projectSelect.setObjectName(u"projectSelect")
self.projectSelect.setMaximumSize(QSize(60, 16777215))

self.gridLayout.addWidget(self.projectSelect, 1, 0, 2, 1)

ws8Main.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(ws8Main)
self.menubar.setObjectName(u"menubar")
self.menubar.setGeometry(QRect(0, 0, 598, 21))
self.menuAbout = QMenu(self.menubar)
self.menuAbout.setObjectName(u"menuAbout")
ws8Main.setMenuBar(self.menubar)
self.statusbar = QStatusBar(ws8Main)
self.statusbar.setObjectName(u"statusbar")
self.statusbar.setEnabled(True)
ws8Main.setStatusBar(self.statusbar)

self.menubar.addAction(self.menuAbout.menuAction())
self.menuAbout.addSeparator()
self.menuAbout.addAction(self.actionAbout)

self.retranslateUi(ws8Main)

self.tabArea01.setCurrentIndex(1)
self.tabArea_Task.setCurrentIndex(1)


QMetaObject.connectSlotsByName(ws8Main)
# setupUi

def retranslateUi(self, ws8Main):
ws8Main.setWindowTitle(QCoreApplication.translate("ws8Main", u"workshop8 LaunchBox", None))
self.actionAbout.setText(QCoreApplication.translate("ws8Main", u"about", None))
___qtreewidgetitem = self.seqView.headerItem()
___qtreewidgetitem.setText(0, QCoreApplication.translate("ws8Main", u"seqView", None));
self.tabArea01.setTabText(self.tabArea01.indexOf(self.assetTab), QCoreApplication.translate("ws8Main", u"Asset", None))
self.tabArea01.setTabText(self.tabArea01.indexOf(self.tab), QCoreApplication.translate("ws8Main", u"Reference", None))
self.tabArea01.setTabText(self.tabArea01.indexOf(self.toolTab), QCoreApplication.translate("ws8Main", u"Tool", None))
self.tabArea_Task.setTabText(self.tabArea_Task.indexOf(self.tab_FX), QCoreApplication.translate("ws8Main", u"FX", None))
self.tabArea_Task.setTabText(self.tabArea_Task.indexOf(self.tab_CMP), QCoreApplication.translate("ws8Main", u"CMP", None))
self.tabArea_Task.setTabText(self.tabArea_Task.indexOf(self.tab_Lgt), QCoreApplication.translate("ws8Main", u"LGT", None))
self.tabArea_Task.setTabText(self.tabArea_Task.indexOf(self.tab_MOD), QCoreApplication.translate("ws8Main", u"MOD", None))
self.curUser.setText(QCoreApplication.translate("ws8Main", u"TextLabel", None))
self.menuAbout.setTitle(QCoreApplication.translate("ws8Main", u"about", None))
# retranslateUi

Loading

0 comments on commit 11da902

Please sign in to comment.