Fix #127180: Outliner assert selecting unselectable editbones
Prevent actual selection (keeping activation of the bone). Since `buttons_context_path_bone` / `buttons_context_path_pose_bone` go after `arm->act_bone` / `arm->act_edbone` to set the context "bone", "pose_bone" or "edit_bone" -- and that is set no matter what in `tree_element_bone_activate` / `tree_element_active_ebone__sel` -- we can set the bone active, not actually select it and the Properties Editor can still show the relevant info. Pull Request: https://projects.blender.org/blender/blender/pulls/127235
This commit is contained in:
committed by
Philipp Oeser
parent
994e05accd
commit
1f49236a54
@@ -595,7 +595,7 @@ static void tree_element_bone_activate(bContext *C,
|
||||
bone->flag &= ~BONE_SELECTED;
|
||||
}
|
||||
else {
|
||||
if (ANIM_bone_is_visible(arm, bone)) {
|
||||
if (ANIM_bone_is_visible(arm, bone) && ((bone->flag & BONE_UNSELECTABLE) == 0)) {
|
||||
bone->flag |= BONE_SELECTED;
|
||||
}
|
||||
arm->act_bone = bone;
|
||||
@@ -615,7 +615,7 @@ static void tree_element_active_ebone__sel(bContext *C, bArmature *arm, EditBone
|
||||
if (sel) {
|
||||
arm->act_edbone = ebone;
|
||||
}
|
||||
if (ANIM_bone_is_visible_editbone(arm, ebone)) {
|
||||
if (ANIM_bone_is_visible_editbone(arm, ebone) && ((ebone->flag & BONE_UNSELECTABLE) == 0)) {
|
||||
ED_armature_ebone_select_set(ebone, sel);
|
||||
}
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, CTX_data_edit_object(C));
|
||||
|
||||
Reference in New Issue
Block a user