mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Support IFC2X3 materials without transparency
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user