[Bf-blender-cvs] [c05ac7bc584] greasepencil-object: GP: Remove correction factor in Cutter

Antonioya noreply at git.blender.org
Wed Jan 2 19:40:37 CET 2019


Commit: c05ac7bc5842f297684f4da47dd61adca3778381
Author: Antonioya
Date:   Wed Jan 2 18:10:02 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBc05ac7bc5842f297684f4da47dd61adca3778381

GP: Remove correction factor in Cutter

This factor makes better cuts, but breaks other cuts, so the next operation is not working.

Maybe in the future we can add this as a parameter.

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

M	source/blender/editors/gpencil/gpencil_utils.c

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

diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 80770eb2961..f1db854de9c 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -2080,15 +2080,6 @@ static float gp_calc_factor(float p2d_a1[2], float p2d_a2[2], float r_hit2d[2])
 	float dist2 = len_squared_v2v2(p2d_a1, r_hit2d);
 	float f = dist1 > 0.0f ? dist2 / dist1 : 0.0f;
 
-	/* apply a correction factor */
-	float v1[2];
-	interp_v2_v2v2(v1, p2d_a1, p2d_a2, f);
-	float dist3 = len_squared_v2v2(p2d_a1, v1);
-	float f1 = dist1 > 0.0f ? dist3 / dist1 : 0.0f;
-	f = f + (f - f1);
-
-	interp_v2_v2v2(v1, p2d_a1, p2d_a2, f);
-
 	return f;
 }



More information about the Bf-blender-cvs mailing list