Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-17 06:37:36 +0300
committerCampbell Barton <campbell@blender.org>2022-03-17 06:39:38 +0300
commit859c062a2a3083f53d801fce4b722dcc52482e7e (patch)
treefb167bf0aa21be27f111443f027c06ad583d0cd9 /source/blender/editors
parentba6d59a85a389c8e5ebaeafae1e02e888fc7e1fa (diff)
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.).
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c16
1 files changed, 13 insertions, 3 deletions
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);