From f28cc7aba8cb36a19a0c9f397485bf34799f760a Mon Sep 17 00:00:00 2001 From: Joseph Yu Date: Tue, 28 May 2019 13:20:46 +0100 Subject: [PATCH 1/2] [gitignore] tk-metadata --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index d2d6f36..bab5acb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# ---- ignore special files written during config setup +tk-metadata + +# Byte-compiled / optimized / DLL files *.py[cod] # C extensions From 7b33cf2011f45828d91bdb3c21f5ab4a951e9152 Mon Sep 17 00:00:00 2001 From: Joseph Yu Date: Tue, 28 May 2019 13:31:21 +0100 Subject: [PATCH 2/2] Using alternate "open in current window" --- hooks/scene_operation_tk-nuke.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hooks/scene_operation_tk-nuke.py b/hooks/scene_operation_tk-nuke.py index b3e4f6a..c96474c 100644 --- a/hooks/scene_operation_tk-nuke.py +++ b/hooks/scene_operation_tk-nuke.py @@ -94,8 +94,10 @@ def _nuke_execute(self, operation, file_path, **kwargs): # open the specified script into the current window if nuke.root().modified(): raise TankError("Script is modified!") - nuke.scriptClear() - nuke.scriptOpen(file_path) + # See shotgunsoftware/tk-multi-snapshot/pull/23 + for node in nuke.allNodes(): + nuke.delete(node) + nuke.scriptReadFile(file_path) elif operation == "save": # save the current script: nuke.scriptSave()