Skip to content

Commit

Permalink
Removed references to Pre-save Handler
Browse files Browse the repository at this point in the history
  • Loading branch information
imaginelenses committed Sep 29, 2022
1 parent 9bc5022 commit 6e741e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions newProject.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion openProject.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 6e741e5

Please sign in to comment.