Creating nukescripts.PythonPanel

This is me getting too lazy to deal with one read node at a time. I took down some notes about nukescripts.PythonPanel as I creates pop ups to change read node settings in bulk.

Currently this tool only includes two scripts:

  1. selectRead: Click, and it'll select all your read nodes!

  2. setLocalization: A simple pop up for you to set localization policy, for read nodes only or everything (like readGeo2)

Note: 'Convert file path to absolute', 'Select Nodes with File Knob' and 'Set Project Directory' comes from another script called SetProjDir.
setLocalization expanded

In the process of writing setLocalization I experimented with nukescripts.PythonPanel as mentioned in this post, which I explained a problem with using nuke.EnumerationPulldown while writing this function. I guess what's unexpected is that the old nuke.panel doesn't have a text knob.

I was surprised that nukescripts.PythonPanel was quite poorly documented, so I figured most of these on my own. Turned out I don't necessarily needs to create a class or self as shown in nuke python developer guide if I just wanted a simple pop up panel.

This alone create a pop up panel.

The above creates the knobs, and below uses a for loop to add them all to the created panel.

for k in (p.checkboxKnob, p.localizationKnob, p.textKnob):
    p.addKnob(k)

This tool is now available for download on nukepedia here. You will also find any future updates or development on that page.

Previous
Previous

Nuke Frame Server setup on Windows

Next
Next

Project Directory in Nuke