From c999a92aa7c61484539dff4268e15806efdc203b Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Wed, 29 Apr 2026 10:00:35 -0500 Subject: [PATCH] Fix #8024 - Fix TypeError when CardinalPoint is None Guard the int() cast on CardinalPoint in BIM_OT_edit_assigned_material so a None value (no cardinal point set) no longer raises a TypeError. Generated with the assistance of an AI coding tool. --- src/bonsai/bonsai/bim/module/material/operator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/material/operator.py b/src/bonsai/bonsai/bim/module/material/operator.py index 7587a7e4ed..8a54478179 100644 --- a/src/bonsai/bonsai/bim/module/material/operator.py +++ b/src/bonsai/bonsai/bim/module/material/operator.py @@ -630,7 +630,7 @@ class EditAssignedMaterial(bpy.types.Operator, tool.Ifc.Operator): slab.DumbSlabPlaner().regenerate_from_layer_set(layer_set) if material_set_usage.is_a("IfcMaterialProfileSetUsage"): - if "CardinalPoint" in attributes: + if "CardinalPoint" in attributes and attributes["CardinalPoint"] is not None: attributes["CardinalPoint"] = int(attributes["CardinalPoint"]) ifcopenshell.api.material.edit_profile_usage( self.file,