mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 10:51:13 +00:00
bim.import_resources - add info message about imported resources
Example - https://i.imgur.com/NlZRIzw.png
This commit is contained in:
@@ -344,7 +344,11 @@ class ImportResources(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
|
|||||||
return ifc_file is not None
|
return ifc_file is not None
|
||||||
|
|
||||||
def _execute(self, context):
|
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)
|
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):
|
class AddProductivityData(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
|
|||||||
Reference in New Issue
Block a user