From 92aa890add29edafac0cd2e91ca311536bbdd266 Mon Sep 17 00:00:00 2001 From: Gorgious56 Date: Thu, 11 Jun 2026 20:49:41 +0200 Subject: [PATCH] Refresh railing preview on every gizmo edit update_railing skipped the bmesh rebuild for WALL_MOUNTED_HANDRAIL railings because the only mesh source available at the time mutated IFC. The viewport-only preview helper that lands with the parametric gizmo work (generate_wall_mounted_handrail_preview) sidesteps IFC entirely, so the WALL_MOUNTED_HANDRAIL branch can join the FRAMELESS_PANEL path and trigger update_railing_modifier_bmesh on every property write. Gizmo drag now repaints the viewport in real time instead of waiting for Finish Editing. Generated with the assistance of an AI coding tool. --- src/bonsai/bonsai/bim/module/model/prop.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/model/prop.py b/src/bonsai/bonsai/bim/module/model/prop.py index b9709c067a..ebafafda6d 100644 --- a/src/bonsai/bonsai/bim/module/model/prop.py +++ b/src/bonsai/bonsai/bim/module/model/prop.py @@ -228,11 +228,7 @@ def update_wall_offset_baseline(self: "BIMWallProperties", context: bpy.types.Co def update_railing(self: "BIMRailingProperties", context: bpy.types.Context) -> None: """Regenerate railing mesh when property changes.""" if self.is_editing: - # Only FRAMELESS_PANEL can update live via bmesh. - # WALL_MOUNTED_HANDRAIL geometry is generated from IFC representation, - # so it only updates on "Finish Editing" to avoid modifying IFC during preview. - if self.railing_type == "FRAMELESS_PANEL": - _get_updater("railing", "update_railing_modifier_bmesh")(context) + _get_updater("railing", "update_railing_modifier_bmesh")(context) def update_roof(self: "BIMRoofProperties", context: bpy.types.Context) -> None: