Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-09-20 05:13:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-20 05:13:11 +0300
commit66720194840b11bdfb0f26e4191d1f214cdc2e8e (patch)
treef6c54888610c462ce5fb28cbe835a73d8b7ce759 /source/blender/editors/mesh/editmesh_add_gizmo.c
parent8377febcb710d339a683ab78de0eb795659553bc (diff)
Gizmo: use simple unclipped win_to_ray function
When projecting the cursor onto a plane, clipping isn't important.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_add_gizmo.c')
-rw-r--r--source/blender/editors/mesh/editmesh_add_gizmo.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/source/blender/editors/mesh/editmesh_add_gizmo.c b/source/blender/editors/mesh/editmesh_add_gizmo.c
index 4e8985d2a9b..850ca27d26a 100644
--- a/source/blender/editors/mesh/editmesh_add_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_add_gizmo.c
@@ -100,19 +100,16 @@ static void calc_initial_placement_point_from_view(
if (use_mouse_project) {
float ray_co[3], ray_no[3];
- if (ED_view3d_win_to_ray_clipped(
- CTX_data_depsgraph(C),
- ar, v3d, mval,
- ray_co, ray_no, false))
- {
- 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);
- copy_m3_m3(r_rotation, orient_matrix);
- return;
- }
+ 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);
+ copy_m3_m3(r_rotation, orient_matrix);
+ return;
}
}