[Bf-blender-cvs] [859c062a2a3] master: View 3D: multi-object pose selection no longer de-selects objects
Campbell Barton
noreply at git.blender.org
Thu Mar 17 04:44:20 CET 2022
Commit: 859c062a2a3083f53d801fce4b722dcc52482e7e
Author: Campbell Barton
Date: Thu Mar 17 14:37:36 2022 +1100
Branches: master
https://developer.blender.org/rB859c062a2a3083f53d801fce4b722dcc52482e7e
View 3D: multi-object pose selection no longer de-selects objects
De-selecting objects meant that selecting a bone would de-select
all the other pose objects - making exiting & entering pose-mode
loose the current set of pose objects.
Match edit-mode behavior: avoid de-selecting objects in the current mode
(unless the action is explicitly performed in the outliner for e.g.).
===================================================================
M source/blender/editors/space_view3d/view3d_select.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index bce753cf3d3..6a524be3b9e 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2490,9 +2490,19 @@ static bool ed_object_select_pick(bContext *C,
* not-selected active object in pose-mode won't work well for tools */
ED_object_base_select(basact, BA_SELECT);
- /* Don't set `handled` here as the object selection may be necessary
- * when starting out in object mode and moving into pose mode. */
- changed = true;
+ if (is_pose_mode && (basact->object->mode & OB_MODE_POSE)) {
+ /* Within pose-mode, keep the current selection when switching pose bones,
+ * this is noticeable when in pose mode with multiple objects at once.
+ * Where selecting the bone of a different object would de-select this one.
+ * After that, exiting pose-mode would only have the active armature selected.
+ * This matches multi-object edit-mode behavior. */
+ handled = true;
+ }
+ else {
+ /* Don't set `handled` here as the object selection may be necessary
+ * when starting out in object-mode and moving into pose-mode,
+ * when moving from pose to object-mode using object selection also makes sense. */
+ }
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, basact->object);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, basact->object);
More information about the Bf-blender-cvs
mailing list