diff --git a/.gitignore b/.gitignore index 5626ccb..1c05e31 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__/ Km_Rendering_Finished/Km_RF.pyc Km_Rendering_Finished/ui_notif_panel.pyc +*.pyc \ No newline at end of file diff --git a/Dev-Files/proto_v02.ui b/Dev-Files/window_v1.ui similarity index 100% rename from Dev-Files/proto_v02.ui rename to Dev-Files/window_v1.ui diff --git a/Dev-Files/window_v2.ui b/Dev-Files/window_v2.ui new file mode 100644 index 0000000..a70fee3 --- /dev/null +++ b/Dev-Files/window_v2.ui @@ -0,0 +1,534 @@ + + + MainWindow + + + + 0 + 0 + 425 + 288 + + + + + 75 + true + + + + Notification Panel + + + + + + 20 + 50 + 385 + 227 + + + + false + + + QFrame { + background-color: rgb(255, 255, 255); + border-radius : 10px; +} + + + QFrame::NoFrame + + + QFrame::Plain + + + + + 6 + 205 + 191 + 20 + + + + + Segoe UI Semibold + 9 + 50 + false + false + true + + + + color: rgb(166, 166, 166); + + + + + Km Rendering Finished v2.0 + + + Qt::AutoText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + 0 + 45 + 381 + 31 + + + + + Segoe UI + 15 + + + + color: rgb(0, 170, 127); + + + <strong>Rendering Finished !</strong> + + + Qt::AlignCenter + + + + + + 20 + 115 + 166 + 30 + + + + + 150 + 30 + + + + + Segoe UI Semibold + 9 + + + + QPushButton { + border: 2px solid rgb(52, 59, 72); + border-radius: 5px; + background-color: rgb(52, 59, 72); + color: rgb(223, 223, 223); +} +QPushButton:hover { + background-color: rgb(57, 65, 80); + border: 2px solid rgb(61, 70, 86); +} +QPushButton:pressed { + background-color: rgb(35, 40, 49); + border: 2px solid rgb(43, 50, 61); +} + + + Open Render Directory + + + + ../Km_Rendering_Finished/icons/pack/cil-folder-open.png../Km_Rendering_Finished/icons/pack/cil-folder-open.png + + + + + + 0 + 75 + 381 + 31 + + + + + Segoe UI Semibold + 10 + + + + color: rgb(66, 66, 66); + + + FS_132-080_comp_v007.nk + + + Qt::AlignCenter + + + + + + 196 + 115 + 167 + 30 + + + + + 150 + 30 + + + + + Segoe UI Semibold + 9 + + + + QPushButton { + border: 2px solid rgb(52, 59, 72); + border-radius: 5px; + background-color: rgb(52, 59, 72); + color: rgb(223, 223, 223); +} +QPushButton:hover { + background-color: rgb(57, 65, 80); + border: 2px solid rgb(61, 70, 86); +} +QPushButton:pressed { + background-color: rgb(35, 40, 49); + border: 2px solid rgb(43, 50, 61); +} + + + Open Render File + + + + ../Km_Rendering_Finished/icons/pack/cil-media-play.png../Km_Rendering_Finished/icons/pack/cil-media-play.png + + + + + + 207 + 205 + 171 + 20 + + + + + Segoe UI Semibold + 9 + 50 + false + false + + + + color: rgb(166, 166, 166); + + + By Hossein Karamian + + + Qt::AutoText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 361 + 4 + 20 + 20 + + + + + 18 + 18 + + + + + Segoe UI + 9 + + + + Close + + + QPushButton { + border: 2px solid rgb(128, 146, 177); + border-radius: 10px; + background-color: rgb(128, 146, 177); + color: rgb(223, 223, 223); +} +QPushButton:hover { + background-color: rgb(97, 110, 134); + border: 2px solid rgb(97, 110, 134); +} + + + + + + + ../Km_Rendering_Finished/icons/pack/cil-x.png../Km_Rendering_Finished/icons/pack/cil-x.png + + + + + + 20 + 155 + 41 + 30 + + + + + 20 + 20 + + + + + Segoe UI + 9 + + + + Copy Render Directory Address to ClipBoard + + + QPushButton { + border: 2px solid rgb(133, 201, 84); + border-radius: 5px; + background-color: rgb(133, 201, 84); + color: rgb(255, 255, 255); +} +QPushButton:hover { + background-color: rgb(145, 210, 90); + border: 2px solidrgb(145, 210, 90); +} +QPushButton:pressed { + background-color: rgb(133, 201, 84); + border: 2px solid rgb(133, 201, 84); +} + + + + + + + ../Km_Rendering_Finished/icons/pack/cil-copy.png../Km_Rendering_Finished/icons/pack/cil-copy.png + + + + + + 322 + 155 + 41 + 30 + + + + + 20 + 20 + + + + + Segoe UI + 9 + + + + Copy Render File Address to ClipBoard + + + QPushButton { + border: 2px solid rgb(133, 201, 84); + border-radius: 5px; + background-color: rgb(133, 201, 84); + color: rgb(255, 255, 255); +} +QPushButton:hover { + background-color: rgb(145, 210, 90); + border: 2px solidrgb(145, 210, 90); +} +QPushButton:pressed { + background-color: rgb(133, 201, 84); + border: 2px solid rgb(133, 201, 84); +} + + + + + + + ../Km_Rendering_Finished/icons/pack/cil-copy.png../Km_Rendering_Finished/icons/pack/cil-copy.png + + + + + true + + + + 73 + 155 + 113 + 30 + + + + + 20 + 20 + + + + + Segoe UI Semibold + 11 + 50 + false + + + + Render Time (H:M:S) + + + QPushButton { + border: 2px solid rgb(77, 190, 217); + border-radius: 5px; + background-color: rgb(77, 190, 217); + color: rgb(255, 255, 255); +} +QPushButton:hover { + background-color: rgb(98, 193, 217); + border: 2px solidrgb(98, 193, 217); +} +QPushButton:pressed { + background-color: rgb(77, 190, 217); + border: 2px solid rgb(77, 190, 217); +} + + + 00:05:23 + + + + ../Km_Rendering_Finished/icons/pack/cil-speedometer.png../Km_Rendering_Finished/icons/pack/cil-speedometer.png + + + + 30 + 30 + + + + + + + 196 + 155 + 113 + 30 + + + + + Segoe UI Semibold + 10 + 50 + false + + + + Create Read Node From Rendered File + + + QPushButton { + border: 2px solid rgb(77, 190, 217); + border-radius: 5px; + background-color: rgb(77, 190, 217); + color: rgb(255, 255, 255); +} +QPushButton:hover { + background-color: rgb(98, 193, 217); + border: 2px solidrgb(98, 193, 217); +} +QPushButton:pressed { + background-color: rgb(77, 190, 217); + border: 2px solid rgb(77, 190, 217); +} + + + Create Read + + + + ../Km_Rendering_Finished/icons/pack/cil-movie.png../Km_Rendering_Finished/icons/pack/cil-movie.png + + + + + + + 170 + 10 + 80 + 80 + + + + + + + + + + QFrame::NoFrame + + + + + + ../Km_Rendering_Finished/icons/success.png + + + true + + + Qt::AlignCenter + + + false + + + + + + + diff --git a/Km_Rendering_Finished/InstallationGuide.txt b/Km_Rendering_Finished/InstallationGuide.txt index c5081b2..a5a091a 100644 --- a/Km_Rendering_Finished/InstallationGuide.txt +++ b/Km_Rendering_Finished/InstallationGuide.txt @@ -13,7 +13,7 @@ nuke.pluginAddPath('./Km_Rendering_Finished') # Developed By Hossein Karamian # - # www.kmworks.ir # + # www.hkaramian.com # _ __ __ __ # | |/ / | \/ | # | ' / | \ / | diff --git a/Km_Rendering_Finished/Km_RF.py b/Km_Rendering_Finished/Km_RF.py index 3617c33..3dc1fbc 100644 --- a/Km_Rendering_Finished/Km_RF.py +++ b/Km_Rendering_Finished/Km_RF.py @@ -3,7 +3,7 @@ # # Developed By Hossein Karamian # -# www.kmworks.ir +# www.hkaramian.com # # _ __ __ __ # | |/ / | \/ | @@ -17,15 +17,19 @@ v1.0 | First version | November 24 , 2021 v1.0.1 | Bug Fix , in some cases notification window disappears just after it's popping up | November 25 , 2021 v1.0.2 | Bug Fix | November 27 , 2021 +v2.0 | Linux compatible , Bug Fix , Add Create Read Node Button, Open Render File button now also working for sequence renders | December 10 , 2021 """ import nuke +import nukescripts import os import sys import platform import subprocess import datetime +import glob +import re ################################################################################ @@ -49,7 +53,8 @@ def __init__(self,WR): self.ui.setupUi(self) self.Write_node = WR - + + #self.setStyle(QStyleFactory.create('Plastique')) ## REMOVE TITLE BAR self.setWindowFlags(Qt.FramelessWindowHint) self.setAttribute(Qt.WA_TranslucentBackground) @@ -68,6 +73,14 @@ def __init__(self,WR): self.shadow.setColor(QColor(0, 0, 0, 100)) self.ui.frame.setGraphicsEffect(self.shadow) + # remove text shadows + self.RemoveDefaultTextShadow() + + # set center , for linux + centerX = int(QDesktopWidget().screenGeometry(-1).width()/2.0 - self.width()/2.0) + centerY = int(QDesktopWidget().screenGeometry(-1).height()/2.0 - self.height()/2.0) + self.move(centerX,centerY) + # Set Signals self.ui.pushButton_close.clicked.connect(self.close) @@ -75,20 +88,32 @@ def __init__(self,WR): self.ui.pushButton_3.clicked.connect(self.Open_Render_File) self.ui.pushButton_clipboard_directory.clicked.connect(self.Copy_To_ClipBoard_Directory) self.ui.pushButton_clipboard_file.clicked.connect(self.Copy_To_ClipBoard_File) + self.ui.pushButton_CreateRead.clicked.connect(self.CreateReadNode) # render time #self.ui.label_render_time.setText(" Render Time (H:M:S) : "+self.Get_Time_Duration()) - self.ui.label_render_time.setText("Render Time (H:M:S) : "+self.Get_Time_Duration()+"") + self.ui.pushButton_render_icon.setText(self.Get_Time_Duration()) # credit - self.ui.label__Hossein.setText('''By Hossein Karamian''') + self.ui.label__Hossein.setText('''By Hossein Karamian''') self.ui.label__Hossein.setOpenExternalLinks(True) # set project name lable - self.ui.label_project_name.setText(""+os.path.basename(nuke.root().name())+"") + self.ui.label_project_name.setText(os.path.basename(nuke.root().name())) + + + + - #self.show() + def RemoveDefaultTextShadow(self): + """Get Rid of nuke pyside default style that apply shadow for texts""" + #self.setStyle(QStyleFactory.create('Windows')) + self.ui.pushButton_CreateRead.setStyle(QStyleFactory.create('Windows')) + self.ui.pushButton_render_icon.setStyle(QStyleFactory.create('Windows')) + self.ui.label_version.setStyle(QStyleFactory.create('Windows')) + self.ui.label_project_name.setStyle(QStyleFactory.create('Windows')) + # def enterEvent(self, event): # self.op_effect.setOpacity(1) @@ -99,30 +124,77 @@ def __init__(self,WR): def Open_Render_Directory(self): path = os.path.dirname(self.Write_node.knob('file').value()) - operatingSystem = platform.system() - if os.path.exists(path): - - if operatingSystem == "Windows": - os.startfile(path) - elif operatingSystem == "Darwin": - subprocess.Popen(["open", path]) - else: - subprocess.Popen(["xdg-open", path]) - - def Open_Render_File(self): - r_file = self.Write_node.knob('file').value() - os.startfile(r_file) + self.OpenFileOrFolder(path) def Copy_To_ClipBoard_Directory(self): txt = os.path.dirname(self.Write_node.knob('file').value()) - cmd='echo '+txt.strip()+'|clip' - return subprocess.check_call(cmd, shell=True) + self.Copy_To_ClipBoard(txt) def Copy_To_ClipBoard_File(self): - txt = self.Write_node.knob('file').value() - cmd='echo '+txt.strip()+'|clip' - return subprocess.check_call(cmd, shell=True) + txt = self.Write_node.knob('file').getEvaluatedValue() + self.Copy_To_ClipBoard(txt) + + def Open_Render_File(self): + filePath = self.Write_node.knob('file').getEvaluatedValue() + self.OpenFileOrFolder(filePath) + + def OpenFileOrFolder(self,path): + operatingSystem = platform.system() + if os.path.exists(path): + if operatingSystem == "Windows": + os.startfile(path) + elif operatingSystem == "Darwin": + subprocess.Popen(["open", path]) + else: + subprocess.Popen(["xdg-open", path]) + + def Copy_To_ClipBoard(self,txt) : + # copy text to clipboard using pyside library , works for both windows & linux + cb = QApplication.clipboard() + cb.clear(mode=cb.Clipboard ) + cb.setText(txt, mode=cb.Clipboard) + + def CreateReadNode(self): + filePath = self.Write_node.knob('file').value() + + if filePath == self.Write_node.knob('file').getEvaluatedValue() : # check if it's sequence + isSequence = False + else: + isSequence = True + + readNode = nuke.createNode("Read") + if isSequence : # using v!ctor tools code(by Victor Perez ) for creating read node for sequence . https://www.nukepedia.com/gizmos/image/vctor-tools + i = self.Write_node + fileName = i.knob('file').value() + readNode.knob('file').setValue(fileName) + cleanPath = nukescripts.replaceHashes(fileName) + padRE = re.compile('%0(\d+)d') + padMatch = padRE.search(cleanPath) + if padMatch: + padSize = int(padMatch.group(1)) + frameList = sorted(glob.iglob(padRE.sub('[0-9]' * padSize, cleanPath))) + first = os.path.splitext(frameList[0])[0][-padSize:] + last = os.path.splitext(frameList[-1])[0][-padSize:] + if platform.system() == "Windows": + readNode['file'].fromUserText('%s %s-%s' % (cleanPath, first, last)) + else : # for linux + readNode['file'].fromUserText(cleanPath) + readNode['first'].setValue(int(nuke.root()["first_frame"].getValue())) # code above doesn't work properly for linux so we set first & last from project + readNode['last'].setValue(int(nuke.root()["last_frame"].getValue())) + readNode['origfirst'].setValue(int(nuke.root()["first_frame"].getValue())) + readNode['origlast'].setValue(int(nuke.root()["last_frame"].getValue())) + else : # if it's not seq + readNode.knob('file').fromUserText(filePath) + projectStartFrame = nuke.root()["first_frame"].getValue() + readNode.knob('frame').setValue(str(projectStartFrame)) + readNode.knob('frame_mode').setValue("start at") + # set position + readNode.setXpos(self.Write_node.xpos()) + readNode.setYpos(self.Write_node.ypos() + self.Write_node.screenHeight() + 50) + notif_panel.activateWindow() # just to be sure it's on top + notif_panel.raise_() # just to be sure it's on top + @staticmethod def Set_Render_Start_Time(): if not nuke.root().knob("Km_Render_Start_Time"): @@ -132,7 +204,6 @@ def Set_Render_Start_Time(): Current_time_str = str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) nuke.root().knob("Km_Render_Start_Time").setValue(Current_time_str) - def Get_Time_Duration(self): time1_str = nuke.root().knob("Km_Render_Start_Time").getValue() time1 = datetime.datetime.strptime(time1_str, '%Y-%m-%d %H:%M:%S') # time1_str sample : '2021-11-20 12:33:00' @@ -160,7 +231,7 @@ def Get_Time_Duration(self): render_time = h+":"+m+":"+s - self.ui.label_render_time.setToolTip("Started at : "+time1_str+", Finished at :"+str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))) + #self.ui.label_render_time.setToolTip("Started at : "+time1_str+", Finished at :"+str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))) return render_time @@ -172,6 +243,8 @@ def Create_Show_Notif_Panel(): global notif_panel notif_panel = Km_Notification_Panel(nuke.thisNode()) notif_panel.show() + notif_panel.activateWindow() # just to be sure it's on top + notif_panel.raise_() # just to be sure it's on top # add nuke callbacks diff --git a/Km_Rendering_Finished/Preview.jpg b/Km_Rendering_Finished/Preview.jpg index 906c167..4268449 100644 Binary files a/Km_Rendering_Finished/Preview.jpg and b/Km_Rendering_Finished/Preview.jpg differ diff --git a/Km_Rendering_Finished/icons/pack/cil-movie.png b/Km_Rendering_Finished/icons/pack/cil-movie.png new file mode 100644 index 0000000..92b943f Binary files /dev/null and b/Km_Rendering_Finished/icons/pack/cil-movie.png differ diff --git a/Km_Rendering_Finished/menu.py b/Km_Rendering_Finished/menu.py index 11c9719..b889155 100644 --- a/Km_Rendering_Finished/menu.py +++ b/Km_Rendering_Finished/menu.py @@ -5,4 +5,4 @@ import Km_RF menu = nuke.menu("Nuke") Km_Tools_menu = menu.addMenu("KmTools") - Km_Tools_menu.addCommand("Km Rendering Finished","nuke.message('This tool pop up a Notification with some tools after a render finished \\n Km Rendering Finished v1.0.2')","") + Km_Tools_menu.addCommand("Km Rendering Finished","nuke.message('This tool pop up a Notification with some tools after a render finished \\n Km Rendering Finished v2.0')","") diff --git a/Km_Rendering_Finished/ui_notif_panel.py b/Km_Rendering_Finished/ui_notif_panel.py index 9ddd59f..5a63171 100644 --- a/Km_Rendering_Finished/ui_notif_panel.py +++ b/Km_Rendering_Finished/ui_notif_panel.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- ################################################################################ -## Form generated from reading UI file 'proto_v02AWOwOh.ui' +## Form generated from reading UI file 'window_v2fPtqWR.ui' ## ## Created by: Qt User Interface Compiler version 5.15.0 ## @@ -14,7 +14,8 @@ QFontDatabase, QIcon, QKeySequence, QLinearGradient, QPalette, QPainter, QPixmap, QRadialGradient) from PySide2.QtWidgets import * -import os + +import os class Ui_MainWindow(object): def setupUi(self, MainWindow): @@ -39,18 +40,20 @@ def setupUi(self, MainWindow): self.frame.setFrameShadow(QFrame.Plain) self.label_version = QLabel(self.frame) self.label_version.setObjectName(u"label_version") - self.label_version.setGeometry(QRect(0, 205, 161, 20)) + self.label_version.setGeometry(QRect(6, 205, 191, 20)) font1 = QFont() - font1.setFamily(u"Segoe UI") - font1.setPointSize(8) + font1.setFamily(u"Segoe UI Semibold") + font1.setPointSize(9) font1.setBold(False) font1.setWeight(50) font1.setStrikeOut(False) font1.setKerning(True) self.label_version.setFont(font1) - self.label_version.setStyleSheet(u"color: rgb(166, 166, 166);") + self.label_version.setStyleSheet(u"color: rgb(166, 166, 166);\n" +"\n" +"") self.label_version.setTextFormat(Qt.AutoText) - self.label_version.setAlignment(Qt.AlignCenter) + self.label_version.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignVCenter) self.label_3 = QLabel(self.frame) self.label_3.setObjectName(u"label_3") self.label_3.setGeometry(QRect(0, 45, 381, 31)) @@ -62,10 +65,10 @@ def setupUi(self, MainWindow): self.label_3.setAlignment(Qt.AlignCenter) self.pushButton_2 = QPushButton(self.frame) self.pushButton_2.setObjectName(u"pushButton_2") - self.pushButton_2.setGeometry(QRect(20, 115, 161, 30)) + self.pushButton_2.setGeometry(QRect(20, 115, 166, 30)) self.pushButton_2.setMinimumSize(QSize(150, 30)) font3 = QFont() - font3.setFamily(u"Segoe UI") + font3.setFamily(u"Segoe UI Semibold") font3.setPointSize(9) self.pushButton_2.setFont(font3) self.pushButton_2.setStyleSheet(u"QPushButton {\n" @@ -88,12 +91,15 @@ def setupUi(self, MainWindow): self.label_project_name = QLabel(self.frame) self.label_project_name.setObjectName(u"label_project_name") self.label_project_name.setGeometry(QRect(0, 75, 381, 31)) - self.label_project_name.setFont(font3) + font4 = QFont() + font4.setFamily(u"Segoe UI Semibold") + font4.setPointSize(10) + self.label_project_name.setFont(font4) self.label_project_name.setStyleSheet(u"color: rgb(66, 66, 66);") self.label_project_name.setAlignment(Qt.AlignCenter) self.pushButton_3 = QPushButton(self.frame) self.pushButton_3.setObjectName(u"pushButton_3") - self.pushButton_3.setGeometry(QRect(200, 115, 161, 30)) + self.pushButton_3.setGeometry(QRect(196, 115, 167, 30)) self.pushButton_3.setMinimumSize(QSize(150, 30)) self.pushButton_3.setFont(font3) self.pushButton_3.setStyleSheet(u"QPushButton {\n" @@ -115,22 +121,25 @@ def setupUi(self, MainWindow): self.pushButton_3.setIcon(icon1) self.label__Hossein = QLabel(self.frame) self.label__Hossein.setObjectName(u"label__Hossein") - self.label__Hossein.setGeometry(QRect(262, 205, 121, 20)) - font4 = QFont() - font4.setFamily(u"Segoe UI") - font4.setPointSize(8) - font4.setBold(False) - font4.setWeight(50) - font4.setStrikeOut(False) - self.label__Hossein.setFont(font4) + self.label__Hossein.setGeometry(QRect(207, 205, 171, 20)) + font5 = QFont() + font5.setFamily(u"Segoe UI Semibold") + font5.setPointSize(9) + font5.setBold(False) + font5.setWeight(50) + font5.setStrikeOut(False) + self.label__Hossein.setFont(font5) self.label__Hossein.setStyleSheet(u"color: rgb(166, 166, 166);") self.label__Hossein.setTextFormat(Qt.AutoText) - self.label__Hossein.setAlignment(Qt.AlignCenter) + self.label__Hossein.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) self.pushButton_close = QPushButton(self.frame) self.pushButton_close.setObjectName(u"pushButton_close") self.pushButton_close.setGeometry(QRect(361, 4, 20, 20)) self.pushButton_close.setMinimumSize(QSize(18, 18)) - self.pushButton_close.setFont(font3) + font6 = QFont() + font6.setFamily(u"Segoe UI") + font6.setPointSize(9) + self.pushButton_close.setFont(font6) self.pushButton_close.setStyleSheet(u"QPushButton {\n" " border: 2px solid rgb(128, 146, 177);\n" " border-radius: 10px; \n" @@ -148,96 +157,99 @@ def setupUi(self, MainWindow): self.pushButton_clipboard_directory.setObjectName(u"pushButton_clipboard_directory") self.pushButton_clipboard_directory.setGeometry(QRect(20, 155, 41, 30)) self.pushButton_clipboard_directory.setMinimumSize(QSize(20, 20)) - self.pushButton_clipboard_directory.setFont(font3) + self.pushButton_clipboard_directory.setFont(font6) self.pushButton_clipboard_directory.setStyleSheet(u"QPushButton {\n" -" border: 2px solid rgb(52, 59, 72);\n" +" border: 2px solid rgb(133, 201, 84);\n" " border-radius: 5px; \n" -" background-color: rgb(52, 59, 72);\n" -" color: rgb(223, 223, 223);\n" +" background-color: rgb(133, 201, 84);\n" +" color: rgb(255, 255, 255);\n" "}\n" "QPushButton:hover {\n" -" background-color: rgb(57, 65, 80);\n" -" border: 2px solid rgb(61, 70, 86);\n" +" background-color: rgb(145, 210, 90);\n" +" border: 2px solidrgb(145, 210, 90);\n" "}\n" "QPushButton:pressed { \n" -" background-color: rgb(35, 40, 49);\n" -" border: 2px solid rgb(43, 50, 61);\n" +" background-color: rgb(133, 201, 84);\n" +" border: 2px solid rgb(133, 201, 84);\n" "}") icon3 = QIcon() icon3.addFile(os.path.dirname(__file__)+"/icons/pack/cil-copy.png", QSize(), QIcon.Normal, QIcon.Off) self.pushButton_clipboard_directory.setIcon(icon3) self.pushButton_clipboard_file = QPushButton(self.frame) self.pushButton_clipboard_file.setObjectName(u"pushButton_clipboard_file") - self.pushButton_clipboard_file.setGeometry(QRect(320, 155, 41, 30)) + self.pushButton_clipboard_file.setGeometry(QRect(322, 155, 41, 30)) self.pushButton_clipboard_file.setMinimumSize(QSize(20, 20)) - self.pushButton_clipboard_file.setFont(font3) + self.pushButton_clipboard_file.setFont(font6) self.pushButton_clipboard_file.setStyleSheet(u"QPushButton {\n" -" border: 2px solid rgb(52, 59, 72);\n" +" border: 2px solid rgb(133, 201, 84);\n" " border-radius: 5px; \n" -" background-color: rgb(52, 59, 72);\n" -" color: rgb(223, 223, 223);\n" +" background-color: rgb(133, 201, 84);\n" +" color: rgb(255, 255, 255);\n" "}\n" "QPushButton:hover {\n" -" background-color: rgb(57, 65, 80);\n" -" border: 2px solid rgb(61, 70, 86);\n" +" background-color: rgb(145, 210, 90);\n" +" border: 2px solidrgb(145, 210, 90);\n" "}\n" "QPushButton:pressed { \n" -" background-color: rgb(35, 40, 49);\n" -" border: 2px solid rgb(43, 50, 61);\n" +" background-color: rgb(133, 201, 84);\n" +" border: 2px solid rgb(133, 201, 84);\n" "}") self.pushButton_clipboard_file.setIcon(icon3) self.pushButton_render_icon = QPushButton(self.frame) self.pushButton_render_icon.setObjectName(u"pushButton_render_icon") self.pushButton_render_icon.setEnabled(True) - self.pushButton_render_icon.setGeometry(QRect(75, 155, 41, 30)) + self.pushButton_render_icon.setGeometry(QRect(73, 155, 113, 30)) self.pushButton_render_icon.setMinimumSize(QSize(20, 20)) - font5 = QFont() - font5.setFamily(u"Segoe UI") - font5.setPointSize(9) - font5.setBold(False) - font5.setWeight(50) - self.pushButton_render_icon.setFont(font5) + font7 = QFont() + font7.setFamily(u"Segoe UI Semibold") + font7.setPointSize(11) + font7.setBold(False) + font7.setWeight(50) + self.pushButton_render_icon.setFont(font7) self.pushButton_render_icon.setStyleSheet(u"QPushButton {\n" -" border: 2px solid rgb(239, 192, 48);\n" +" border: 2px solid rgb(77, 190, 217);\n" " border-radius: 5px; \n" -" background-color: rgb(239, 192, 48);\n" +" background-color: rgb(77, 190, 217);\n" " color: rgb(255, 255, 255);\n" +"}\n" +"QPushButton:hover {\n" +" background-color: rgb(98, 193, 217);\n" +" border: 2px solidrgb(98, 193, 217);\n" +"}\n" +"QPushButton:pressed { \n" +" background-color: rgb(77, 190, 217);\n" +" border: 2px solid rgb(77, 190, 217);\n" "}") icon4 = QIcon() icon4.addFile(os.path.dirname(__file__)+"/icons/pack/cil-speedometer.png", QSize(), QIcon.Normal, QIcon.Off) self.pushButton_render_icon.setIcon(icon4) self.pushButton_render_icon.setIconSize(QSize(30, 30)) - self.label_9 = QLabel(self.frame) - self.label_9.setObjectName(u"label_9") - self.label_9.setGeometry(QRect(70, 155, 51, 30)) - self.label_9.setFont(font3) - self.label_9.setStyleSheet(u"QLabel {\n" -" border: 2px solid rgb(239, 192, 48);\n" + self.pushButton_CreateRead = QPushButton(self.frame) + self.pushButton_CreateRead.setObjectName(u"pushButton_CreateRead") + self.pushButton_CreateRead.setGeometry(QRect(196, 155, 113, 30)) + font8 = QFont() + font8.setFamily(u"Segoe UI Semibold") + font8.setPointSize(10) + font8.setBold(False) + font8.setWeight(50) + self.pushButton_CreateRead.setFont(font8) + self.pushButton_CreateRead.setStyleSheet(u"QPushButton {\n" +" border: 2px solid rgb(77, 190, 217);\n" " border-radius: 5px; \n" -" background-color: rgb(239, 192, 48);\n" +" background-color: rgb(77, 190, 217);\n" " color: rgb(255, 255, 255);\n" +"}\n" +"QPushButton:hover {\n" +" background-color: rgb(98, 193, 217);\n" +" border: 2px solidrgb(98, 193, 217);\n" +"}\n" +"QPushButton:pressed { \n" +" background-color: rgb(77, 190, 217);\n" +" border: 2px solid rgb(77, 190, 217);\n" "}") - self.label_9.setAlignment(Qt.AlignCenter) - self.label_render_time = QLabel(self.frame) - self.label_render_time.setObjectName(u"label_render_time") - self.label_render_time.setGeometry(QRect(110, 155, 200, 30)) - self.label_render_time.setFont(font3) - self.label_render_time.setStyleSheet(u"color: rgb(234, 234, 234);\n" -"background-color: rgb(239, 192, 48);\n" -" border-radius: 5px; ") - self.label_render_time.setAlignment(Qt.AlignCenter) - self.label_version.raise_() - self.label_3.raise_() - self.pushButton_2.raise_() - self.label_project_name.raise_() - self.pushButton_3.raise_() - self.label__Hossein.raise_() - self.pushButton_close.raise_() - self.pushButton_clipboard_directory.raise_() - self.pushButton_clipboard_file.raise_() - self.label_9.raise_() - self.pushButton_render_icon.raise_() - self.label_render_time.raise_() + icon5 = QIcon() + icon5.addFile(os.path.dirname(__file__)+"/icons/pack/cil-movie.png", QSize(), QIcon.Normal, QIcon.Off) + self.pushButton_CreateRead.setIcon(icon5) self.label_icon_success = QLabel(self.centralwidget) self.label_icon_success.setObjectName(u"label_icon_success") self.label_icon_success.setGeometry(QRect(170, 10, 80, 80)) @@ -256,12 +268,12 @@ def setupUi(self, MainWindow): def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Notification Panel", None)) - self.label_version.setText(QCoreApplication.translate("MainWindow", u"Km Rendering Finished v1.0", None)) + self.label_version.setText(QCoreApplication.translate("MainWindow", u"Km Rendering Finished v2.0", None)) self.label_3.setText(QCoreApplication.translate("MainWindow", u"Rendering Finished !", None)) self.pushButton_2.setText(QCoreApplication.translate("MainWindow", u"Open Render Directory", None)) - self.label_project_name.setText(QCoreApplication.translate("MainWindow", u"FS_132-080_comp_v007.nk", None)) + self.label_project_name.setText(QCoreApplication.translate("MainWindow", u"FS_132-080_comp_v007.nk", None)) self.pushButton_3.setText(QCoreApplication.translate("MainWindow", u"Open Render File", None)) - self.label__Hossein.setText(QCoreApplication.translate("MainWindow", u"By Hossein Karamian", None)) + self.label__Hossein.setText(QCoreApplication.translate("MainWindow", u"By Hossein Karamian", None)) #if QT_CONFIG(tooltip) self.pushButton_close.setToolTip(QCoreApplication.translate("MainWindow", u"Close", None)) #endif // QT_CONFIG(tooltip) @@ -274,9 +286,14 @@ def retranslateUi(self, MainWindow): self.pushButton_clipboard_file.setToolTip(QCoreApplication.translate("MainWindow", u"Copy Render File Address to ClipBoard", None)) #endif // QT_CONFIG(tooltip) self.pushButton_clipboard_file.setText("") - self.pushButton_render_icon.setText("") - self.label_9.setText(QCoreApplication.translate("MainWindow", u"


", None)) - self.label_render_time.setText(QCoreApplication.translate("MainWindow", u"Render Time (H:M:S) : 00:14:07", None)) +#if QT_CONFIG(tooltip) + self.pushButton_render_icon.setToolTip(QCoreApplication.translate("MainWindow", u"Render Time (H:M:S)", None)) +#endif // QT_CONFIG(tooltip) + self.pushButton_render_icon.setText(QCoreApplication.translate("MainWindow", u"00:05:23", None)) +#if QT_CONFIG(tooltip) + self.pushButton_CreateRead.setToolTip(QCoreApplication.translate("MainWindow", u"Create Read Node From Rendered File", None)) +#endif // QT_CONFIG(tooltip) + self.pushButton_CreateRead.setText(QCoreApplication.translate("MainWindow", u"Create Read", None)) #if QT_CONFIG(tooltip) self.label_icon_success.setToolTip("") #endif // QT_CONFIG(tooltip) diff --git a/README.md b/README.md index 5361e5e..6253b70 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,9 @@ -## Km-Rendering-Finished +## Km-Rendering-Finished v2.0 This tool shows a Notification with some tools after a Nuke render finished -![Km_Rendering_Finished_for_nuke](https://user-images.githubusercontent.com/93508495/143129421-1126a359-bbc5-4991-8437-ea966ef51458.jpg) +![Km_Rendering_Finished_v2](https://user-images.githubusercontent.com/93508495/145724037-537ef51d-d4fc-4990-a9e6-eab8bb113b2f.gif) -### Preview - -![info1](https://user-images.githubusercontent.com/93508495/143129797-2d56af90-e26f-4555-a86b-0bdc18236568.gif) ### Install 1. Copy 'Km_Rendering_Finished' folder to nuke plugin path @@ -16,14 +13,29 @@ This tool shows a Notification with some tools after a Nuke render finished `nuke.pluginAddPath('./Km_Rendering_Finished')` ### Compatibility -OS : Window +OS : Window, Linux Nuke Version: 13, 12, 11 +### Changes Log ++ v1.0 + + First version ++ v1.0.1 + + Bug Fix ++ v1.0.2 + + Bug Fix ++ v2.0 + + Bug Fix + + Linux compatible + + Add Create Read Node Button + + Open Render File button now also working for sequence renders + ### Feedbacks Any feedbacks and suggestions are welcomed kmworks.call@gmail.com -[www.kmworks.ir](http://www.kmworks.ir) \ No newline at end of file +[www.hkaramian.com](http://www.hkaramian.com) + +![Km_Rendering_Finished_for_nuke](https://user-images.githubusercontent.com/93508495/145636130-7de59909-d078-484b-b198-14b82de1e449.jpg) \ No newline at end of file