mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
2988696161
tool.Blender.isolate_objects keeps objects visible by selecting the intended set and then hiding everything unselected via hide_view_set(unselected=True). Blender refuses to select an object whose "disable selection" (hide_select) is enabled, so such an object is treated as unselected and hidden. Activating a drawing therefore turned off any object that had disable-selection on. Temporarily clear hide_select on the target objects so they can be selected (and thus kept visible), then restore it. The clear/restore is wrapped in try/finally so hide_select is always restored even if the hide operator raises. Verified in headless Blender with real objects: an object with hide_select set is hidden by the pre-fix logic and stays visible with the fix, hide_select is preserved, and unrelated objects are still hidden. Generated with the assistance of an AI coding tool. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>