Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_select.c
| Show First 20 Lines • Show All 719 Lines • ▼ Show 20 Lines | static eOLDrawState tree_element_active_bone(bContext *C, | ||||
| } | } | ||||
| return OL_DRAWSEL_NONE; | return OL_DRAWSEL_NONE; | ||||
| } | } | ||||
| /* ebones only draw in editmode armature */ | /* ebones only draw in editmode armature */ | ||||
| static void tree_element_active_ebone__sel(bContext *C, bArmature *arm, EditBone *ebone, short sel) | static void tree_element_active_ebone__sel(bContext *C, bArmature *arm, EditBone *ebone, short sel) | ||||
| { | { | ||||
| if (sel) { | if (sel) { | ||||
| ebone->flag |= BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL; | |||||
| arm->act_edbone = ebone; | 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)); | WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, CTX_data_edit_object(C)); | ||||
| } | } | ||||
| static eOLDrawState tree_element_active_ebone(bContext *C, | static eOLDrawState tree_element_active_ebone(bContext *C, | ||||
| ViewLayer *view_layer, | ViewLayer *view_layer, | ||||
| TreeElement *te, | TreeElement *te, | ||||
| TreeStoreElem *tselem, | TreeStoreElem *tselem, | ||||
| const eOLSetState set, | const eOLSetState set, | ||||
| bool recursive) | bool recursive) | ||||
| ▲ Show 20 Lines • Show All 1,214 Lines • Show Last 20 Lines | |||||