Title: Bonsai: keep 'disable selection' objects visible when activating a drawing (#7681) by petruconduraru · Pull Request #8530 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Bonsai: keep 'disable selection' objects visible when activating a drawing (#7681) by petruconduraru · Pull Request #8530 · IfcOpenShell/IfcOpenShell
X Title: Bonsai: keep 'disable selection' objects visible when activating a drawing (#7681) by petruconduraru · Pull Request #8530 · IfcOpenShell/IfcOpenShell
Description: Closes #7681. Problem With disable selection (hide_select) enabled on an object, activating a drawing turns that object off (hides it). tool.Blender.isolate_objects keeps the intended objects visible by selecting them and then hiding everything unselected via hide_view_set(unselected=True). But Blender refuses to select an object whose hide_select is set (select_set(True) silently leaves it unselected), so that object is treated as unselected and gets hidden. Fix (src/bonsai/bonsai/tool/blender.py) Temporarily clear hide_select on the target objects so they can actually 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. Verification (headless Blender, real objects) The full operator needs a 3D viewport, but the hide-step logic is exercised faithfully with real Blender objects and true hide_select/select_get/hide_set semantics: KeepLocked (disable-selection ON) hidden? hide_select preserved? unrelated object hidden? before True (bug) - True after False True True Mechanism confirmed directly: obj.hide_select=True; obj.select_set(True) leaves select_get()==False, which is why the object was being hidden. Generated with the assistance of an AI coding tool. 🤖 Generated with Claude Code
Open Graph Description: Closes #7681. Problem With disable selection (hide_select) enabled on an object, activating a drawing turns that object off (hides it). tool.Blender.isolate_objects keeps the intended objects visib...
X Description: Closes #7681. Problem With disable selection (hide_select) enabled on an object, activating a drawing turns that object off (hides it). tool.Blender.isolate_objects keeps the intended objects visib...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/pull/8530
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7310a5ca-0cf8-508e-4ea7-c24a1e3d6c6b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CA72:194442:8A9579:B66595:6B04CF54 |
| html-safe-nonce | b28a14bedd0ebb161563cc8193da706cc76b095f03fce76548ac2d78b5df2639 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTcyOjE5NDQ0Mjo4QTk1Nzk6QjY2NTk1OjZCMDRDRjU0IiwidmlzaXRvcl9pZCI6IjQ3OTk2ODkyNTQzMDM0ODU3ODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 44aa3f543004bd8997a71cdfe15eaca69a0649a5df3cb308a3db47518111e4b2 |
| hovercard-subject-tag | pull_request:4037993266 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/IfcOpenShell/IfcOpenShell/pull/8530/files |
| twitter:image | https://avatars.githubusercontent.com/u/139251053?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/139251053?s=400&v=4 |
| og:image:alt | Closes #7681. Problem With disable selection (hide_select) enabled on an object, activating a drawing turns that object off (hides it). tool.Blender.isolate_objects keeps the intended objects visib... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27ed421e5c2dac040a37529b5b9191edcc4a3de70521471e81fb4b4d9dc2aa7d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63dc19014c621c67306d7899c04c78dcd0d95803 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width