Fix T62162: Bones set to unselectable can be fully selected through the viewport...
authorSebastian Parborg <darkdefende@gmail.com>
Sat, 9 Mar 2019 10:35:13 +0000 (11:35 +0100)
committerSebastian Parborg <darkdefende@gmail.com>
Sat, 9 Mar 2019 10:35:13 +0000 (11:35 +0100)
Bone selectability in edit mode now matches the behavior of pose mode
(can no longer be selected).

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4469

source/blender/editors/armature/armature_select.c

index 8d58ee2..658392f 100644 (file)
@@ -631,6 +631,10 @@ bool ED_armature_edit_select_pick(bContext *C, const int mval[2], bool extend, b
                ED_view3d_viewcontext_init_object(&vc, basact->object);
                bArmature *arm = vc.obedit->data;
 
+               if (!EBONE_SELECTABLE(arm, nearBone)) {
+                       return false;
+               }
+
                if (!extend && !deselect && !toggle) {
                        uint objects_len = 0;
                        Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(vc.view_layer, vc.v3d, &objects_len);