[Bf-blender-cvs] [2240ca3e7bb] master: Fix T101933: pick deselecting bones in empty space deactivates armature

Philipp Oeser noreply at git.blender.org
Tue Oct 25 13:43:22 CEST 2022


Commit: 2240ca3e7bbf07c1d417f288af3ab3fa2ef68df9
Author: Philipp Oeser
Date:   Mon Oct 24 10:34:54 2022 +0200
Branches: master
https://developer.blender.org/rB2240ca3e7bbf07c1d417f288af3ab3fa2ef68df9

Fix T101933: pick deselecting bones in empty space deactivates armature

As a consequence of this, subsequent box-selection of bones would not
show correctly in Animation Editors (not showing the channels there
because of the lack of an active object).

The bug was caused by rBba6d59a85a38.
Prior to said commit, code logic was relying on the check for `basact`
being NULL to determine if object selection changes need to happen.
After that commit, this was handled by a `handled` variable, but this
was not set correctly if `basact` is actually NULL after the initial
pick (aka deselection by picking).

Maniphest Tasks: T101933

Differential Revision: https://developer.blender.org/D16326

===================================================================

M	source/blender/editors/space_view3d/view3d_select.cc

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc
index cba85097071..2a84d61c561 100644
--- a/source/blender/editors/space_view3d/view3d_select.cc
+++ b/source/blender/editors/space_view3d/view3d_select.cc
@@ -2704,7 +2704,10 @@ static bool ed_object_select_pick(bContext *C,
         /* When there is no `baseact` this will have operated on `oldbasact`,
          * allowing #SelectPick_Params.deselect_all work in pose-mode.
          * In this case no object operations are needed. */
-        if (basact != nullptr) {
+        if (basact == nullptr) {
+          handled = true;
+        }
+        else {
           /* By convention the armature-object is selected when in pose-mode.
            * While leaving it unselected will work, leaving pose-mode would leave the object
            * active + unselected which isn't ideal when performing other actions on the object. */



More information about the Bf-blender-cvs mailing list