KnobScripter v3.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Adrian Pueyo
Complete python and blink script editor for Nuke.
Requirements:
14.0, 13.2, 13.1, 13.0, 12.2, 12.1, 12.0, 11.3, 11 or later
Linux, Mac, Windows
15 Jan 2024
3470

top logo

KnobScripter v3.1 (or KS3) is a full script editor for Nuke that can script python on .py files and knobs as well as BlinkScript, with all the functionality from the default script editor in Nuke plus syntax helpers, predictions, snippets and other handy features.

KS3 is the next major step for this tool, and it features a greatly optimized code, Python 3 compatibility, BlinkScript mode, a Code Gallery and many other features and fixes.

 

ks overview

GitHub logo

GitHub download

 

userguide title

userguide image

 

video title

video image

 

KnobScripter was designed as a simple python script editor for Nuke, and its main goal is to let you interact with Nuke’s python API in a more pleasant way than Nuke’s default methods. It doesn’t intend to replace a fully featured IDE, but it proves enough for most common python tasks and quick work with snippets, basically anything that needs quick interaction with Nuke’s python console.

With this in mind, I focused its development in the aspects that I love about IDEs regarding efficiency (such as syntax helpers), in covering everything the default Script Editor in Nuke currently offers, and last but not least, in covering the python aspects of Nuke that are generally tedious, such as adding python or blink code to nodes/knobs.

 

userguide title

Full scripting mode for .py files.
You can create, browse, modify or toggle between python files and folders.

Node editing mode.
In node mode, you can script directly on python buttons or callback knobs, as well as BlinkScript.

Snippets.
Snippets are short codes you can assign to longer pieces of code, so that by writing the short code and pressing tab you’ll get the long code.
You can also choose where you’ll want your cursor to appear with the convenient $$.

Code Gallery.
The Code Gallery is a new way to store and browse through codes that you might want to revisit many times as reference.
It includes a basic system of archiving. Then you can quickly browse and sort through the different codes you saved, while folding categories and reading descriptions.

Python output console.
Same as the one from Nuke’s default script editor, where you can execute any code and read the python output log.

Find-Replace.
A proper find-replace widget as you’d expect in a python editor.

Syntax highlighting, line numbers, auto-intending, auto-completer...
You can choose between two code highlighting styles (including one inspired by sublime’s popular Monokai theme).
Auto-completions on tab read from the available modules and the actual functions and variables in your script.

 


Installation:

A. Fresh install

  1. Copy the KnobScripter folder and paste it somewhere in your Nuke plugin path. For example, inside Users/YourUser/.nuke directory.
  2. Open with a text editor the file menu.py that lives next to your KnobScripter folder, or create one if it doesn’t exist.
  3. Add the following line:
    import KnobScripter
  4. Restart Nuke.

B. Updating KnobScripter

  1. Replace the KnobScripter folder with the updated one.
  2. Restart Nuke.

 


Update Log:

KnobScripter v3.1 - 15 Jan 2024

New features:

  1. Nuke 14 & 15 compatible.
  2. Ctrl + +/- to change font size on both editor and output console.
  3. Multi-line codes can be run on knobs as well (thanks pancho!)

Bug fixes and enhancements:

  1. Fixed character movement error (thanks itaki!)
  2. Removed python package ‘six’ (thanks itaki!)
  3. Esc behaviour limited to floating panels only (thanks pancho!)
  4. Other little bug fixes.

 

KnobScripter v3.0 - 25 April 2022

New features:

  1. Blinkscript mode.
  2. Compatible with python 2 and 3 (Nuke 13+) and Win/Mac/Lin.
  3. Code Gallery.
  4. Fully redesigned Snippets, with a new Snippet Editor, default snippets and a simplified workflow.
  5. Preferences Panel redone, and new settings added.
  6. Keyword Hotbox for double clicking on keywords and showing alternatives.
  7. Storing the knob and .py editor state, for quickly jumping back to your edit point on new KnobScripters.
  8. New code helpers such as Ctrl/Cmd + and Ctrl/Cmd - for changing font size.
  9. Method placeholders.
  10. Parentheses wrappers.

Bug fixes and enhancements:

  1. Whole code refactored, and improved py import scheme.
  2. Fixed predictor tab with custom words in Nuke 13.
  3. Fixed backspace crash on indented lines.
  4. Snippet behaviour improvements.
  5. Fixed syntax highlighting errors.

 

KnobScripter v2.4 - 7 December 2020

New features:

  1. Run in Context mode.
  2. “Grab current dimensions” button.

Bug fixes and enhancements:

  1. Improved modal window behavior (thanks Jed Smith!).
  2. Ctrl+Backspace now clears output log.
  3. Improved how Nuke’s Script Editor widgets are found (thanks Jed Smith!)
  4. Modified (*) property now shows properly on the knob dropdown.
  5. Picker (“change to Node”) crashing fixed.
  6. Unicode encoding works with both .py scripts and nodes now.
  7. Compatible with Nuke 12.2
  8. Add snippet button scrolls to top.

 

KnobScripter v2.3 - 12 December 2019

Bug fixes and enhancements:

  1. Fixed bracket and brace closing behaviour.
  2. Added QStringListModel compatibility on Nuke 12.
  3. Symlink error hidden on Windows.

KnobScripter v2.2 - 24 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.

 

I hope KS3 will help improve your scripting experience! Bugs and suggestions always appreciated :)

Copyright (c) 2016-2023, 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: http://www.nukepedia.com/python/ui/w_hotbox
Please login in order to download these files.

Comments   

 
+4 # 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!
 
 
0 # Adrian Pueyo 2017-02-01 17:31
You're welcome! :-)
 
 
0 # Gaetan Baldy 2017-02-03 10:27
Very good work ! this is awesome !
 
 
0 # Adrian Pueyo 2017-03-05 20:19
Thank you!
 
 
0 # Vitaly Musatov 2017-02-10 10:10
Thank you Adrian for sharing! Awesome tool!
 
 
0 # Adrian Pueyo 2017-03-05 20:20
You're welcome! :)
 
 
0 # Alexey Kuchinski 2017-05-26 12:58
Thank you Adrian, very useful!
 
 
0 # Javier Saura Saura 2018-02-05 09:44
Hi! It is not working in to Nuke 11 =/

Does anyone know something?

Many thanks!
 
 
0 # 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!

Adrian
 
 
0 # 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!
 
 
+1 # Matthias Eckhardt 2018-03-10 13:56
i love this tool!! thx
 
 
0 # Jeang Jenq Loh 2018-04-10 16:29
I just found this and this is awesome!!! Thanks Adrian!
 
 
0 # 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?
 
 
0 # 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
Awesome!!!
Best Nuke 11 feature by far.
Foundry should pay maintenance fee to you Adrian!!!
 
 
0 # 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)

Quote:
Traceback (most recent call last):
File "/usr/people/prasannab/.nuke/KnobScripter/knob_scripter.py", line 1561, in saveClicked
self.saveScriptContents(temp = False)
File "/usr/people/prasannab/.nuke/KnobScripter/knob_scripter.py", line 953, in saveScriptContents
script.write(self.script_editor.toPlainText())
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.
 
 
0 # Adrian Pueyo 2019-08-12 07:07
Hey, the new update (v2.1) should fix the issues :-)
 
 
0 # 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:

Quote:
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.

Salud!

./charlie

P.S: As you already know we are a Windows shop.
 
 
+1 # 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 :-)

Gracias!!
 
 
0 # 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:

try:
if nuke.NUKE_VERSI ON_MAJOR < 11:
from PySide import QtCore, QtGui, QtGui as QtWidgets
from PySide.QtCore import Qt
else:
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.
 
 
0 # 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!
 
 
0 # 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!!
 
 
0 # 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
tn.addKnob(nuke.XY_Knob('name')
https://gyazo.com/d7b8953d54eb9bf103c82e57c0878d23

3. Kind of cheeky wish ))
I realy need autocomplete.
https://gyazo.com/aae2bd73ccfc1ecaef47d0de04afb5fd
When KnobScripter learn it I'll replace Atom immediately.


Once again - thank you for this awesome tool

#1 for writing local knobChanged and onCreate!
 
 
0 # 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! :-)
 
 
0 # 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!
 
 
0 # Adrian Pueyo 2019-08-12 07:05
Hey, the new update (v2.1) should fix the issues and wishes :-)
 
 
+1 # 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 )
 
 
0 # Marco Masotti 2019-10-08 16:33
Hey Den!
Can you show how to install the autocomplete in Atom?
Thanks!
 
 
0 # Den Gheiko 2019-10-10 07:36
Quoting Marco Masotti:
Hey Den!
Can you show how to install the autocomplete in Atom?
Thanks!


Hello, Marco.

1. Install autocoplete package
https://atom.io/packages/atom-autocomplete-python

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
https://community.foundry.com/discuss/post/1107065
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.
 
 
0 # Marco Masotti 2020-02-16 23:11
Quoting Den Gheiko:
Quoting Marco Masotti:
Hey Den!
Can you show how to install the autocomplete in Atom?
Thanks!


Hello, Marco.

1. Install autocoplete package
https://atom.io/packages/atom-autocomplete-python

2. Go into settings of that package and change Python Executable Path to the python installed with Nuke.
For example C:\Program Files\Nuke11.2v4\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
https://community.foundry.com/discuss/post/1107065
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.


Hey Den! Sorry for the (super) late response! I've managed to install Python on my mac and download the dummy nuke and nukescript packages. I've set the Extra Paths for Packages to point that folder but Atom is autocompleting only regular python definitions and not nuke ones. Any idea? Thanks a lot!
Marco
 
 
0 # 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
 
 
+1 # 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 menu.py 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.
(https://www.surveymonkey.co.uk/r/Nuke2019)

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:
http://bit.ly/2V3JGAw

Added:
  • 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


Bugs/Wishlist:
  • 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
 
 
0 # 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.
 
 
0 # 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.
 
 
0 # 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:

knob_scripter.py, 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!
Thanks.
 
 
0 # 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 ripter.py", line 1649, in __init__
super(KnobScrip terPane, self).__init__( )
File "C:/Users/aaaaa aaa/.nuke\KnobS cripter\knob_sc ripter.py", line 123, in __init__
self.initUI()
File "C:/Users/aaaaa aaa/.nuke\KnobS cripter\knob_sc ripter.py", 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 ripter.py", line 2756, in __init__
self.nukeCompleter.setModel(QtGui.QStringListModel())
AttributeError: 'module' object has no attribute 'QStringListMod el'
 
 
0 # 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.
 
 
0 # 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
 
 
0 # Osvaldo Andreaus 2019-12-22 00:41
I replaced line 2756 from:
Quote:
self.nukeCompleter.setModel(QtGui.QStringListModel())
to

Quote:
if nuke.NUKE_VERSION_MAJOR < 12:
self.nukeCompleter.setModel(QtGui.QStringListModel())
else:
self.nukeCompleter.setModel(QtCore.QStringListModel())
This way it should work on both 11 and 12.
(Just posting it here for newbies)
 
 
0 # Osvaldo Andreaus 2019-12-22 00:41
I replaced line 2756 from:
Quote:
self.nukeCompleter.setModel(QtGui.QStringListModel())
to

Quote:
if nuke.NUKE_VERSION_MAJOR < 12:
self.nukeCompleter.setModel(QtGui.QStringListModel())
else:
self.nukeCompleter.setModel(QtCore.QStringListModel())
This way it should work on both 11 and 12.
(Just posting it here for newbies)
 
 
+1 # Adrian Pueyo 2019-12-24 17:20
Hey, this should be fixed on the latest update.
 
 
0 # 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 init.py, 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.
 
 
+1 # Adrian Pueyo 2019-12-24 16:12
Hi Xavier! Thanks, glad you're enjoying it :-)

Could you try importing it in your menu.py instead? That way it will happen after Nuke's UI has been set up. Hope that works.
 
 
0 # 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
 
 
+2 # kire timov 2019-12-25 22:23
Hey i love this!

But i am getting type error when i try to get into node mode.
When i click the button i get this:

.nuke\KnobScripter\knob_scripter.py", line 1375, in changeClicked
if newNode != "" and nuke.exists(newNode):
TypeError: exists() argument 1 must be string, not bool

I am on Nuke 12.0v3
 
 
+1 # Fidel Moreno 2020-05-18 04:10
Hi kire
If you open the file and go to the line 1375
yo can add the folowwing lines

if not newNode:
newNode = ""
if newNode != "" and nuke.exists(new Node):
selection = [newNode]

I just add two lines before the line with the error, it works
I hop ethis helps you
Cheers
 
 
0 # Nikolai Wüstemann 2020-11-21 10:36
Thanks, this worked for me on Nuke12.2v3 :)
 
 
0 # Adrian Pueyo 2020-12-08 10:31
Better late than never :D this is now fixed. Thanks for the feedback!
 
 
0 # jakub Jezek 2020-01-04 20:52
hello Adrian Pueyo,

thank you very much for sharing this tool of yours. It is really helpful and so we had included it into our workflow in https://pype.club. I had fork the github and presume we could start contribute. If you are having any milestones for next features you wish to share let me know.

Regarding to `kire timov` comment I agree that the TypeError is starting already on 12.0v1.
 
 
+1 # Miles Lauridsen 2020-04-07 05:25
Getting an error in Nuke 12.1v1 on MacOSX:

Traceback (most recent call last):
File "/Users/user/.n uke/python/Knob Scripter/knob_s cripter.py", line 3917, in showKnobScripte r
pan = KnobScripter()
File "/Users/user/.n uke/python/Knob Scripter/knob_s cripter.py", line 99, in __init__
self.nukeSEOutp ut = self.findSEOutp ut(self.nukeSE)
File "/Users/user/.n uke/python/Knob Scripter/knob_s cripter.py", line 1643, in findSEOutput
return se.children()[-1].children()[1]
IndexError: list index out of range
 
 
0 # Miles Lauridsen 2020-04-07 05:34
Same error in Nuke 12.0v3 on MacOSX:

Traceback (most recent call last):
File "/Applications/ Nuke12.0v3/Nuke 12.0v3.app/Cont ents/MacOS/plug ins/nukescripts /panels.py", line 153, in makeUI
self.widget = self.widgetClas s()
File "/Users/user/.n uke/python/Knob Scripter/knob_s cripter.py", line 1664, in __init__
super(KnobScrip terPane, self).__init__( )
File "/Users/user/.n uke/python/Knob Scripter/knob_s cripter.py", line 99, in __init__
self.nukeSEOutp ut = self.findSEOutp ut(self.nukeSE)
File "/Users/user/.n uke/python/Knob Scripter/knob_s cripter.py", line 1643, in findSEOutput
return se.children()[-1].children()[1]
IndexError: list index out of range
 
 
-1 # Jed Smith 2020-04-18 16:44
Quoting Miles Lauridsen:
Getting an error in Nuke 12.1v1 on MacOSX:
line 1643, in findSEOutput
return se.children()[-1].children()[1]
IndexError: list index out of range


I made an issue on the github page: https://github.com/adrianpueyo/KnobScripter/issues/6

It looks like it's related to the `ScriptEditorHi story.xml` existing in the user's home directory. I have successfully worked around this issue by removing that file and disabling 'save and restore script editor history' in my nuke preferences. Not ideal but it works.
 
 
0 # Jed Smith 2020-04-26 18:42
Aaaaand I made a pull request to (hopefully) add Nuke 12 support and resolve the issue. Available here if it helps anyone:
https://github.com/adrianpueyo/KnobScripter/pull/7
 
 
0 # Adrian Pueyo 2020-12-08 10:29
Thanks for the feedback!! And thanks for the great code, Jed. This is now included in v2.4.
 
 
0 # Nikolai Wüstemann 2020-11-21 10:31
Great tool as always, no question! ;)
It works well for my Nuke11.3v6, but Nuke12.2v3 throws an error, when selecting a node:

"knob_scripter.py", line 1375, in changeClicked
if newNode != "" and nuke.exists(newNode):
TypeError: exists() argument 1 must be string, not bool
 
 
0 # Adrian Pueyo 2020-12-08 10:29
Hey Nikolai, Thanks for the feedback! This should be now fixed in v2.4.
 
 
0 # Paul Laverack 2020-12-09 02:33
Gosh, what an incredibly powerful piece of kit.
 
 
0 # Carlos Trijueque 2020-12-17 14:02
Hola Adrian,

Happy to report that this issue is now resolved when you switched to Qt.

Salud!

./charlie

Quoting Carlos Trijueque:
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:

Quote:
QWidget: Must construct a QApplication before a QPaintDevice

.
 
 
0 # Adrian Pueyo 2022-04-26 15:51
Hey Charlie, Awesome to hear :) This was kept in v3.0 which is also published now, and quite a big update. Cheers!
 
 
+1 # Tim Klink 2021-02-05 08:15
after updating from 1.2 to 2.4 I can"t run the tool anymore. Doesn"t crash or anything, just never starts up.

This is the error I encounter:

TypeError: cannot concatenate 'str' and 'QVariant' objects


This is cause by our studio pipeline for sure, but as none of the pipeline guys have any time available for a non-needed tool I was hoping maybe someone already knows a quick fix around this issue?
 
 
0 # Adrian Pueyo 2022-04-26 15:50
Hey Tim, v3.0 is fully refactored. I'd recommend installing it from scratch. Cheers!
 
 
0 # Dann Tarmy 2022-09-12 20:09
Quoting Adrian Pueyo:
Hey Tim, v3.0 is fully refactored. I'd recommend installing it from scratch. Cheers!

Hi Adrian,

I've installed v3.0 from scratch and I'm getting the same Error Tim was reporting.

File "C:/Users/dann. tarmy/.nuke\Kno bScripter\knob_ scripter.py", line 1215, in updateScriptsDr opdown
logging.debug(" current folder:" + self.current_folder)
TypeError: cannot concatenate 'str' and 'QVariant' objects

This is using Nuke 12.2v8 with python 2.7.16 on Windows10.

Any thoughts on a fix, a workaround, or maybe something it might be in conflict with?
 
 
+2 # li zhaohui 2021-03-29 15:53
Please update nuke13
 
 
0 # Adrian Pueyo 2022-04-26 15:49
Done! :)
 
 
0 # Adrian Pueyo 2022-04-26 15:49
Done! :)
 
 
-1 # Norman Cates 2021-06-15 04:26
Awesome and badly needed extention to NUke.

A couple of things:
In the readme.md file it describes how to add the needed line(s) into our menu.py file.

But the instruction includes "python" as the first line. This causes an error on start up. It should just be the import knobscripter line.


---------------------
Is knobscripter expected to work inside groups?

I have a group, and when I'm trying to view a node inside the group, knobscripter only shows me the scripts for the group node. Even if I've deselected it in the main node view, and only have the node I want selected.
 
 
0 # mahmoud farouk 2021-07-24 01:59
this is awesome ....thank u
 
 
+1 # Tanguy Bodivit 2021-07-26 04:23
Hello !
Thanks for this amazing script ! love it all the way, until... Nuke 13 !
It does not run on 13 :(
 
 
0 # Adrian Pueyo 2022-04-26 15:49
Hey,Tanguy, the new release v3.0 is now public and python3 compatible :-)
 
 
0 # Nico Holodovsky 2021-07-27 20:20
Hi ! Awesome tool. I think of two features to be added that could improve the tool:
#1 I solved a Bug in the tool:

In knob_scripter.p y -> line 3464 to 3470. Line 3468 should be = 'return 4' instead of 'return 2'

def tabSpaceValue(s elf):
if self.tabSpace2. isChecked():
return 2
elif self.tabSpace4. isChecked():
return 2
else:
return 0

#2 Foldable functions and comments, so to be able to fold large
blocks of code lines for a better readability of the code

#3 Easy customization of highlight colors for code readability. Set color of variables, python inbuilts, nuke functions, created functions, modules, comments, etc
 
 
0 # Adrian Pueyo 2022-04-26 15:48
Hey, thanks Nico! I just published v3.0 which hopefully fixes that.
 
 
0 # Norman Cates 2021-08-03 23:47
This is a very needed tool.

But I'm getting an error in the shell when I create a Knobscripter panel as a docked tab.

See below the line of ========

At one point it was working, even thought it was displaying the error. But now the panel is blank... Its very odd.

Thanks,
Norman

=============================================

Traceback (most recent call last):
File "/soft/app/foun dry/Nuke12.2v3/ plugins/nukescr ipts/panels.py" , line 153, in makeUI
self.widget = self.widgetClas s()
File "/net_home/norm an.cates/.nuke/ KnobScripter/kn ob_scripter.py" , line 1661, in __init__
super(KnobScrip terPane, self).__init__( isPane=True, _parent=QtWidge ts.QApplication .activeWindow() )
File "/net_home/norm an.cates/.nuke/ KnobScripter/kn ob_scripter.py" , line 144, in __init__
self.initUI()
File "/net_home/norm an.cates/.nuke/ KnobScripter/kn ob_scripter.py" , line 430, in initUI
self.exitNodeMo de()
File "/net_home/norm an.cates/.nuke/ KnobScripter/kn ob_scripter.py" , line 1436, in exitNodeMode
self.loadScript State()
File "/net_home/norm an.cates/.nuke/ KnobScripter/kn ob_scripter.py" , line 1248, in loadScriptState
self.state_dict = json.load(f)
File "/soft/app/foun dry/Nuke12.2v3/ lib/python2.7/j son/__init__.py ", line 291, in load
**kw)
File "/soft/app/foun dry/Nuke12.2v3/ lib/python2.7/j son/__init__.py ", line 339, in loads
return _default_decode r.decode(s)
File "/soft/app/foun dry/Nuke12.2v3/ lib/python2.7/j son/decoder.py" , line 364, in decode
obj, end = self.raw_decode (s, idx=_w(s, 0).end())
File "/soft/app/foun dry/Nuke12.2v3/ lib/python2.7/j son/decoder.py" , line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
 
 
0 # Adrian Pueyo 2022-04-26 15:47
Hey Norman, I just published v3.0 which hopefully fixes that.
 
 
+3 # Xavier Bourque 2022-02-01 17:14
Is there a Nuke 13 compatible version somewhere?
 
 
+1 # Adrian Pueyo 2022-04-26 15:47
Hey Xavier, I finally published the v3.0 update which is also Nuke 13 compatible! Took like a year more than expected but I hope it's worth it :)
 
 
0 # romain biermann 2022-04-27 16:58
Fantastic! thank you very much for this update.
 
 
0 # Justin Johnson 2022-06-22 22:46
It's worth it.. I would be lost without Knobscripter :)
 
 
0 # Colin Rhodes 2022-05-09 00:40
Hi Adrian,
Excellent that it is now directly working with the BlinkScript node. Will you also add direct access to the particle BlinkScipt node?
 
 
0 # Austin Brown 2022-07-22 22:28
Adrien thank you for the wonderful tool!

It works fine in 13.0 and 13.1, but it's an insta nuke crash for me in 13.2. Nothing even in the terminal!
 
 
0 # Austin Brown 2022-09-09 19:31
Still insta crash in 13.2v4
 
 
0 # Michael McReynolds 2023-01-31 22:08
Thanks for this tool! It's suddenly opened up the deeper underbelly of Nuke and I'm loving it.

I am seeing an warning thought that I thought I would notify you about.

/nuke/KnobScripter/ksscripteditor.py:73: DeprecationWarn ing: QFontMetrics.wi dth(const QString & arg__1, int len) const is deprecated
space = 7 + self.fontMetric s().width('9') * digits
 
 
0 # Michael McReynolds 2023-02-21 20:14
This message seems to only be spamming Nuke 14.

However, if you change line 73 in ksscripteditor. py from
space = 7 + self.fontMetric s().horizontal( '9') * digits
to
space = 7 + self.fontMetric s().horizontalA dvance('9') * digits

It stops spamming the output.
 
 
0 # Michael McReynolds 2023-02-21 20:22
I think this fix also fixes 13.2 crashes and errors
 
 
0 # Michael McReynolds 2023-02-25 03:46
sorry, that's actually
space = 7 + self.fontMetric s().width('9') * digits
to
space = 7 + self.fontMetric s().horizontalA dvance('9') * digits
 
 
0 # Michael McReynolds 2023-02-25 03:57
Turns out there is one other place the code needs to be updated.
line 393 in knob_scripter.p y from
config.prefs["se_tab_spaces"] * QtGui.QFontMetr ics(config.scri pt_editor_font) .width(' '))
to
config.prefs["se_tab_spaces"] * QtGui.QFontMetr ics(config.scri pt_editor_font) .horizontalAdva nce(' '))
 
 
0 # Michael McReynolds 2023-04-01 18:21
For those of you who don't want to mess around with the code. I created a pull request on the github. But you can also grab the updated code from my github as well. https://github.com/itaki/KnobScripter
 
 
0 # Adrian Pueyo 2023-04-17 07:22
Thanks for this, Michael! Merging it!
 
 
0 # Vladislav Parfentev 2023-04-14 21:19
Thanks Adrian!

Autocompleter. For example when I write "nuke." I would like to see after pressing TAB all the method of nuke module It would really speed up code. And it should work for anything. Maybe it might be done by using "dir" wrapper. For example "dir(nuke)" gives list of all of it methods
 
 
0 # Vladislav Parfentev 2023-04-16 11:14
Bug. When click duplicate and widget whereI need to write name of copy appears I can't click cancel button. Also It will be great to have a function to rename files

Also really need to have a function to delete code from code gallery
 
 
+1 # Justin Johnson 2023-04-18 18:15
I've been recently getting this error when opening Nuke. (13.2v7)

AttributeError: 'KnobScripterPa ne' object has no attribute 'updateValue'

Any ideas on how to fix this?
 
 
+1 # Michael McReynolds 2023-10-23 20:33
It looks like the python package 'six' is no longer included with Nuke starting from 14.1 and 15. While it would be pretty easy to install six, it seemed the more pythonic way of handling this would be to remove six and the references to it.

It looks as though the only thing affected was the 'string' function, so I removed the function and tidied up all the places that uses it.

There was also an used function called 'string_chk' that I assume was used at one time for troubleshooting the string issues but I don't think it is still needed so I removed that on as well.

I created a pull request on github but in the mean time you can also download it from my repository at https://github.com/itaki/KnobScripter

Thanks again @Adrian for this amazing tool.
 
 
0 # Martin Rombos 2023-11-18 10:50
Thanks a lot for sharing this.

I've downloaded this folder: https://github.com/itaki/KnobScripter/tree/master/KnobScripter

But I still have the same problems as with the original version. Should I be downloading something else from your repository?

Thanks again
 
 
+2 # Michael McReynolds 2023-11-20 21:37
Looks like since the pull request hasn't been merged, you still have to download from the branch. Until @adrianpueyo merges it, please download from the branch here. : https://github.com/itaki/KnobScripter/tree/Remove-six-for-Nuke-14.1-and-15
 
 
+2 # Adrian Pueyo 2024-01-15 12:54
Thank you Michael!!! Finally got the time to merge this and create a proper release. This (as well as your previous improvements) is now part of KnobScripter v3.1 :)
 
 
0 # bin zhuang 2024-01-17 01:14
The auto-complete doesn't seem to work on nuke13 14 when you press the tab key.
 
 
0 # Jacob Slutsky 2024-02-02 15:59
Hi Adrian.
Thanks so much for continuing to share this with the community. It's an incredibly useful tool.
Testing in Nuke14.0v5...se ems to work without issue, but I did see this warning in the script editor when first loading:
AttributeError: 'KnobScripterPa ne' object has no attribute 'updateValue'
 

You have no rights to post comments

We have 3403 guests and 132 members online