From ee6e96c226131376856707a793aaea299c728fd0 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 24 Oct 2020 18:20:42 +1100 Subject: [PATCH] Auto add owner history on IFC2X3 so the user doesn't need to do that manually --- src/ifcblenderexport/blenderbim/bim/export_ifc.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ifcblenderexport/blenderbim/bim/export_ifc.py b/src/ifcblenderexport/blenderbim/bim/export_ifc.py index 8dad31dcbd..238ab44255 100644 --- a/src/ifcblenderexport/blenderbim/bim/export_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/export_ifc.py @@ -695,6 +695,11 @@ class IfcParser(): 'suffix_titles': 'SuffixTitles', } results = [] + + if self.ifc_export_settings.schema == 'IFC2X3' \ + and not bpy.context.scene.BIMProperties.people: + bpy.ops.bim.add_person() + for person in bpy.context.scene.BIMProperties.people: attributes = {} for key, value in data_map.items(): @@ -718,6 +723,11 @@ class IfcParser(): 'description': 'Description', } results = [] + + if self.ifc_export_settings.schema == 'IFC2X3' \ + and not bpy.context.scene.BIMProperties.organisations: + bpy.ops.bim.add_organisation() + for organisation in bpy.context.scene.BIMProperties.organisations: attributes = {} for key, value in data_map.items():