Merge branch 'blender-v2.91-release' into master
This commit is contained in:
commit
dae004557a
|
@ -725,20 +725,9 @@ static eOLDrawState tree_element_active_bone(bContext *C,
|
|||
static void tree_element_active_ebone__sel(bContext *C, bArmature *arm, EditBone *ebone, short sel)
|
||||
{
|
||||
if (sel) {
|
||||
ebone->flag |= BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL;
|
||||
arm->act_edbone = ebone;
|
||||
/* Flush to parent? */
|
||||
if (ebone->parent && (ebone->flag & BONE_CONNECTED)) {
|
||||
ebone->parent->flag |= BONE_TIPSEL;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ebone->flag &= ~(BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL);
|
||||
/* Flush to parent? */
|
||||
if (ebone->parent && (ebone->flag & BONE_CONNECTED)) {
|
||||
ebone->parent->flag &= ~BONE_TIPSEL;
|
||||
}
|
||||
}
|
||||
ED_armature_ebone_select_set(ebone, sel);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, CTX_data_edit_object(C));
|
||||
}
|
||||
static eOLDrawState tree_element_active_ebone(bContext *C,
|
||||
|
|
|
@ -253,11 +253,13 @@ static void outliner_select_sync_to_edit_bone(ViewLayer *view_layer,
|
|||
|
||||
if (EBONE_SELECTABLE(arm, ebone)) {
|
||||
if (tselem->flag & TSE_SELECTED) {
|
||||
ebone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
|
||||
|
||||
ED_armature_ebone_select_set(ebone, true);
|
||||
add_selected_item(selected_ebones, ebone);
|
||||
}
|
||||
else if (!is_edit_bone_selected(selected_ebones, ebone)) {
|
||||
/* Dont flush to parent bone tip, synced selection is iterating the whole tree so deselecting
|
||||
* potential children with 'ED_armature_ebone_select_set(ebone, false)' would leave own tip
|
||||
* deselected. */
|
||||
ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue