adrianpueyo / KnobScripter

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.
GNU General Public License v3.0
81 stars 16 forks source link

Fix a bug which swapped 'File' and 'Edit' menus #5

Closed imagesurgery closed 4 years ago

imagesurgery commented 4 years ago

Screenshot On nuke 11.3v4 the File and Edit menus were being drawn in reverse order. This commit adds the same commands but retains the correct menu order.

I presume it is because this command is finding the menu, whereas the original code was declaring it directly.

imagesurgery commented 4 years ago

Aaand... I'm closing this because I noticed what I did wrong. I source a lot of my code in init.py, but this explicitly needs to be sourced after the UI begins to be processed in menu.py. Because of this, your code was creating a menu called edit before file existed, and adding the commands in. When I 'fixed' it, I actually didn't, but my module loader bypassed it because it was throwing an error, which being in a try block, didn't stop nuke or other tools from loading.

So.

In short, it's all my fault, and I have a solution. I also shall now check my terminal for errors after changes to ensure they're not actually errors.