From 3a91ed1382fdff5c61c48a0c0bc03b7e144ad7b9 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 6 Mar 2020 22:03:01 +1100 Subject: [PATCH] Support IFC2X3 materials without transparency --- src/ifcblenderexport/blenderbim/import_ifc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ifcblenderexport/blenderbim/import_ifc.py b/src/ifcblenderexport/blenderbim/import_ifc.py index 548efa64c1..f71d9a4ce1 100644 --- a/src/ifcblenderexport/blenderbim/import_ifc.py +++ b/src/ifcblenderexport/blenderbim/import_ifc.py @@ -96,7 +96,9 @@ class MaterialCreator(): for surface_style in style.Styles: if surface_style.is_a('IfcSurfaceStyleShading'): alpha = 1. - if surface_style.Transparency: + # Transparency was added in IFC4 + if hasattr(surface_style, 'Transparency') \ + and surface_style.Transparency: alpha = 1 - surface_style.Transparency material.diffuse_color = ( surface_style.SurfaceColour.Red,