From c12d9760209e104c89b3978443679356a57f89b1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 15 Apr 2018 11:45:51 +0200 Subject: Cleanup: ED_armature naming - Wasn't clear which functions handle edit-bones. - Mixed both ebone and edit_bone in names. - Didn't use ED_armature_* prefix for public API. See P655 to apply to branches. --- source/blender/editors/armature/armature_select.c | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'source/blender/editors/armature/armature_select.c') diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index 2e2c184e43d..d81e557dbfd 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -62,7 +62,7 @@ /* **************** PoseMode & EditMode Selection Buffer Queries *************************** */ /* only for opengl selection indices */ -Bone *get_indexed_bone(Object *ob, int index) +Bone *ED_armature_bone_find_index(Object *ob, int index) { bPoseChannel *pchan; if (ob->pose == NULL) return NULL; @@ -99,7 +99,7 @@ void *get_bone_from_selectbuffer( if (obedit == NULL || base->object != obedit) { /* no singular posemode, so check for correct object */ if (base->selcol == (hitresult & 0xFFFF)) { - bone = get_indexed_bone(base->object, hitresult); + bone = ED_armature_bone_find_index(base->object, hitresult); if (findunsel) sel = (bone->flag & BONE_SELECTED); @@ -244,7 +244,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEv bone = NULL; } - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit); @@ -441,7 +441,7 @@ cache_end: return NULL; } -void ED_armature_deselect_all(Object *obedit) +void ED_armature_edit_deselect_all(Object *obedit) { bArmature *arm = obedit->data; EditBone *ebone; @@ -451,7 +451,7 @@ void ED_armature_deselect_all(Object *obedit) } } -void ED_armature_deselect_all_visible(Object *obedit) +void ED_armature_edit_deselect_all_visible(Object *obedit) { bArmature *arm = obedit->data; EditBone *ebone; @@ -463,7 +463,7 @@ void ED_armature_deselect_all_visible(Object *obedit) } } - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); } /* accounts for connected parents */ @@ -478,7 +478,7 @@ static int ebone_select_flag(EditBone *ebone) } /* context: editmode armature in view3d */ -bool ED_armature_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle) +bool ED_armature_edit_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle) { Object *obedit = CTX_data_edit_object(C); bArmature *arm = obedit->data; @@ -496,7 +496,7 @@ bool ED_armature_select_pick(bContext *C, const int mval[2], bool extend, bool d if (nearBone) { if (!extend && !deselect && !toggle) { - ED_armature_deselect_all(obedit); + ED_armature_edit_deselect_all(obedit); } /* by definition the non-root connected bones have no root point drawn, @@ -567,7 +567,7 @@ bool ED_armature_select_pick(bContext *C, const int mval[2], bool extend, bool d nearBone->flag |= selmask; } - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); if (nearBone) { /* then now check for active status */ @@ -711,7 +711,7 @@ static void armature_select_more_less(Object *ob, bool more) EditBone *ebone; /* XXX, eventually we shouldn't need this - campbell */ - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); /* count bones & store selection state */ for (ebone = arm->edbo->first; ebone; ebone = ebone->next) { @@ -741,7 +741,7 @@ static void armature_select_more_less(Object *ob, bool more) ebone->temp.p = NULL; } - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); } static int armature_de_select_more_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1146,7 +1146,7 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob); @@ -1202,7 +1202,7 @@ static int armature_select_mirror_exec(bContext *C, wmOperator *op) EditBone *ebone_mirror; int flag_new = extend ? EBONE_PREV_FLAG_GET(ebone) : 0; - if ((ebone_mirror = ED_armature_bone_get_mirrored(arm->edbo, ebone)) && + if ((ebone_mirror = ED_armature_ebone_get_mirrored(arm->edbo, ebone)) && (EBONE_VISIBLE(arm, ebone_mirror))) { const int flag_mirror = EBONE_PREV_FLAG_GET(ebone_mirror); @@ -1226,7 +1226,7 @@ static int armature_select_mirror_exec(bContext *C, wmOperator *op) arm->act_edbone = ebone_mirror_act; } - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit); @@ -1311,7 +1311,7 @@ static int armature_shortest_path_pick_invoke(bContext *C, wmOperator *op, const else if (ED_armature_ebone_is_child_recursive(ebone_dst, ebone_src)) { SWAP(EditBone *, ebone_src, ebone_dst); } - else if ((ebone_isect_parent = ED_armature_bone_find_shared_parent(ebone_isect_child, 2))) { + else if ((ebone_isect_parent = ED_armature_ebone_find_shared_parent(ebone_isect_child, 2))) { /* pass */ } else { @@ -1346,7 +1346,7 @@ static int armature_shortest_path_pick_invoke(bContext *C, wmOperator *op, const if (changed) { arm->act_edbone = ebone_dst; - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit); return OPERATOR_FINISHED; -- cgit v1.2.3