Skip to content

Commit 144ce92

Browse files
committed
Fixes for Nuke 13
1 parent a74592e commit 144ce92

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ in `~/.nuke/`)
1818

1919
mkdir -p ~/.nuke
2020
cd ~/.nuke
21-
curl -O https://raw.githubusercontent.com/dbr/shortcuteditor-nuke/v1.2/shortcuteditor.py
21+
curl -O https://raw.githubusercontent.com/dbr/shortcuteditor-nuke/v1.3/shortcuteditor.py
2222

2323

2424
Then in `~/.nuke/menu.py` add the following:
@@ -53,6 +53,9 @@ on GitHub, https://github.com/dbr/shortcuteditor-nuke/issues
5353

5454
## Change log
5555

56+
* `v1.3` - 2021-08-10
57+
* Small fixes to support Nuke 13
58+
5659
* `v1.2` - 2020-08-12
5760
* Updated to support Nuke 11 and 12.
5861
* Warns when overriding an existing shortcut ([PR #12](https://github.com/dbr/shortcuteditor-nuke/pull/12) by [herronelou](https://github.com/herronelou))

shortcuteditor.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def _load_yaml(path):
298298
def _load_internal():
299299
import json
300300
if not os.path.isfile(path):
301-
print "Settings file %r does not exist" % (path)
301+
print("Settings file %r does not exist" % (path))
302302
return
303303
f = open(path)
304304
overrides = json.load(f)
@@ -309,7 +309,7 @@ def _load_internal():
309309
try:
310310
return _load_internal()
311311
except Exception:
312-
print "Error loading %r" % path
312+
print("Error loading %r" % path)
313313
import traceback
314314
traceback.print_exc()
315315

@@ -323,7 +323,7 @@ def _save_internal():
323323
if not os.path.isdir(ndir):
324324
try:
325325
os.makedirs(ndir)
326-
except OSError, e:
326+
except OSError as e:
327327
if e.errno != 17: # errno 17 is "already exists"
328328
raise
329329

@@ -337,7 +337,7 @@ def _save_internal():
337337
try:
338338
_save_internal()
339339
except Exception:
340-
print "Error saving node weights"
340+
print("Error saving shortcuteditor settings")
341341
import traceback
342342
traceback.print_exc()
343343

@@ -350,7 +350,6 @@ def _restore_overrides(overrides):
350350
if item is None:
351351
nuke.warning("WARNING: %r (menu: %r) does not exist?" % (path, menu_name))
352352
else:
353-
# print "Restoring shortcut %r for %r (menu: %r)" % (key, path, menu_name)
354353
item.setShortcut(key)
355354

356355

0 commit comments

Comments
 (0)