mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 13:28:19 +00:00
Fix #6192
This commit is contained in:
@@ -81,7 +81,7 @@ class Usecase:
|
|||||||
def execute(self, style: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
|
def execute(self, style: ifcopenshell.entity_instance, attributes: dict[str, Any]) -> None:
|
||||||
self.style = style
|
self.style = style
|
||||||
|
|
||||||
attributes = {}
|
attribute_types = {}
|
||||||
for attribute in style.wrapped_data.declaration().as_entity().all_attributes():
|
for attribute in style.wrapped_data.declaration().as_entity().all_attributes():
|
||||||
attribute_type = attribute.type_of_attribute()
|
attribute_type = attribute.type_of_attribute()
|
||||||
if attribute_type.as_aggregation_type() is None:
|
if attribute_type.as_aggregation_type() is None:
|
||||||
@@ -89,10 +89,10 @@ class Usecase:
|
|||||||
else:
|
else:
|
||||||
# doesn't have .declared_type()
|
# doesn't have .declared_type()
|
||||||
attribute_type = attribute_type.type_of_element()
|
attribute_type = attribute_type.type_of_element()
|
||||||
attributes[attribute.name()] = attribute_type
|
attribute_types[attribute.name()] = attribute_type
|
||||||
|
|
||||||
for key, value in attributes.items():
|
for key, value in attributes.items():
|
||||||
attribute_class = attributes.get(key)
|
attribute_class = attribute_types.get(key)
|
||||||
if attribute_class == "IfcColourRgb":
|
if attribute_class == "IfcColourRgb":
|
||||||
self.edit_colour_rgb(key, value)
|
self.edit_colour_rgb(key, value)
|
||||||
elif key == "SpecularHighlight":
|
elif key == "SpecularHighlight":
|
||||||
|
|||||||
Reference in New Issue
Block a user