Fix #126628: Display rigid body collision shape when Extras overlay enabled

The wireframe preview for rigid body collision shape cannot be turned OFF.
Now exclude them when "extras" from overlays panel is disabled.
(This behavior was proposed by @lichtwerk in the original issue)

Pull Request: https://projects.blender.org/blender/blender/pulls/136523
This commit is contained in:
Patrick Huang
2025-04-23 07:42:05 +02:00
committed by Pratik Borhade
parent d5b254216b
commit 6e76bf8917

View File

@@ -146,7 +146,7 @@ class Bounds : Overlay {
}
/* Rigid Body Shape */
if (!from_dupli && ob->rigidbody_object != nullptr) {
if (state.show_extras() && !from_dupli && ob->rigidbody_object != nullptr) {
switch (ob->rigidbody_object->shape) {
case RB_SHAPE_BOX:
add_bounds(true, OB_BOUND_BOX);