From 92e3e400f82c03eb25e96a37e516d0e0fd879441 Mon Sep 17 00:00:00 2001 From: falken10vdl Date: Tue, 21 Jul 2026 09:48:18 +0200 Subject: [PATCH] Use consistent material style prop accessor --- src/bonsai/bonsai/bim/module/style/operator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/style/operator.py b/src/bonsai/bonsai/bim/module/style/operator.py index 7b840dc695..8642b82066 100644 --- a/src/bonsai/bonsai/bim/module/style/operator.py +++ b/src/bonsai/bonsai/bim/module/style/operator.py @@ -566,7 +566,7 @@ class TogglePreferIfcShading(bpy.types.Operator): else: # Default: apply to all IFC materials source_mat = bpy.data.materials.get(self.material_name) - new_value = not source_mat.BIMStyleProperties.prefer_ifc_shading if source_mat else True + new_value = not tool.Style.get_material_style_props(source_mat).prefer_ifc_shading if source_mat else True ifc_mats = [m for m in bpy.data.materials if tool.Blender.get_ifc_definition_id(m)] for mat in ifc_mats: tool.Style.get_material_style_props(mat).prefer_ifc_shading = new_value