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 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()