SUMMARY
This article contains a list of the default panel IDs for the panels registered in Nuke, and explains how these can be used.
MORE INFORMATION
The Nuke GUI is made up of panels, such as the Node Graph and the Properties panel, which sit inside different panes, sections of the GUI where different panels can be docked.
All panels which are created in Nuke are registered so they can be moved to a different pane, or in some cases, multiple versions of the same panel type can be opened.
Custom panels can also be registered to create extra GUIs for controlling elements inside Nuke. For example, having a panel of frequently created nodes so that they can be easily created again, or a panel to access pipeline tools such as a render farm, is a useful custom setup.
These panels are registered into Nuke by using the nukescripts.registerPanel()
command. More information about this command can be found in our documentation here: Custom Panels
PANEL IDS
Below is the list of panel IDs for the standard panels which can be created in Nuke 14.0v5:
uk.co.thefoundry.backgroundrenderview.1
Curve Editor.1
DopeSheet.1
Error Console.1
uk.co.thefoundry.monitorController.1
Pixel Analyzer.1
Profile.1
Progress.1
Properties.1
Scenegraph.1
Toolbar.1
--------------------------------------------------------------------------------------------------------------
DAG.1
DAG.2
uk.co.thefoundry.histogram.1
uk.co.thefoundry.histogram.2
uk.co.thefoundry.scripteditor.1
uk.co.thefoundry.scripteditor.2
uk.co.thefoundry.vectorscope.1
uk.co.thefoundry.vectorscope.2
Viewer.1
Viewer.2
uk.co.thefoundry.waveformscope.1
uk.co.thefoundry.waveformscope.2
NOTE: The first section above can only have one instance of the panel created, whereas the second section can have multiple instances of the same panel. Each instance of the same panel will have a different number.
PANEL ID USES
One way the panel IDs can be used is for better control when adding extra panels to the Nuke GUI. Custom panels can be added to the same pane as the desired panel by using the panel IDs and the commands nuke.getPaneFor()
and nuke.addToPane()
.
Below is an example of how to add a simple Python panel to the same pane as the Node Graph:
class TestPanel(nukescripts.PythonPanel): ### Create a PythonPanel with an enumeration knob
def __init__(self):
nukescripts.PythonPanel.__init__(self, 'Test Elements')
self.typeKnob = nuke.Enumeration_Knob('element1', 'element1', ['Test1', 'Test2'])
self.addKnob(self.typeKnob)
pane = nuke.getPaneFor('DAG.1') ### Get the pane for the Node Graph, using it’s ID, ‘DAG.1’
p = TestPanel()
p.addToPane(pane)
If you want to get the IDs of the open panels from the current Nuke session, including the IDs of custom panels, the code below can be run in the Script Editor and will return the list of panel titles and their IDs:
from PySide2 import QtCore, QtGui, QtWidgets
def findPanelIDs():
stack = QtWidgets.QApplication.topLevelWidgets()
while stack:
widget = stack.pop()
if widget.windowTitle():
print ("\nTitle: " + widget.windowTitle())
print ("Panel ID: " + widget.objectName())
stack.extend(c for c in widget.children() if c.isWidgetType())
findPanelIDs()
FURTHER READING
More information about the nuke.getPaneFor()
and nuke.addToPane()
functions can be found in the documentation linked below:
nuke.getPaneFor()
PythonPanel().addToPane()
We're sorry to hear that
Please tell us why