bim.import_resources - add info message about imported resources

Example - https://i.imgur.com/NlZRIzw.png
This commit is contained in:
Andrej730
2024-11-20 16:36:58 +05:00
parent 670a85fd8c
commit 2381e9e4e6
@@ -344,7 +344,11 @@ class ImportResources(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
return ifc_file is not None
def _execute(self, context):
ifc_file = tool.Ifc.get()
resources_before = len(ifc_file.by_type("IfcConstructionResource"))
core.import_resources(tool.Resource, file_path=self.filepath)
resources_after = len(ifc_file.by_type("IfcConstructionResource"))
self.report({"INFO"}, f"{resources_after - resources_before} resources are imported.")
class AddProductivityData(bpy.types.Operator, tool.Ifc.Operator):