GithubHelp home page GithubHelp logo

adrianpueyo / knobscripter Goto Github PK

View Code? Open in Web Editor NEW
76.0 8.0 15.0 3.76 MB

Python script editor for Nuke that can script on .py files and python knobs, with all the functionality from Nuke's default script editor plus syntax helpers.

License: GNU General Public License v3.0

Python 100.00%
nuke compositing python scripting

knobscripter's People

Contributors

adrianpueyo avatar itaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

knobscripter's Issues

output/console window font size

Hello,
This knob scripter is awesome!
Just one thing I noticed:
I can change font and font size through the settings for the coding area, but it will not change the font size of output area.
Is it possible to change the font size in the output area?

autocomplete

Is it possible adding the autocomplete feature? That could be a killer! LOL

Nuke 13 Compatibility and more

Hey! First of all thank you for the time you put into this tool! Recently I've been using it more and more and as a token of appreciation I would like to lend a hand if needed.

For starters, I have a working branch that adds compatibility to Python3/Nuke 13. The branch is made out of master because the develop branch seems to be very much still working in progress.

The update mostly fixed some Python2/3 compatibility and some unrelated random issues including #1. Some of the issues as far as I can tell (just skimming through the code because the develop build doesn't work) are still present in the develop branch, so it might give you an idea at what to look into. When the develop branch will be merged into master will override anything anyway so there are not going to be any conflicts, but at least for now there will be working version for Nuke 11, 12 and 13.

Would you want me to make a PR? or you don't want to change anything before the new update as it might be imminent?

I also have some updates proposal that I would gladly assist or implement myself but we can discuss this later if appropriate.

Besides all this I teach privately Python to some Nuke artist so if I can help by doing code reviews or something else, let me know!

Cheers and thanks again for this tool.

Doesn't Load in Nuke 12.1v2

It looks like there's an issue loading knob scripter in Nuke12.1v2. Traceback below:

Traceback (most recent call last):
  File "~/.nuke/Knob_Scripter/knob_scripter.py", line 3920, in showKnobScripter
    pan = KnobScripter(selection[0], knob)
  File "~/.nuke/Knob_Scripter/knob_scripter.py", line 99, in __init__
    self.nukeSEOutput = self.findSEOutput(self.nukeSE)
  File "~/.nuke/Knob_Scripter/knob_scripter.py", line 1644, in findSEOutput
    return se.children()[-1].children()[1]
IndexError: list index out of range

The behavior seems to be related to if there is a ScriptEditorHistory.xml file in the user's home directory.

Some cursory testing indicates that the issues doesn't recur if you disable save and restore script editor history in the Nuke preferences, and delete the ScriptEditorHistory.xml file.

I have no idea why this would affect KnobScripter's ability to find the script editor window among the qgwidgets... maybe you have an idea.

Hope this helps in tracking down the issue!

[bug] Fails to use QtGui.QStringListModel in Nuke12

On Linux in Nuke12.0v3 the panel fails to load because of a PySide2 error:

log only shows partical paths because company privacy and stuff

Traceback (most recent call last):
  File "(...)/Nuke12.0v3/plugins/nukescripts/panels.py", line 153, in makeUI
    self.widget = self.widgetClass()
  File "~/.nuke/Scripts/KnobScripter/knob_scripter.py", line 1649, in __init__
    super(KnobScripterPane, self).__init__()
  File "~/.nuke/Scripts/KnobScripter/knob_scripter.py", line 123, in __init__
    self.initUI()
  File "~/.nuke/Scripts/KnobScripter/knob_scripter.py", line 357, in initUI
    self.script_editor = KnobScripterTextEditMain(self, self.script_output)
  File "~/.nuke/Scripts/KnobScripter/knob_scripter.py", line 2756, in __init__
    self.nukeCompleter.setModel(QtGui.QStringListModel())
AttributeError: 'module' object has no attribute 'QStringListModel'

My workaround so far is just to extend the PySide2 import part at the top like this:

try:
    if nuke.NUKE_VERSION_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
        if nuke.NUKE_VERSION_MAJOR > 11:
            from PySide2.QtCore import QStringListModel
        else:
            from PySide2.QtGui import QStringListModel
except ImportError:
    from Qt import QtCore, QtGui, QtWidgets

[feature] Custom shortcut to clear output window

I absolutely love the panel and am currently starting to use it to replace the script editor!

I do miss the Ctrl+Backspace shortcut for clearing the output window a lot. It would be great to implement that or an option to set a custom shortcut. That way You wouldn't have to click the output window first every time.

Please tag a release

Hello Adrian,

First of all, fantastic tool - thanks for providing it!
If you don't mind, can you tag a release here on github, please? It would make versioning releases a tad easier in our system.

Cheers,

Mitja

KnobScripter bugs

- can't open preferences

Z:\RECURSOS\NUKE\NUKE_PATH/KnobScripter\KnobScripter\code_gallery_dict.json
C:\Users\operator.nuke\KS3\code_gallery_dict.json
{}
Traceback (most recent call last):
File "Z:\RECURSOS\NUKE\NUKE_PATH/KnobScripter\KnobScripter\knob_scripter.py", line 457, in
triggered=lambda:self.open_multipanel(tab="ks_prefs"))
File "Z:\RECURSOS\NUKE\NUKE_PATH/KnobScripter\KnobScripter\knob_scripter.py", line 1778, in open_multipanel
nuke.ks_multipanel = MultiPanel(self, multipanel_parent, initial_tab = tab, lang = lang or self.script_editor.code_language)
File "Z:\RECURSOS\NUKE\NUKE_PATH/KnobScripter\KnobScripter\knob_scripter.py", line 1957, in init
self.initUI()
File "Z:\RECURSOS\NUKE\NUKE_PATH/KnobScripter\KnobScripter\knob_scripter.py", line 1967, in initUI
self.code_gallery = codegallery.CodeGalleryWidget(self.knob_scripter, None)
File "Z:\RECURSOS\NUKE\NUKE_PATH/KnobScripter\KnobScripter\codegallery.py", line 253, in init
self.initUI()
File "Z:\RECURSOS\NUKE\NUKE_PATH/KnobScripter\KnobScripter\codegallery.py", line 287, in initUI
self.change_lang(self.code_language, force_reload=True)
File "Z:\RECURSOS\NUKE\NUKE_PATH/KnobScripter\KnobScripter\codegallery.py", line 363, in change_lang
self.build_gallery_group(code_gallery_dict[lang], self.scroll_layout, lang=lang)
KeyError: 'python'

- While it's open in the nuke console....

DEBUG:root:Initializing KnobScripter
DEBUG:root:KS LOADED
DEBUG:Hiero:nukestudio.startServerIfEnabled
DEBUG:Hiero:nukestudio.startServer
...
...

-When press te shortKey the window is always cut down (before appeared in the center of the screen)

- Sometimes is closed when I read CSV files

Crashes Nuke when adding to a panel 13.1, 13.2

I'm on macOS Monterey, 12.5.1, running Nuke 13.2v4. I can use opt+z to open up the floating palette just fine, but when I try to go to Custom Window > KnobScripter it (sometimes) instantly crashes nuke. If I open the floating palette first, I can usually go the Custom Window route without a crash happening.

When it crashes, nothing appears in the terminal, it's just gone. Nuke itself has issues in the terminal relating to QNSWindow and QWidgetClass, maybe some Nuke bugs are cropping up related to those and interfering with your window creation.

Tested on: Nuke 13.1v5, 13.2v2, 13.2v3, 13.2v4. Running macOS Monterey 12.5.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.