Shortcut Editor v1.3
This location is for Registered Users Only.
Perhaps you need to login or register.
13.1, 12.2, 12.1, 12.0, 11.3, 11.2, 11.1, 11.0, 10 or later
Linux, Mac, Windows
Nuke shortcut editor
shortcuteditor
is a keyboard shortcut editor for Foundry's Nuke
It allows you to quickly bind keyboard shortcuts to existing menu items without writing Python code
Watch the first episode of Lars Wemmje's 'Useful Nuke Tools' for more details!
Installation
Put shortcuteditor.py
on PYTHONPATH or NUKE_PATH somewhere (probably in ~/.nuke/
)
mkdir -p ~/.nuke
cd ~/.nuke
curl -O https://raw.githubusercontent.com/dbr/shortcuteditor-nuke/v1.3/shortcuteditor.py
Then in ~/.nuke/menu.py
add the following:
try:
import shortcuteditor
shortcuteditor.nuke_setup()
except Exception:
import traceback
traceback.print_exc()
Notes
The shortcuts overrides are saved in ~/.nuke/shortcuteditor_settings.json
You can search for menu items either by name ('Search by text'), or by existing shortcut ('Search by key'), or both (rarely necessary)
There are a few shortcuts you cannot (easily) override in the viewer context, specifically things like the r/g/b and z/x/c shortcuts are hardwired.
If you are changing an existing shortcut, be sure to clear the old usage of the key. A popup appears to help with this if adding conflicting shortcuts.
Future improvements
For a list of requested and planned features, see the project's issue tracker on GitHub, https://github.com/dbr/shortcuteditor-nuke/issues
Change log
-
v1.3
- 2021-08-10- Small fixes to support Nuke 13
-
v1.2
- 2020-08-12- Updated to support Nuke 11 and 12.
- Warns when overriding an existing shortcut (PR #12 by herronelou)
- Added button to export the key-overrides as a Python snippet.
- Faster UI update for searching
-
v1.1
- 2014-08-23 -
Fixed error in error handling when a shortcut is added for a menu item which disappears.
-
nuke_setup
method works as expected when installed earlier in NUKE_PATH. Previously it might run before some menu items were added, so the shortcut was never set. -
v1.0
- 2013-10-09 -
Initial version
Comments
Got an error:
File "C:/Users/xxx/. nuke/nuke.scrip ts\shortcutedit or.py", line 4
You rock, Frank! Changed the dot to underscore and volia....
Thanks!!
I am on Nuke 9.0v3, Win 7 x64 Ultimate.
after copy that script to C:\Program Files\Nuke9.0v8\plugins\nukescripts
and put that code to menu.py
then i got this error
Quote: how to fix this ?
Btw, you are better off creating a new menu.py file in your $HOME/.nuke directory so you have better control over those things. Also, the custom stuff will work with all versions of Nuke that way.
So again. im using Window
step1:
Quote:
this command for create the folder ".nuke" and copy that script inside. DONE
step2: edit "menu.py" i put this Quote: to below of some group import in menu.py
then i got this error
Quote: ... i dont know how to fix this
Maybe check this out if you're interested:
https://docs.python.org/2/reference/lexical_analysis.html#indentation
check the documentation at the top of the page and make sure you keep white spaces and don't lose the "try".
And again, I'd strongly suggest to create a new menu.py file in your $HOME/.nuke directory rather than modifying tyhe one in tuke'sinstall directory.
my bad i missed that damn "try:" word like Mr Wouter said
after that still got some trouble with the UI, so followed Mr Frank advice i rebuild the menu by copy group by group from old menu to new menu, and find it out where is the trouble, FINALLY ITS DONE , THANK YOU AGAIN ^^ and Happy New Year Mr Frank and Mr Wouter
P/s: One more thing, i want to use "Space" key for pan and hold replace "Alt" key. Do you guys know how to change it ?
157943436qq.com
By the way, the link to the github repo is missing a colon after the https
:)
Is there any plans to update with shortcutContext support? It would be great.
If you only use in 11 and don't need backwards compatibility you can replace "from Qt import ..." with "from PySide2 import ..." So you don't have to install Qt.
from PySide2.QtGui import *
from PySide2.QtCore import *
from PySide2.QtWidge ts import *
# Qt
#from Qt import QtCore, QtWidgets, QtGui
#from Qt.QtCore import Qt
I changed to these, it's working now
import PySide2
from PySide2 import QtWidgets,QtCore,QtGui
Sorry~ I am new to Python
Would be great if work in Nuke 10.5 as well
Cheers everyone.
Best,
Peter
Support for Nuke 11 !!
https://github.com/dbr/shortcuteditor-nuke/issues/9
Has now been reported to Foundry, hopefully will be fixed in future Nuke versions
Works like a charm!
Thank you!!!
This tool was in my first UNT video
I hope you keep on updating it for Nuke the future.
Nuke 13, 14,...
Cheers!
menubar=nuke.toolbar("custom_tool")
m=menubar.addMenu("custom_tool", "nuke1.png")
tf = m.addMenu('Tran sform', icon='Transform.png')
tf.addCommand( "ConvertCornerP in", "convertCornerP in()", icon = "CornerPin.png" )
However it should work to add shortcuts to other keys in the viewer
I get this feedback:
Traceback (most recent call last):
File "C:/Users/sehpe or/.nuke/menu.p y", line 2, in
import shortcuteditor
File "C:/Users/sehpe or/.nuke\shortc uteditor.py", line 301
print "Settings file %r does not exist" % (path)
I have added the shortcuteditor. py and menu.py to the .nuke folder. I guess I'm going wrong already by not really understanding the meaning of:
Put shortcuteditor. py on PYTHONPATH or NUKE_PATH
I'm on Windows.
Appreciate guidance!
//Peter
Thanks!
Seems that it sticks to the names of the projects that are present when you change the shortcut?
RSS feed for comments to this post