Fix missing project custom psets reload when changing IFC filepath #7037

This commit is contained in:
Andrej730
2025-08-18 19:46:24 +05:00
parent 2951aecc14
commit 3d82eb954f
5 changed files with 7 additions and 3 deletions
+4
View File
@@ -64,7 +64,11 @@ class TransactionStep(TypedDict):
class IfcStore:
path: str = ""
"""Should be set only using ``tool.Ifc.set_path``."""
file: Optional[ifcopenshell.file] = None
"""Should be set only using ``tool.Ifc.set``."""
schema: Optional[ifcopenshell.ifcopenshell_wrapper.schema_definition] = None
cache: Optional[ifcopenshell.ifcopenshell_wrapper.HdfSerializer] = None
cache_path: Optional[str] = None
@@ -1105,7 +1105,6 @@ class LoadProjectElements(bpy.types.Operator):
props = tool.Project.get_project_props()
props.is_loading = False
tool.Project.load_pset_templates()
tool.Project.load_default_thumbnails()
tool.Project.set_default_context()
tool.Project.set_default_modeling_dimensions()
+1
View File
@@ -59,6 +59,7 @@ class IfcSchema:
return
for path in tool.Blender.get_data_dir_paths("pset", "*.ifc"):
self.psetqto.templates.append(ifcopenshell.open(path))
tool.Project.load_project_pset_templates()
# TODO: do we really need to load it on module import?
+1 -1
View File
@@ -284,7 +284,7 @@ class IfcGit:
settings.should_setup_viewport_camera = False
ifc_importer = import_ifc.IfcImporter(settings)
ifc_importer.execute()
tool.Project.load_pset_templates()
tool.Project.load_project_pset_templates()
tool.Project.load_default_thumbnails()
tool.Project.set_default_context()
tool.Project.set_default_modeling_dimensions()
+1 -1
View File
@@ -73,7 +73,7 @@ class Project(bonsai.core.tool.Project):
bpy.ops.bim.load_type_thumbnails()
@classmethod
def load_pset_templates(cls) -> None:
def load_project_pset_templates(cls) -> None:
props = tool.Blender.get_addon_preferences()
pset_dir = tool.Ifc.resolve_uri(props.pset_dir)
if os.path.isdir(pset_dir):