From 6e741e5e1f4e24cf3416cb4f527ebdb53ae5965e Mon Sep 17 00:00:00 2001 From: imaginelenses Date: Fri, 30 Sep 2022 00:31:06 +0530 Subject: [PATCH] Removed references to Pre-save Handler --- newProject.py | 8 +------- openProject.py | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/newProject.py b/newProject.py index 46a6baf..a9bd687 100644 --- a/newProject.py +++ b/newProject.py @@ -9,7 +9,7 @@ import pygit2 as git # Local imports implemented to support Blender refreshes -modulesNames = ("gitHelpers", "reports", "appHandlers") +modulesNames = ("gitHelpers", "reports") for module in modulesNames: if module in sys.modules: importlib.reload(sys.modules[module]) @@ -161,15 +161,9 @@ def execute(self, context): file.write("def executeCommands():\n") file.write("\tpass\n") - # Unregister save pre handler - bpy.app.handlers.save_pre.remove(appHandlers.savePreHandler) - # Save .blend file bpy.ops.wm.save_mainfile(filepath=os.path.join(filepath, f"{filename}.blend")) - # Re-register save pre handler - bpy.app.handlers.save_pre.append(appHandlers.savePreHandler) - # Initial commit gitHelpers.commit(repo, "Initial commit - created project") diff --git a/openProject.py b/openProject.py index 565d0f4..89a4c0a 100644 --- a/openProject.py +++ b/openProject.py @@ -10,7 +10,7 @@ from pygit2._pygit2 import GitError # Local imports implemented to support Blender refreshes -modulesNames = ("gitHelpers", "reports", "subscriptions", "appHandlers") +modulesNames = ("gitHelpers", "reports", "subscriptions") for module in modulesNames: if module in sys.modules: importlib.reload(sys.modules[module])