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. --- .../blender/editors/space_view3d/view3d_select.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/space_view3d/view3d_select.c') diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index a52d4a1a69f..22ca3beae0a 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -681,14 +681,14 @@ static void do_lasso_select_armature(ViewContext *vc, const int mcords[][2], sho ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); if (extend == false && select) - ED_armature_deselect_all_visible(vc->obedit); + ED_armature_edit_deselect_all_visible(vc->obedit); armature_foreachScreenBone(vc, do_lasso_select_armature__doSelectBone, &data, V3D_PROJ_TEST_CLIP_DEFAULT); if (data.is_changed) { bArmature *arm = vc->obedit->data; - ED_armature_sync_selection(arm->edbo); - ED_armature_validate_active(arm); + ED_armature_edit_sync_selection(arm->edbo); + ED_armature_edit_validate_active(arm); WM_main_add_notifier(NC_OBJECT | ND_BONE_SELECT, vc->obedit); } } @@ -1514,7 +1514,9 @@ static bool ed_object_select_pick( } } } - else if (ED_do_pose_selectbuffer(scene, basact, buffer, hits, extend, deselect, toggle, do_nearest)) { + else if (ED_armature_pose_select_pick_with_buffer( + scene, basact, buffer, hits, extend, deselect, toggle, do_nearest)) + { /* then bone is found */ /* we make the armature selected: @@ -1925,7 +1927,7 @@ static int do_armature_box_select(ViewContext *vc, rcti *rect, bool select, bool ebone->flag &= ~BONE_DONE; if (extend == false && select) - ED_armature_deselect_all_visible(vc->obedit); + ED_armature_edit_deselect_all_visible(vc->obedit); /* first we only check points inside the border */ for (a = 0; a < hits; a++) { @@ -1977,7 +1979,7 @@ static int do_armature_box_select(ViewContext *vc, rcti *rect, bool select, bool } } - ED_armature_sync_selection(arm->edbo); + ED_armature_edit_sync_selection(arm->edbo); return hits > 0 ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -2036,7 +2038,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b if (BASE_SELECTABLE(vc->v3d, base)) { while (base->selcol == (*col & 0xFFFF)) { /* we got an object */ if (*col & 0xFFFF0000) { /* we got a bone */ - bone = get_indexed_bone(base->object, *col & ~(BONESEL_ANY)); + bone = ED_armature_bone_find_index(base->object, *col & ~(BONESEL_ANY)); if (bone) { if (select) { if ((bone->flag & BONE_UNSELECTABLE) == 0) { @@ -2273,7 +2275,7 @@ static int view3d_select_exec(bContext *C, wmOperator *op) if (obedit->type == OB_MESH) retval = EDBM_select_pick(C, location, extend, deselect, toggle); else if (obedit->type == OB_ARMATURE) - retval = ED_armature_select_pick(C, location, extend, deselect, toggle); + retval = ED_armature_edit_select_pick(C, location, extend, deselect, toggle); else if (obedit->type == OB_LATTICE) retval = ED_lattice_select_pick(C, location, extend, deselect, toggle); else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) @@ -2715,8 +2717,8 @@ static void armature_circle_select(ViewContext *vc, const bool select, const int armature_foreachScreenBone(vc, do_circle_select_armature__doSelectBone, &data, V3D_PROJ_TEST_CLIP_DEFAULT); if (data.is_changed) { - ED_armature_sync_selection(arm->edbo); - ED_armature_validate_active(arm); + ED_armature_edit_sync_selection(arm->edbo); + ED_armature_edit_validate_active(arm); WM_main_add_notifier(NC_OBJECT | ND_BONE_SELECT, vc->obedit); } } -- cgit v1.2.3