diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-26 05:49:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-26 06:02:09 +0300 |
commit | 74938480083a908a5d1fad448f1214b214727bf3 (patch) | |
tree | cbc5ddb594a7676e87a10fa9f2ddcbc6acef2316 /source/blender/editors/armature/armature_edit.c | |
parent | b4e037fe14052619e23863ca08524c97181b3292 (diff) |
3D View: remove 3D cursor
Use 3D cursor from the scene (was previously used for local-view).
Diffstat (limited to 'source/blender/editors/armature/armature_edit.c')
-rw-r--r-- | source/blender/editors/armature/armature_edit.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index ba7a6822f73..f19fea32698 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -325,9 +325,8 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op) if (type == CALC_ROLL_CURSOR) { /* Cursor */ Scene *scene = CTX_data_scene(C); - View3D *v3d = CTX_wm_view3d(C); /* can be NULL */ float cursor_local[3]; - const View3DCursor *cursor = ED_view3d_cursor3d_get(scene, v3d); + const View3DCursor *cursor = &scene->cursor; invert_m4_m4(ob->imat, ob->obmat); copy_v3_v3(cursor_local, cursor->location); @@ -728,7 +727,7 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op) /* Get points - cursor (tail) */ invert_m4_m4(obedit->imat, obedit->obmat); - mul_v3_m4v3(curs, obedit->imat, ED_view3d_cursor3d_get(scene, v3d)->location); + mul_v3_m4v3(curs, obedit->imat, scene->cursor.location); /* Create a bone */ newbone = add_points_bone(obedit, ebp->vec, curs); @@ -766,7 +765,7 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op) /* get cursor location */ invert_m4_m4(obedit->imat, obedit->obmat); - mul_v3_m4v3(curs, obedit->imat, ED_view3d_cursor3d_get(scene, v3d)->location); + mul_v3_m4v3(curs, obedit->imat, scene->cursor.location); /* get distances */ dist_sq_a = len_squared_v3v3(ebp_a->vec, curs); |