From 71067e4a14541f1ac6989637dcf975fccb17ceed Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 3 Apr 2025 15:17:30 +0500 Subject: [PATCH] Fix style test in Blender 4.4 --- src/bonsai/bonsai/tool/style.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/tool/style.py b/src/bonsai/bonsai/tool/style.py index 635e5ef9bf..79f3131715 100644 --- a/src/bonsai/bonsai/tool/style.py +++ b/src/bonsai/bonsai/tool/style.py @@ -387,10 +387,10 @@ class Style(bonsai.core.tool.Style): report(f"BSDF {GREEN}Color{R} saved as {GREEN}DiffuseColour{R}") diffuse_color = bsdf.inputs["Color"].default_value - elif "BSDF_DIFFUSE" in bsdfs: + elif "BSDF_DIFFUSE" in bsdfs or "DIFFUSE_BSDF" in bsdfs: report(f"Because of {BLUE}BSDF_DIFFUSE{R} node reflectance method identified as {BLUE}MATT{R}") attributes["ReflectanceMethod"] = "MATT" - bsdf = bsdfs["BSDF_DIFFUSE"] + bsdf = bsdfs["BSDF_DIFFUSE"] if "BSDF_DIFFUSE" in bsdfs else bsdfs["DIFFUSE_BSDF"] report(f"BSDF {GREEN}Roughness{R} saved as {GREEN}IfcSpecularRoughness{R}") attributes["SpecularHighlight"] = {"IfcSpecularRoughness": round(bsdf.inputs["Roughness"].default_value, 3)}