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.
This commit is contained in:
Trashman247
2023-06-23 16:55:34 -07:00
parent bcf5f07718
commit 046ce2b8e7
+3 -2
View File
@@ -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):