Pause Viewer v1.0


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Simon Jokuschies
Pause Nuke's Viewer nodes to prevent any image processing when loading a Nuke script.
Requirements:
11.0, 10.5, 10.0, 9.0, 8.0 or later
Linux, Mac, Windows
12 Apr 2018
179

Despription

pause_viewer provides functionality to pause Nuke’s Viewer nodes to prevent any image processing without using the --pause flag. This is useful to prevent Nuke from processing the image when loading a Nuke Script in order to keep interacting with the working file quick while not deleting any Viewer node or changing/ un-piping any node connection.

This is just a small but to my mind quite useful adition which I wanted to share. For some reason, Nuke makes the functionality of pausing the Viewer when loading a Nukescript without using the --pause flag not that obvious. Nuke doesn’t offer the functionality to access the ‘Viewer Pause’ button directly. In addition, it doesn’t let us access nuke.activeViewer() when using an onLoad callback. For that reason we use some kind of workaround to prevent Nuke from processing the current image by setting all active viewer inputs to None. This feels actually quite a bit like a hack, but it works smoothly and reliable. This speeds up working and navigating when opening a nuke script and prevents Nuke from freezing.

 

dag

 

Download

- Directly from nukepedia.com

- www.leafpictures.de

- Or simply clone from [email protected]:nukevfx/pause_viewer.git

 

Installation

Put the whole pause_viewer into your Nuke home directory or in any other location of your NUKE_PATH. Add the following line to your init.py:

nuke.pluginAddPath('pause_viewer')


Usage

pause_viewer activates two things:
1) The onLoad callback will make sure to execute the pause functionality when a Nuke script is loaded. This will prevent Nuke from processing the image.
2) Nuke provides the shortcut P to pause the Viewer. However, this shortcut is context sensitive to the Viewer node. Pressing P in the DAG creates a RotoPaint node. To access the pause viewer functionality everywhere you can press Ctrl+Y (Linux, Windows) / cmd + Y (Mac). The command is also accessible from Nuke’s menu bar as seen below.

ui command

In order to re-activate your viewer you can simply press one of your numbers on your number pad.




Please login in order to download these files.

Comments   

 
0 # mr bjoern 2019-04-03 10:28
Seems like the pause is broken in 11.3v3, it behaves like hitting W in the viewer, piing in a seperate viewer
 
 
0 # mr bjoern 2019-04-03 10:51
on scene load the script seems to work as usual. But triggering it via a shortcut does the same as hitting "w" in the viewer. connecting a another pipe for A/B viewing
 
 
0 # Eduardo Vazquez 2021-09-03 22:33
Seems it triggers the "w" in the viewer whenever it catches a viewer input above 0-9, like 10 or 11... it is a matter of limiting the input:

for viewer in nuke.allNodes(" Viewer"):
index = viewer.inputs() + 1
if index > 10 :
index = 9
dot = nuke.nodes.Dot( )
dot.selectOnly( )
nukescripts.con nect_selected_t o_viewer(index)
nuke.delete(dot )
 
 
0 # Nick Guth 2020-05-18 22:33
Doesn't seem to work in nuke 12. Not sure why! Did they happen to change the naming of the menu items or something?
 

You have no rights to post comments

We have 4980 guests and 137 members online