[Bf-blender-cvs] [1cc9022eb51] master: Cleanup: use win_to_3d_on_plane for curve drawing

Campbell Barton noreply at git.blender.org
Thu Sep 20 04:33:01 CEST 2018


Commit: 1cc9022eb51b73abc84d79366a9cf54a561c7520
Author: Campbell Barton
Date:   Thu Sep 20 12:45:07 2018 +1000
Branches: master
https://developer.blender.org/rB1cc9022eb51b73abc84d79366a9cf54a561c7520

Cleanup: use win_to_3d_on_plane for curve drawing

===================================================================

M	source/blender/editors/curve/editcurve_paint.c

===================================================================

diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 80231a1261a..7472a0c8957 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -194,12 +194,7 @@ static bool stroke_elem_project(
 	/* project to 'location_world' */
 	if (cdd->project.use_plane) {
 		/* get the view vector to 'location' */
-		float ray_origin[3], ray_direction[3];
-		ED_view3d_win_to_ray(ar, mval_fl, ray_origin, ray_direction);
-
-		float lambda;
-		if (isect_ray_plane_v3(ray_origin, ray_direction, cdd->project.plane, &lambda, true)) {
-			madd_v3_v3v3fl(r_location_world, ray_origin, ray_direction, lambda);
+		if (ED_view3d_win_to_3d_on_plane(ar, cdd->project.plane, mval_fl, true, r_location_world)) {
 			if (r_normal_world) {
 				zero_v3(r_normal_world);
 			}



More information about the Bf-blender-cvs mailing list