forked from timothyhalim/Render-Manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
49 lines (38 loc) · 1.24 KB
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import sys
import os
import traceback
from db import Controller
from gui import Main
class RenderManager():
def __init__(self, *args):
super(RenderManager, self).__init__()
self.app = Main.QApplication()
self.app.setStyle("Fusion")
self.wind = Main.UserInterface()
dbpath = os.path.join(os.path.abspath(__file__), "..", "RenderManager.db")
self.db = Controller.init(dbpath)
self.build_list()
self.connect_signal()
def build_list(self):
jobs = Controller.get_all_job()
self.wind.build_job_list(jobs)
def submit_job(self):
Controller.create_job(
r"J:\UCG\Episodes\Scenes\EP100\SH002.00A\UCG_EP100_SH002.00A_CMP.nk",
"WRITE_IMG",
r"J:\UCG\UCG_Nuke10.bat",
"renderNuke.py",
frames=[i for i in range(100)]
)
def connect_signal(self):
self.wind.connect_signal(Controller)
def run(self):
self.app.exec_()
if __name__ == '__main__':
# try:
app = RenderManager(sys.argv)
# app.submit_job()
app.run()
# except Exception as e:
# print(traceback.format_exc())
# input("Press Enter to continue...")