Commit 3a385ff
Do not force all meshes visible on gizmo settings change. (#981)
# Objective
- I have a scene with certain Mesh instances inside containers marked
Visibility::Hidden, and a (now-fixed) issue where I was triggering a
change to the `PhysicsGizmos` `GizmoConfigStore`. This was causing
`change_mesh_visibility` to be called and modifying all the meshes to be
visible.
## Solution
- Switch to using `Visibility::Inherited` to respect parent
(in)visibility, as `Visibility::Visible` affects everything, even in
hidden hierarchies.
- Since this code seems quite generic, I suppose the intent of may have
been to intentionally expose all meshes for some reason, but that seems
unlikely (debug rendering and the gizmos for colliders is "enough" IMO).
## Testing
- Tested with my code that toggles `PhysicsGizmos` enablement. It no
longer reveals shows invisible meshes.
---------
Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>1 parent d797a29 commit 3a385ff
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
| 566 | + | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| |||
0 commit comments