Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Inch <mythologylover75@gmail.com>2020-04-08 06:27:28 +0300
committerRyan Inch <mythologylover75@gmail.com>2020-04-08 06:27:28 +0300
commit4d30d104c4c658bf422191a8b316090ab1fe1979 (patch)
treef5b8f6758dc5808ac61dd1f0796cdf1020928a5c
parentfb6d7c4ed81bc58d15ab81f59292b14f86073bd9 (diff)
Collection Manager: Fix T75474. Task: T69577
Fix crash when changing templates.
-rw-r--r--object_collection_manager/__init__.py2
-rw-r--r--object_collection_manager/ui.py9
2 files changed, 10 insertions, 1 deletions
diff --git a/object_collection_manager/__init__.py b/object_collection_manager/__init__.py
index c968cb79..54a0bba2 100644
--- a/object_collection_manager/__init__.py
+++ b/object_collection_manager/__init__.py
@@ -22,7 +22,7 @@ bl_info = {
"name": "Collection Manager",
"description": "Manage collections and their objects",
"author": "Ryan Inch",
- "version": (2,5,1),
+ "version": (2,5,2),
"blender": (2, 80, 0),
"location": "View3D - Object Mode (Shortcut - M)",
"warning": '', # used for warning icon and text in addons panel
diff --git a/object_collection_manager/ui.py b/object_collection_manager/ui.py
index 2209f18f..0e2739c2 100644
--- a/object_collection_manager/ui.py
+++ b/object_collection_manager/ui.py
@@ -60,6 +60,11 @@ class CollectionManager(Operator):
last_view_layer = ""
+ window_open = False
+
+ def __init__(self):
+ self.window_open = True
+
def draw(self, context):
layout = self.layout
cm = context.scene.collection_manager
@@ -328,6 +333,10 @@ class CollectionManager(Operator):
def __del__(self):
global collection_state
+ if not self.window_open:
+ # prevent destructor execution when changing templates
+ return
+
collection_state.clear()
collection_state.update(generate_state())