Fix #1112. You can now tag material attributes.

This commit is contained in:
Dion Moult
2020-12-02 09:03:18 +11:00
parent aaf9b10a9e
commit c70b41f21a
2 changed files with 20 additions and 0 deletions
@@ -219,6 +219,14 @@ class Selector:
except:
return
key = ".".join(key.split(".")[1:])
elif "." in key and key.split(".")[0] == "material":
try:
element = ifcopenshell.util.element.get_material(element)
if not element:
return None
except:
return
key = ".".join(key.split(".")[1:])
info = element.get_info()
if key in info:
return info[key]