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_add.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_add.c')
-rw-r--r-- | source/blender/editors/armature/armature_add.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 3a76409eda0..0b39fe22e47 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -131,7 +131,6 @@ EditBone *ED_armature_ebone_add_primitive(Object *obedit_arm, float length, bool */ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op)) { - View3D *v3d; bArmature *arm; EditBone *ebone, *newbone, *flipbone; float mat[3][3], imat[3][3]; @@ -140,7 +139,6 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op)) Scene *scene; scene = CTX_data_scene(C); - v3d = CTX_wm_view3d(C); obedit = CTX_data_edit_object(C); arm = obedit->data; @@ -196,7 +194,7 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op)) newbone->flag |= BONE_CONNECTED; } - const View3DCursor *curs = ED_view3d_cursor3d_get(scene, v3d); + const View3DCursor *curs = &scene->cursor; copy_v3_v3(newbone->tail, curs->location); sub_v3_v3v3(newbone->tail, newbone->tail, obedit->obmat[3]); @@ -236,7 +234,7 @@ static int armature_click_extrude_invoke(bContext *C, wmOperator *op, const wmEv ar = CTX_wm_region(C); v3d = CTX_wm_view3d(C); - View3DCursor *cursor = ED_view3d_cursor3d_get(scene, v3d); + View3DCursor *cursor = &scene->cursor; copy_v3_v3(oldcurs, cursor->location); @@ -1063,7 +1061,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) RNA_string_get(op->ptr, "name", name); - copy_v3_v3(curs, ED_view3d_cursor3d_get(CTX_data_scene(C), CTX_wm_view3d(C))->location); + copy_v3_v3(curs, CTX_data_scene(C)->cursor.location); /* Get inverse point for head and orientation for tail */ invert_m4_m4(obedit->imat, obedit->obmat); |