From 754d3a2fe626fbe57bb6ef47581368e3859f6390 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Feb 2018 19:29:08 +1100 Subject: Object Mode: remove Scene.obedit for 3D View --- source/blender/editors/armature/armature_select.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 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 b87942fed84..f178ad640b6 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -77,10 +77,9 @@ Bone *get_indexed_bone(Object *ob, int index) /* See if there are any selected bones in this buffer */ /* only bones from base are checked on */ void *get_bone_from_selectbuffer( - Scene *scene, Base *base, const unsigned int *buffer, short hits, + Base *base, Object *obedit, const unsigned int *buffer, short hits, bool findunsel, bool do_nearest) { - Object *obedit = scene->obedit; // XXX get from context Bone *bone; EditBone *ebone; void *firstunSel = NULL, *firstSel = NULL, *data; @@ -183,9 +182,9 @@ void *get_nearest_bone(bContext *C, const int xy[2], bool findunsel) hits = view3d_opengl_select(&eval_ctx, &vc, buffer, MAXPICKBUF, &rect, VIEW3D_SELECT_PICK_NEAREST); - if (hits > 0) - return get_bone_from_selectbuffer(vc.scene, vc.view_layer->basact, buffer, hits, findunsel, true); - + if (hits > 0) { + return get_bone_from_selectbuffer(vc.view_layer->basact, vc.obedit, buffer, hits, findunsel, true); + } return NULL; } -- cgit v1.2.3