From e11d4e4e4ccbac04a73cfc2d4e4f5b014454878e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 1 Sep 2019 13:22:26 +1000 Subject: [PATCH] Support custom attributes for products --- export.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/export.py b/export.py index 9c5c1d5756..97204e6f20 100644 --- a/export.py +++ b/export.py @@ -17,13 +17,15 @@ class IfcParser(): collection_name_filter = [] product_index = 0 for object in bpy.context.selected_objects: + attributes = { 'Name': self.get_ifc_name(object.name) } + attributes.update({key[3:]: object[key] for key in object.keys() if key[0:3] == 'Ifc'}) product_data = { 'ifc': None, 'class': self.get_ifc_class(object.name), 'raw': object, 'relating_structure': None, 'representation': self.get_representation_reference(object.data.name), - 'attributes': { 'Name': self.get_ifc_name(object.name) } + 'attributes': attributes } for collection in object.users_collection: if self.is_a_spatial_structure_element(self.get_ifc_class(collection.name)):