diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-20 05:53:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-20 05:53:39 +0300 |
commit | e8c27b1bbad7ad960378ad65ddc41c882fd61bc5 (patch) | |
tree | c76af3ec124b84ee770d820820ceecd07b54ced5 /source/blender/editors/mesh/editmesh_add_gizmo.c | |
parent | 9dac8633d6dd7616cfd1beca6079156e95b0f15b (diff) |
Cleanup: use win_to_3d_on_plane function
Diffstat (limited to 'source/blender/editors/mesh/editmesh_add_gizmo.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_add_gizmo.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editmesh_add_gizmo.c b/source/blender/editors/mesh/editmesh_add_gizmo.c index 850ca27d26a..253f546c7af 100644 --- a/source/blender/editors/mesh/editmesh_add_gizmo.c +++ b/source/blender/editors/mesh/editmesh_add_gizmo.c @@ -99,15 +99,9 @@ static void calc_initial_placement_point_from_view( } if (use_mouse_project) { - float ray_co[3], ray_no[3]; - ED_view3d_win_to_ray( - ar, mval, - ray_co, ray_no); float plane[4]; plane_from_point_normal_v3(plane, cursor_matrix[3], orient_matrix[2]); - float lambda; - if (isect_ray_plane_v3(ray_co, ray_no, plane, &lambda, true)) { - madd_v3_v3v3fl(r_location, ray_co, ray_no, lambda); + if (ED_view3d_win_to_3d_on_plane(ar, plane, mval, true, r_location)) { copy_m3_m3(r_rotation, orient_matrix); return; } |