Channel Hotbox v1.6


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Falk Hofmann
Easy way of changing layer inside the viewer.
Requirements:
11.0, 10.5, 10.0, 9.0, 8.0, 7.1, 7.0, 6.3 or later
Linux, Mac, Windows
31 May 2018
694

update v1.6

  • Implemented suggestion from Mitchell Kehn to better handle window focus.
  • Minor refactoring.

update v1.5

  • Code clean up.
  • Removed option to choose between open up on cursor or centeredon screen. Now openening fixed under the cursor.
  • Specified installation command inside script.

update v1.4 

  • added compatibility for nuke11 and pyside2 
  • option to create grade node with channel set to selected layer
  • switch back to rgba via 'alt'
  • replaced autcompleter to inside the line-edit
  • code clean up
  • sanity check if viewer available and connected

 

 

the channel Hotbox

i wrote this small tool in PySide for easy and fast changing channels/layer inside the viewer since the dropdown menu or the page up/down solution are too tedious. after i tested it a while in production i added the option to also use it for shuffling out channels.

it is based on the current viewer and which node it is connected to. NOT the selected node inside the nodegraph. the script checks all available layer at this node and gives you the option to show, shuffle or grade them.

 

 

demo on vimeo

vimeo link

 

 

click:
change the viewer to the selected channel

shift+click:
shuffle out all selected channels

strg+click:
create grade node with channel set to selected

alt:
switch viewer back to rgba

 

To install with hotkey on alt+q, add this to your menu.py and make sure that the script is located in your nuke plugin path:

import channel_hotbox
nuke.menu('Nuke').findItem('Edit').addCommand('HotBox', 'channel_hotbox.start()', 'alt+q')

I have worked with it under windows and linux. on ubuntu it seems correct, under centos is an issue with the transparent background, which will shown as black.

 

Any kind feedback is welcome.

 

cheers,

Falk

Please login in order to download these files.

Comments   

 
+2 # Chris Forrester 2014-03-12 10:33
This is a great script and will certainly encourage me more to use the layers, as like yourself I got tired of constantly flipping through the drop down menu. Is a great tool if you are picking up from someone else and want to quickly assess how the layers look as they flow through the script.
 
 
+1 # Adrian Sutherland 2014-09-24 21:35
This is great! Much more efficient way of cycling through layers. Will certainly speed up workflow :-)
 
 
# Sam Cole 2014-10-11 01:03
Any reason not to use an explicit open source license?
 
 
# Falk Hofmann 2015-06-09 20:39
hey Sam,
nope, there isn't an explicit reason,will change that with the next version.
feel free to use it open as you like!
 
 
# Michael Clemens 2014-11-19 01:51
How do you execute this? How do you bring it up in Nuke?
 
 
# Seth Peterson 2015-02-12 18:31
Quoting Michael Clemens:
How do you execute this? How do you bring it up in Nuke?



Just drop the hotbox.py into your plugin dir. On my Mac it's ''Applications ▸ Nuke9.0v1 ▸ Nuke9.0v1(Show package contents) ▸ Contents ▸ MacOS ▸ plugins''

Then put this at the end of your menu.py (This makes the tilda key the hotkey):

#### add menu item to Edit menu
import hotbox
nuke.menu("Nuke").findItem("Edit").addCommand("HotBox", 'hotbox.create_ it()', "`")
 
 
# karthick efx 2017-08-20 18:34
how to import this did u get this hot box
any video for this
 
 
# karthick efx 2017-08-20 19:08
did u get this video
 
 
# Sebastian Ernst 2015-03-20 02:27
Getting this error when trying to run script:

---------------------------
Nuke
---------------------------
an integer is required

Line 165 woop

Any help?
 
 
# Falk Hofmann 2015-06-09 20:37
oh jesus! haven't checked in on Nukepedia for a while. sorry about that.
if it's still an issue, please let me know. in my experience, this kind of error means, that a viewer is missing.
 
 
# Dominique Richer 2016-04-09 15:56
I know it is pretty old but has anybody try this on a Mac (i'm on El Capitan) and when I use the shortcut assigned to the hotbox, I have to cmd+tab to see the hotbox (on nuke 8.0v6). Worked perfectly on Linux Centos 6. Any help would be nice!
 
 
# Falk Hofmann 2016-04-10 10:28
sorry, haven't had the chance to test on a mac.

sounds like you would have to set explicit the focus to the panel.
so it would be a line of a pyside attribute or just something like "setFocus(chann elHotbox)". but i would to dig around in the PySide doc as well.
 
 
# Dominique Richer 2016-04-10 15:00
I am not a pyside expert but I couldn't get the 'setFocus()' function to work. What I found was that if I replace 'self.setWindow Flags(QtCore.Qt .FramelessWindo wHint)' with 'self.setWindow Flags(QtCore.Qt .FramelessWindo wHint | QtCore.Qt.Windo wStaysOnTopHint )' it works on mac and still works on linux too.
 
 
# Alex snookes 2016-09-05 16:10
Has anyone been able to get this to work in nuke using the Tilda (`) key as i am still having problems with it?
 
 
# Falk Hofmann 2016-09-05 19:53
hey Alex,
on my machines does it work on linux and windows. do you have an english keyboard layout so you don't need an extra key modifier? could be the issue.
rather than this you could just set the hotkey to a different key by just changing the key in the last quotes.

for example to run this by hitting "v" you could change the command to:

nuke.menu("Nuke").findItem("Edit").addCommand("HotBox", 'hotbox.create_ it()', "v")
 
 
# karthick efx 2017-08-20 18:10
how to put in nuke Python
Channel Hotbox v1.4 ?
 
 
# Falk Hofmann 2017-08-21 10:10
add this to your menu.py

import hotbox
nuke.menu("Nuke").findItem("Edit").addCommand("HotBox", 'channelHotbox. start()', "alt+q")


alt+q will be the short cut. you can change this to whatever you like

you might want to check out this tutorial
http://www.nukepedia.com/gizmos/creating-a-new-menu-for-custom-gizmos
 
 
# li zhaohui 2017-11-22 06:33
There are some problems. There are 2 EXR files in the project, and the layers of the 2 files are different. After disassembling a EXR, the Channel Hotbox tool splits first EXR Shuffle layers when splitting the second exr!
 
 
# Falk Hofmann 2017-12-18 22:18
hey there,
just to confirm:
the hotbox is affected by the current looked at node. so in case you are selecting one stream and currently viewing another one, the hotbox will listen the channels of the active viewer, not the selected node.
are you still having issues with keeping this in mind?
 
 
# Seth Peterson 2017-12-12 23:33
Hi guys, has anyone had any luck getting v1.4 working on OSX?

I'm running Nuke 11.1v1

macOS High Sierra 10.13.1

At launch, I get the "can not interpret menu.py" error.
 
 
# Falk Hofmann 2017-12-18 22:24
hey Seth,
seems like asimple menu.py error not an issue with the actual script.
the following should do the trick inside the menu.py with mapping the shortcut to alt+q

import channelHotbox
nuke.menu('Nodes').addMenu("my stuff").addComm and("channelHot box", 'channelHotbox. start()', 'alt+q')

but i do not had chance to actually test it on OSX.
alternatively you could test it with leaving the menu blank and run the following inside the script editor, while making sure the script is inside your nuke pluginpath

import channelHotbox
channelHotbox.start()
 
 
# Seth Peterson 2017-12-18 23:50
Hi Falk,

Thanks for the response. That seemed to do it! I'll keep testing the other features and let you know what I find. Thanks again.

-Seth
 
 
# Seth Peterson 2018-01-03 20:10
Hi Falk,

Seems I ran into one more small issue. When I switch the UX options to:

SHOW_ON_CURSOR = 0
SHOW_ON_SCREEN = 1

I get this error: 'module' object has no attribute 'QApplication'


When I switch the options to:

SHOW_ON_CURSOR = 0
SHOW_ON_SCREEN = 0

I get this error: 'module' object has no attribute 'QDesktopWidget'

Any thoughts? Thanks in advance.
 
 
# Falk Hofmann 2018-02-19 21:28
Hey Seth,
sorry for the late response.
Seems like a PySide issue. Are you on Nuke 11 already or on 10.5 and below?
 
 
# Seth Peterson 2018-02-20 17:18
Hi Falk,

No worries buddy. I'm using 11.1v1.

Cheers,

-Seth
 
 
# Falk Hofmann 2018-04-04 21:59
sorry man,
late again.
i couldn't figure out what the actual issue is.
in the very latest version of this thingy i removed the option for switching around the position. therefore this issue should not appear anymore, well and the option as well.
sorry that i could not find a straight solution, but i never encountered this issue on my end. therefore it's pretty hard to debug.
 
 
# Alexey Kuchinski 2018-02-19 11:39
Hi Falk, installed your script today and have some feedback:

1 - it is awesome, very responsive and fast!!!
2 - on the installation page of Nukepedia - can you please clean up the installation advises mess? the name of the module is changing from answer to answer :D - it is confusing!
thanks!
 
 
# Falk Hofmann 2018-02-19 21:26
thanks Alexey!
All the descriptions and names were changing. sorry about that.
I submitted just now cleaned up version.
should be online soon.
 
 
# Alexey Kuchinski 2018-02-20 13:43
thanks
next thing:
is it possible to have only one instance of the pop up?
right now if i did open the channel box and clicked outside of it
the window will stay in the background, and later i will open one more window and so on.
the point is i do not want to pay attention if i did close it or not so every new window is closes one before.
hope you getting my point
thanks
 
 
# Michael Habenicht 2018-03-16 15:03
Works if you set QtCore.Qt.Popup as additional window flag. Then it is automatically closed when you click outside of it.
 
 
# baltazar gnomonich 2018-03-24 15:57
regarding the pop up, sorry for nube question, should i add something in the channel_hotbox. py ?
 
 
+1 # Falk Hofmann 2018-04-04 21:57
Quoting baltazar gnomonich:
regarding the pop up, sorry for nube question, should i add something in the channel_hotbox.py ?

hey baltazar,
like michael pointed out you could add an additional flag.
take a look at line numbers 121, 122 and just keep adding one more with QtCore.Qt.Popup
 
 
# Falk Hofmann 2018-04-04 21:53
cool, thank you Michael!
 
 
# Marcel Pichert 2018-04-23 08:45
Really nice script thanks Falk! :)
 
 
# Mitchell Kehn 2018-05-30 08:07
Hey Falk,

I made a change to your script that closes the hotbox if the user clicks away from it, rather than keeping it open but running it the background.
With things like this where there's no frame drawn around a pop-up that's pretty common behavior, and It doesn't seem uncommon to have something like 10 of these stuck open behind the main nuke window.
Mind if I email it to you?
 
 
# Falk Hofmann 2018-05-30 10:14
Quoting Mitchell Kehn:
Mind if I email it to you?


not at all!
please send over your enhancements and i will implement them as soon as i can
 
 
# Mitchell Kehn 2018-05-30 14:02
Just sent a link to a gist with the updated file through the contact form on your website :)
 

You have no rights to post comments

We have 2027 guests and 110 members online