Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit 18d7193

Browse files
committed
Fix bug where a new Blender file would remember old pset templates and libraries
1 parent 8da9255 commit 18d7193

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/blenderbim/blenderbim/bim/handler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ def purge_module_data():
7070

7171
@persistent
7272
def loadIfcStore(scene):
73-
IfcStore.file = None
74-
IfcStore.schema = None
73+
IfcStore.purge()
7574
ifc_file = IfcStore.get_file()
7675
IfcStore.get_schema()
7776
[

src/blenderbim/blenderbim/bim/ifc.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ class IfcStore:
1515
library_path = ""
1616
library_file = None
1717

18+
@staticmethod
19+
def purge():
20+
IfcStore.path = ""
21+
IfcStore.file = None
22+
IfcStore.schema = None
23+
IfcStore.id_map = {}
24+
IfcStore.guid_map = {}
25+
IfcStore.edited_objs = set()
26+
IfcStore.pset_template_path = ""
27+
IfcStore.pset_template_file = None
28+
IfcStore.library_path = ""
29+
IfcStore.library_file = None
30+
1831
@staticmethod
1932
def get_file():
2033
if IfcStore.file is None:

0 commit comments

Comments
 (0)