Package nukescripts :: Module panels
[hide private]
[frames] | no frames]

Module panels

source code

Classes [hide private]
  PythonPanel
  WidgetKnob
Functions [hide private]
 
registerPanel(id, command) source code
 
unregisterPanel(id, command) source code
 
restorePanel(id) source code
 
PythonPanelKnobChanged(widget) source code
PythonPanel
registerWidgetAsPanel(widget, name, id, create=False)
Wraps and registers a widget to be used in a Nuke panel.
source code
Variables [hide private]
  __panels = dict()
Function Details [hide private]

registerWidgetAsPanel(widget, name, id, create=False)

source code 
Wraps and registers a widget to be used in a Nuke panel.

widget - should be a string of the class for the widget
name - is is the name as it will appear on the Pane menu
id - should the the unique ID for this widget panel
create - if this is set to true a new NukePanel will be returned that wraps this widget

Example ( using PyQt )

import nuke
import PyQt4.QtCore as QtCore
import PyQt4.QtGui as QtGui
from nukescripts import panels

class NukeTestWindow(QtGui.QWidget):
  def __init__(self, parent=None):
    QtGui.QWidget.__init__(self, parent)
    self.setLayout( QtGui.QVBoxLayout() )
    self.myTable    = QtGui.QTableWidget( )
    self.myTable.header = ['Date', 'Files', 'Size', 'Path' ]
    self.myTable.size = [ 75, 375, 85, 600 ]
    self.layout().addWidget( self.myTable )

nukescripts.registerWidgetAsPanel('NukeTestWindow', 'NukeTestWindow', 'uk.co.thefoundry.NukeTestWindow' )

Returns: PythonPanel