Fix bug where a new Blender file would remember old pset templates and libraries

This commit is contained in:
Dion Moult
2021-04-22 18:37:41 +10:00
parent 8da92557cc
commit 18d7193efc
2 changed files with 14 additions and 2 deletions
+1 -2
View File
@@ -70,8 +70,7 @@ def purge_module_data():
@persistent
def loadIfcStore(scene):
IfcStore.file = None
IfcStore.schema = None
IfcStore.purge()
ifc_file = IfcStore.get_file()
IfcStore.get_schema()
[
+13
View File
@@ -15,6 +15,19 @@ class IfcStore:
library_path = ""
library_file = None
@staticmethod
def purge():
IfcStore.path = ""
IfcStore.file = None
IfcStore.schema = None
IfcStore.id_map = {}
IfcStore.guid_map = {}
IfcStore.edited_objs = set()
IfcStore.pset_template_path = ""
IfcStore.pset_template_file = None
IfcStore.library_path = ""
IfcStore.library_file = None
@staticmethod
def get_file():
if IfcStore.file is None: