KnobScripter v2.2

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Adrian Pueyo
Complete python script editor for Nuke.
11.0, 10.5, 10.0, 9.0 or later
Linux, Mac, Windows
16 Sep 2019

                KnobScripter v2.2                


KnobScripter 2.2 is a completely redesigned python script editor for nuke, where you can create, modify or run python (.py) files, as well as program directly on callback (knobChanged, onCreate, ...) or python knobs (Python script buttons or Python Custom Knobs).

It works as a floating panel to be called on a selected node, and/or as a dockable pane.

Tutorial/Overview video:

Latest Updates video:

User Guide (.pdf):

KnobScripter v2.1

Latest pre-release fixes will be here:


Update Log:

KnobScripter v2.2 - 12 August 2019

Bug fixes and enhancements:

  1. Variable placeholders error fixed (bug introduced on v2.1).
  2. PySide import switch including Qt.


KnobScripter v2.1 - 10 August 2019

New features:

  1. New Sublime color style. You can now choose between sublime or Nuke style in the Preferences.
  2. Font selector in the Preferences, where you can set any available font.
  3. Option to display the knob labels too (and not only names) on the knob dropdown.
  4. Now accepting special characters (like accents or symbols) through utf-8 encoding.
  5. New Snippets functionality: A snippet containing “hello $$world$$” will write “hello world” and the word “world” will be selected straightaway.
  6. Auto-completer (when pressing tab) now also includes the functions, variables, classes etc live from the current script you’re writing.

Bug fixes and enhancements:

  1. Python syntax highlighting improved.
  2. Snippet editor now includes syntax highlighting.
  3. Parenthesis/brackets auto-closing behavior improved when written inside each other.
  4. Fixed error that prevented opening a new KnobScripter when a Blinkscript node properties were open too.
  5. Tested on Windows OS (Nuke 11.3) and a few minor bugs fixed.
  6. Improved auto-scroll to cursor behavior when duplicating, moving or unindenting lines.

Bugs and suggestions always appreciated. Happy scripting!

Copyright (c) 2016-2019, Adrian Pueyo All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Credit goes to Wouter Gilsing for the script editor widget part, which he made for his tool W_Hotbox. It can be downloaded here:
Please login in order to download these files.


+3 # Simon Jokuschies 2017-02-01 06:08
Hi Adrian,
This is really useful, thanks for sharing this tool :)
+1 # Adrian Pueyo 2017-02-01 17:25
Hi Simon, glad you like it :)
+1 # Parimal Desai 2017-02-01 09:00
Much needed, Thanks Adrian!
# Adrian Pueyo 2017-02-01 17:31
You're welcome! :-)
# Gaetan Baldy 2017-02-03 10:27
Very good work ! this is awesome !
# Adrian Pueyo 2017-03-05 20:19
Thank you!
# Vitaly Musatov 2017-02-10 10:10
Thank you Adrian for sharing! Awesome tool!
# Adrian Pueyo 2017-03-05 20:20
You're welcome! :)
# Alexey Kuchinski 2017-05-26 12:58
Thank you Adrian, very useful!
# Javier Saura Saura 2018-02-05 09:44
Hi! It is not working in to Nuke 11 =/

Does anyone know something?

Many thanks!
# Adrian Pueyo 2018-03-10 00:20
Hey Javier,

It's now updated to PySide2 and should work in both Nuke 11 and previous versions :-) Let me know if you experience any problems!

# Javier Saura Saura 2018-03-10 11:01
Hi Adrian! it does Work! I will comment you if it shows something problem.

Thanks a lot!
# Matthias Eckhardt 2018-03-10 13:56
i love this tool!! thx
# Jeang Jenq Loh 2018-04-10 16:29
I just found this and this is awesome!!! Thanks Adrian!
# Jed Smith 2018-05-13 15:44
This is awesome! Super useful tool which I will be immediately adding to my .nuke config.

I have one feature request: I often add knobChanged code to nodes within a group, so that I can avoid having the knobChanged fire whenever the selection state or position of a gizmo changes. This improves performance especially in big nuke scripts.

Right now in the tool it is possible to select a node inside a group and press alt+z to load the editor, but it's not possible to press the "Change" button and switch to a node insideo a group. Would this be possible to add?
# Adrian Pueyo 2018-09-07 11:42
Hey Jed, thanks for your feedback. This is now fixed in v1.3.
Let me know if you encounter any other weird behaviours! :-)
+2 # Alexey Kuchinski 2019-05-20 06:11
Best Nuke 11 feature by far.
Foundry should pay maintenance fee to you Adrian!!!
# Prasannakumar T Bhat 2019-05-21 05:24
Thanks for the Amazing tool. I stopped using other script editors after the update :D

one of my scripts giving this error when i click save and it won't able to save. (checked file permission)

Traceback (most recent call last):
File "/usr/people/prasannab/.nuke/KnobScripter/", line 1561, in saveClicked
self.saveScriptContents(temp = False)
File "/usr/people/prasannab/.nuke/KnobScripter/", line 953, in saveScriptContents
UnicodeEncodeError: 'ascii' codec can't encode character u'\u03b3' in position 8796: ordinal not in range(128)
+1 # Adrian Pueyo 2019-05-21 06:46
Thanks Prasannakumar! :-) will try to fix that for the next update, seems to be a problem with unicode characters I didn't account for.
# Adrian Pueyo 2019-08-12 07:07
Hey, the new update (v2.1) should fix the issues :-)
# Carlos Trijueque 2019-05-21 05:57
Love this new version Adrian. I haven't had the time to test it properly yet but on my first run I've encountered an issue. The Scripter loads fine on Nuke 10.5 but when I tried to use it in Nuke 11.2 it crashed it and throws this error:

QWidget: Must construct a QApplication before a QPaintDevice
I'll run some proper test when I have the time and report back, but I wanted to leave a comment just in case somebody else is having the same issue. Let me know if I can do anything else to help.



P.S: As you already know we are a Windows shop.
# Adrian Pueyo 2019-05-21 06:45
Hey Charlie, thanks for your message.

Indeed, it's only been tested on Linux and Mac. I completely forgot testing it on Windows!

Will make it the highest priority fix and update this thread :-)

# Robin Dutta 2019-05-21 22:45
Thanks, I've been waiting for a proper script editor to make it's way into nuke.

We did encounter an error loading the module in our studio though. Forcing PySide2 for nuke versions 11 and up resolved it though. We use the Qt shim mostly, but this worked:

if nuke.NUKE_VERSI ON_MAJOR < 11:
from PySide import QtCore, QtGui, QtGui as QtWidgets
from PySide.QtCore import Qt
from PySide2 import QtWidgets, QtGui, QtCore
from PySide2.QtCore import Qt
except ImportError:
from Qt import QtCore, QtGui, QtWidgets

Also, for those wondering how to change the font - find/replace "Courier" with "Monospace" (or your choice of font) in knob_scripter.p y. This really aught to get it's value from ScriptEditorFon t from preferences, but this workaround is sufficient.
# Adrian Pueyo 2019-05-22 06:19
Hey Robin, thanks for your input, it's great. I'll switch to your import method in case it makes a difference for anyone else...
Quoting Robin Dutta:
This really aught to get it's value from ScriptEditorFont from preferences

I had this planned for a long time but never did it. Will add it to the next version too, and update this thread. Thank you!
# Adrian Pueyo 2019-08-12 07:06
Hey Robin, the new update (v2.1) has a font selector.
+1 # Pau Rocher 2019-05-23 15:25
Ole que bueno!!
Thank you bro!!
+2 # Andrea Geremia 2019-05-24 09:28
The Foundry should integrate this KnobScripter in the next Nuke version!
Amazing Adrian!!
# Den Gheiko 2019-08-02 18:08
Adrian, thank you for the tool!
It's realy helpfull.

I'v just tested it in 11.2v4 [Win].
It works.

I hope that my personal wishes will be interesting for you:

1. Editor is loosing focus every time I save my script. I have a little professional deformation in a form of frequent uncontrolled pressing Cntrl+S. Loosing focus in editor window is realy trouble for me ))

2. I really don't like the feature with parenthesis. It's hard to describe it in words. I press '('. It grately creates '()'. I press another '(' and want to see '(())'. But no! It's '(()'. AHHHH! And it does not allow me to immideatly close. It skips every parenthesis till the end of block.
I meet this situation really often and it produces a lot of unexpected mistakes for me.
For example

3. Kind of cheeky wish ))
I realy need autocomplete.
When KnobScripter learn it I'll replace Atom immediately.

Once again - thank you for this awesome tool

#1 for writing local knobChanged and onCreate!
# Adrian Pueyo 2019-08-06 06:30
Hey, thanks for your comment!
1. Which version of Nuke and OS are you one? It doesn't do that for me on CentOS 6 and MacOS X.
2. Thanks for that!! Already fixed for the next update (in the next days).
3. There is already an autocomplete for modules and objects loaded before starting the instance of the knobscripter, via pressing tab. I am now working on also adding to that list any variables and functions defined on the text itself live. Will be up on the next release too, most probably.

Cheers! :-)
# Den Gheiko 2019-08-06 21:33
Quoting Adrian Pueyo:
Hey, thanks for your comment!
1. Which version of Nuke and OS are you one? It doesn't do that for me on CentOS 6 and MacOS X.

Win 10, NukeX 11.2v4

Quoting Adrian Pueyo:
2. Thanks for that!! Already fixed for the next update (in the next days).
3. There is already an autocomplete for modules and objects loaded before starting the instance of the knobscripter, via pressing tab. I am now working on also adding to that list any variables and functions defined on the text itself live. Will be up on the next release too, most probably.

Thanks ) You rock!
# Adrian Pueyo 2019-08-12 07:05
Hey, the new update (v2.1) should fix the issues and wishes :-)
# Den Gheiko 2019-08-12 08:53
Quoting Adrian Pueyo:
Hey, the new update (v2.1) should fix the issues and wishes :-)

It works.
Thank you )
# Marco Masotti 2019-10-08 16:33
Hey Den!
Can you show how to install the autocomplete in Atom?
# Den Gheiko 2019-10-10 07:36
Quoting Marco Masotti:
Hey Den!
Can you show how to install the autocomplete in Atom?

Hello, Marco.

1. Install autocoplete package

2. Go into settings of that package and change Python Executable Path to the python installed with Nuke.
For example C:\Program Files\Nuke11.2v 4\python.exe

3. It would not work if you donn't have nuke_i license installed.
In that case you can set Python Executable Path to the python 2.7 installed in your system ( If you have not one you need to install it with pip, anaconda, etc)
Then download dummy nuke and nukescript packages here
and set it to Extra Paths For Packages in autocomplete settings.
It should work now.

Sorry for clumsy reply.
Let me know if there will be any troubles.
# Claudia Diaz 2019-08-05 09:57
Hi Adrian, thanks for the tool. I want to try it but I admit I haven't worked with many custom made tools and I am not really sure how do you load this in Nuke? Do you have to place it in a plugins folder? thank you
# Adrian Pueyo 2019-08-06 06:25
Hi Claudia, this is explained on the User Guide pdf.

1. Copy the KnobScripter folder and paste it inside your .nuke directory.
2. Open the file inside your .nuke folder with a text editor, or create it if it
doesn’t exist.
3. Add the following line: import KnobScripter
4. Restart nuke.

Let me know if you have any problems! :-)
+1 # Robin Dutta 2019-09-20 15:35
As a Comp TD, huge thanks for this. I use this Knob Scripter everyday and it saves me so much hassle. I even dropped your name in the 2019 Nuke survey.

I am about to install 2.2 so apologies if any of these are already addressed, but here are some features I have added myself, or would like to see. I've added my mods to this fork of your git:

  • Unicode support to Knobs
  • Select Text on Find
  • Use Alt+Backspace in Script Edit pane to clear output (similar to Ctrl+Backspace in original script editor)
  • Added some missing keywords to syntax highlighting

  • Ctrl+S save shortcut not working
  • Add "Remove Custom" option to clean up the Script pulldown
  • Also in pulldown, Rename "Open..." to "Open in browser" and "Add Custom" to "Add Source Dir" or something similar. I always click on the wrong one.
  • Ctrl+Scroll to change font size

Now, if you would only rewrite the Manage User Knob interface :P
# Adrian Pueyo 2019-09-21 14:09
Hey Robin, thanks for your kind words :-) Glad you're finding it useful. I will check your code, there's some nice suggestions. I believe some of your notes have been addressed already in the latest updates, but I'll look into the rest!

· Ctrl+S save shortcut not working: works for me in some machines and doesn't in others, will check what can be causing that...
· Add "Remove Custom" option to clean up the Script pulldown: you mean delete .py files from the dropdown?
· Alt+Backspace in Script Edit pane to clear output: nice one :) For now it also works it you simply click the output window and press backspace.
# Robin Dutta 2019-09-23 19:21
Quoting Adrian Pueyo:

· Add "Remove Custom" option to clean up the Script pulldown: you mean delete .py files from the dropdown?

Sort of. I keep adding more and more custom script directories, that the first list is getting really long. You already have a delete feature in the .py file menu, but no way to remove the directories.
# Ed Englander 2019-10-01 18:48
A great tool for sure!

Unfortunately I received this error when trying to add a custom path to open existing sripts:, line 1075, in folderDropdownChanged
os.symlink(folder_path, os.path.join(self.scripts_dir,aliasName))
OSError: [Errno 5] Input/output error

I tried this in a windows and linux env and got this each time. This was the linux output however in Windows it said that the os.symlink module did not exist.

Any help is appreciated!
# Max Steven 2019-10-20 10:59
Thank you for the great tool but I bumped into this error.

Traceback (most recent call last):
File "C:/Program Files/Nuke12.0v 2/plugins\nukes cripts\panels.p y", line 153, in makeUI
self.widget = self.widgetClas s()
File "C:/Users/aaaaa aaa/.nuke\KnobS cripter\knob_sc", line 1649, in __init__
super(KnobScrip terPane, self).__init__( )
File "C:/Users/aaaaa aaa/.nuke\KnobS cripter\knob_sc", line 123, in __init__
File "C:/Users/aaaaa aaa/.nuke\KnobS cripter\knob_sc", line 357, in initUI
self.script_edi tor = KnobScripterTex tEditMain(self, self.script_out put)
File "C:/Users/aaaaa aaa/.nuke\KnobS cripter\knob_sc", line 2756, in __init__
AttributeError: 'module' object has no attribute 'QStringListMod el'
# Kaloyan Ganev 2019-10-27 23:10
Yeah, something seems to have changed in Nuke 12, if that's what you're using? I'm getting the same traceback in 12 over here, but not in 11.
# Marco Meyer 2019-11-24 16:53
They changed the PySide2 version in nuke 12 and i guess the previous one wasn't finished just yet so they've still been moving some things around.
Just replace QtGui.QStringLi stModel() with QtCore.QStringL istModel() in the knob_scripter.p y
# Xavier Bourque 2019-11-13 00:38
LOVE THIS! Thanks Adrian. Makes creating recursive gizmos using the knobChanged knob SO MUCH EASIER! Weird glitch however, on Nuke 10.5 on Win10 when I import knob_scripter 2.2 in my, the File and Edit menu in my main Nuke menu bar gets swapped!? Edit becomes the first menu from the left and File becomes the second.
# bin zhuang 2019-11-29 04:11
Goodjob .
But there is a problem that when you ever install pw_MultiScriptE ditor,the knobscripter doesn work.

it seems this two plugin doesn work together

You have no rights to post comments

We have 2585 guests and 97 members online