Skip to content

Commit

Permalink
Eighth Release
Browse files Browse the repository at this point in the history
  • Loading branch information
melMass committed Jul 9, 2021
1 parent 592d70f commit 4edaa1f
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 86 deletions.
29 changes: 17 additions & 12 deletions W_hotbox.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#----------------------------------------------------------------------------------------------------------
# Wouter Gilsing
# [email protected]
version = '1.6'
releaseDate = 'May 13 2017'
version = '1.7'
releaseDate = 'June 26 2017'

#----------------------------------------------------------------------------------------------------------
#
Expand Down Expand Up @@ -39,7 +39,12 @@
#----------------------------------------------------------------------------------------------------------

import nuke
from PySide import QtGui, QtCore

#Choose between PySide and PySide2 based on Nuke version
if nuke.NUKE_VERSION_MAJOR < 11:
from PySide import QtCore, QtGui, QtGui as QtWidgets
else:
from PySide2 import QtGui, QtCore, QtWidgets

import os
import subprocess
Expand All @@ -55,7 +60,7 @@

#----------------------------------------------------------------------------------------------------------

class hotbox(QtGui.QWidget):
class hotbox(QtWidgets.QWidget):
'''
The main class for the hotbox
'''
Expand All @@ -77,7 +82,7 @@ def __init__(self, subMenuMode = False, path = '', name = '', position = ''):
if operatingSystem not in ['Darwin','Windows']:
self.setAttribute(QtCore.Qt.WA_PaintOnScreen)

masterLayout = QtGui.QVBoxLayout()
masterLayout = QtWidgets.QVBoxLayout()
self.setLayout(masterLayout)

self.selection = nuke.selectedNodes()
Expand Down Expand Up @@ -110,7 +115,7 @@ def __init__(self, subMenuMode = False, path = '', name = '', position = ''):
self.mode = 'Single'

#Layouts
centerLayout = QtGui.QHBoxLayout()
centerLayout = QtWidgets.QHBoxLayout()

centerLayout.addStretch()
centerLayout.addWidget(hotboxButton('Reveal in %s'%getFileBrowser(),'revealInBrowser()'))
Expand Down Expand Up @@ -144,7 +149,7 @@ def __init__(self, subMenuMode = False, path = '', name = '', position = ''):


#Stretch layout
centerLayout = QtGui.QHBoxLayout()
centerLayout = QtWidgets.QHBoxLayout()

centerLayout.addStretch()
for index, item in enumerate(centerItems):
Expand All @@ -169,7 +174,7 @@ def __init__(self, subMenuMode = False, path = '', name = '', position = ''):

if difference != 0:

extraLayout = QtGui.QVBoxLayout()
extraLayout = QtWidgets.QVBoxLayout()

for i in range(abs(difference)):
extraLayout.addSpacing(35)
Expand Down Expand Up @@ -252,7 +257,7 @@ def eventFilter(self, object, event):
#Button field
#----------------------------------------------------------------------------------------------------------

class nodeButtons(QtGui.QVBoxLayout):
class nodeButtons(QtWidgets.QVBoxLayout):
'''
Create QLayout filled with buttons
'''
Expand Down Expand Up @@ -388,7 +393,7 @@ def __init__(self, mode = '', allItems = ''):

#nodeHotboxLayout
for row in rows:
self.rowLayout = QtGui.QHBoxLayout()
self.rowLayout = QtWidgets.QHBoxLayout()

self.rowLayout.addStretch()

Expand All @@ -403,7 +408,7 @@ def __init__(self, mode = '', allItems = ''):

#----------------------------------------------------------------------------------------------------------

class hotboxCenter(QtGui.QLabel):
class hotboxCenter(QtWidgets.QLabel):
'''
Center button of the hotbox.
If the 'color nodes' is set to True in the preferences panel, the button will take over the color and
Expand Down Expand Up @@ -507,7 +512,7 @@ def mouseReleaseEvent(self,event):
#Buttons
#----------------------------------------------------------------------------------------------------------

class hotboxButton(QtGui.QLabel):
class hotboxButton(QtWidgets.QLabel):
'''
Button class
'''
Expand Down
Loading

0 comments on commit 4edaa1f

Please sign in to comment.