From 046ce2b8e7cd4efd5d2b9f7f0bd996a23481ebfb Mon Sep 17 00:00:00 2001 From: Trashman247 Date: Fri, 23 Jun 2023 16:55:34 -0700 Subject: [PATCH] Update BrickStore.purge() I wanted to just have a BrickStore.clear() which would so this: BrickStore.VersionedGraphCollection = None BrickStore.graph = None BrickStore.path = None (aka not also set BrickStore.schema = None, since it should theoretically just load in the same path anyway) but for some reason Blender crashes when clearing a project and loading one again this way. --- src/blenderbim/blenderbim/tool/brick.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/blenderbim/tool/brick.py b/src/blenderbim/blenderbim/tool/brick.py index 4d4449865a..fb7d645dd7 100644 --- a/src/blenderbim/blenderbim/tool/brick.py +++ b/src/blenderbim/blenderbim/tool/brick.py @@ -100,7 +100,7 @@ class Brick(blenderbim.core.tool.Brick): @classmethod def clear_project(cls): - BrickStore.graph = None + BrickStore.purge() bpy.context.scene.BIMBrickProperties.active_brick_class == "" bpy.context.scene.BIMBrickProperties.brick_breadcrumbs.clear() @@ -331,8 +331,9 @@ class BrickStore: @staticmethod def purge(): BrickStore.schema = None + BrickStore.VersionedGraphCollection = None BrickStore.graph = None - BrickStore.path = None + BrickStore.path = None @classmethod def reload_brick_graph(cls):