mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Styled items repeat per product, so this should be a list, not a dict
This commit is contained in:
@@ -594,7 +594,7 @@ class IfcParser():
|
|||||||
return results
|
return results
|
||||||
|
|
||||||
def get_styled_items(self):
|
def get_styled_items(self):
|
||||||
results = {}
|
results = []
|
||||||
if not self.ifc_export_settings.has_representations:
|
if not self.ifc_export_settings.has_representations:
|
||||||
return results
|
return results
|
||||||
for product in self.selected_products + self.type_products:
|
for product in self.selected_products + self.type_products:
|
||||||
@@ -605,12 +605,12 @@ class IfcParser():
|
|||||||
if slot.material.name in results \
|
if slot.material.name in results \
|
||||||
or slot.link == 'DATA':
|
or slot.link == 'DATA':
|
||||||
continue
|
continue
|
||||||
results[slot.material.name] = {
|
results.append({
|
||||||
'ifc': None,
|
'ifc': None,
|
||||||
'raw': slot.material,
|
'raw': slot.material,
|
||||||
'related_product_name': product['raw'].name,
|
'related_product_name': product['raw'].name,
|
||||||
'attributes': { 'Name': slot.material.name },
|
'attributes': { 'Name': slot.material.name },
|
||||||
}
|
})
|
||||||
return results
|
return results
|
||||||
|
|
||||||
def get_qtos(self):
|
def get_qtos(self):
|
||||||
@@ -1049,7 +1049,7 @@ class IfcExporter():
|
|||||||
self.owner_history, None, None, relating_object, related_objects)
|
self.owner_history, None, None, relating_object, related_objects)
|
||||||
|
|
||||||
def create_styled_items(self):
|
def create_styled_items(self):
|
||||||
for styled_item in self.ifc_parser.styled_items.values():
|
for styled_item in self.ifc_parser.styled_items:
|
||||||
product = self.ifc_parser.products[
|
product = self.ifc_parser.products[
|
||||||
self.ifc_parser.get_product_index_from_raw_name(
|
self.ifc_parser.get_product_index_from_raw_name(
|
||||||
styled_item['related_product_name'])]['ifc']
|
styled_item['related_product_name'])]['ifc']
|
||||||
|
|||||||
Reference in New Issue
Block a user