diff options
author | Ryan Inch <mythologylover75@gmail.com> | 2020-04-08 06:27:28 +0300 |
---|---|---|
committer | Ryan Inch <mythologylover75@gmail.com> | 2020-04-08 06:27:28 +0300 |
commit | 4d30d104c4c658bf422191a8b316090ab1fe1979 (patch) | |
tree | f5b8f6758dc5808ac61dd1f0796cdf1020928a5c /object_collection_manager/ui.py | |
parent | fb6d7c4ed81bc58d15ab81f59292b14f86073bd9 (diff) |
Collection Manager: Fix T75474. Task: T69577
Fix crash when changing templates.
Diffstat (limited to 'object_collection_manager/ui.py')
-rw-r--r-- | object_collection_manager/ui.py | 9 |
1 files changed, 9 insertions, 0 deletions
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()) |