mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 18:57:17 +00:00
Fix bug where a new Blender file would remember old pset templates and libraries
This commit is contained in:
@@ -70,8 +70,7 @@ def purge_module_data():
|
|||||||
|
|
||||||
@persistent
|
@persistent
|
||||||
def loadIfcStore(scene):
|
def loadIfcStore(scene):
|
||||||
IfcStore.file = None
|
IfcStore.purge()
|
||||||
IfcStore.schema = None
|
|
||||||
ifc_file = IfcStore.get_file()
|
ifc_file = IfcStore.get_file()
|
||||||
IfcStore.get_schema()
|
IfcStore.get_schema()
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -15,6 +15,19 @@ class IfcStore:
|
|||||||
library_path = ""
|
library_path = ""
|
||||||
library_file = None
|
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
|
@staticmethod
|
||||||
def get_file():
|
def get_file():
|
||||||
if IfcStore.file is None:
|
if IfcStore.file is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user