mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Support IFC2X3 materials without transparency
This commit is contained in:
@@ -96,7 +96,9 @@ class MaterialCreator():
|
|||||||
for surface_style in style.Styles:
|
for surface_style in style.Styles:
|
||||||
if surface_style.is_a('IfcSurfaceStyleShading'):
|
if surface_style.is_a('IfcSurfaceStyleShading'):
|
||||||
alpha = 1.
|
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
|
alpha = 1 - surface_style.Transparency
|
||||||
material.diffuse_color = (
|
material.diffuse_color = (
|
||||||
surface_style.SurfaceColour.Red,
|
surface_style.SurfaceColour.Red,
|
||||||
|
|||||||
Reference in New Issue
Block a user