mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-07 04:46:25 +00:00
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:
@@ -100,7 +100,7 @@ class Brick(blenderbim.core.tool.Brick):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def clear_project(cls):
|
def clear_project(cls):
|
||||||
BrickStore.graph = None
|
BrickStore.purge()
|
||||||
bpy.context.scene.BIMBrickProperties.active_brick_class == ""
|
bpy.context.scene.BIMBrickProperties.active_brick_class == ""
|
||||||
bpy.context.scene.BIMBrickProperties.brick_breadcrumbs.clear()
|
bpy.context.scene.BIMBrickProperties.brick_breadcrumbs.clear()
|
||||||
|
|
||||||
@@ -331,8 +331,9 @@ class BrickStore:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def purge():
|
def purge():
|
||||||
BrickStore.schema = None
|
BrickStore.schema = None
|
||||||
|
BrickStore.VersionedGraphCollection = None
|
||||||
BrickStore.graph = None
|
BrickStore.graph = None
|
||||||
BrickStore.path = None
|
BrickStore.path = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def reload_brick_graph(cls):
|
def reload_brick_graph(cls):
|
||||||
|
|||||||
Reference in New Issue
Block a user