Commit: 9afed02356e7626d121fb46470516a71eb4ecd4d
Author: Joshua Leung
Date:   Wed Jul 25 16:46:43 2018 +1200
Branches: greasepencil-object
https://developer.blender.org/rB9afed02356e7626d121fb46470516a71eb4ecd4d

Annotation Eraser: Only erase the point within the cursor, not the whole segment

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

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

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

diff --git a/source/blender/editors/gpencil/annotate_paint.c 
b/source/blender/editors/gpencil/annotate_paint.c
index ec645f0188c..4acc6dd985e 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -933,9 +933,13 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
                                        if ((gp_stroke_eraser_is_occluded(p, 
pt1, pc1[0], pc1[1]) == false) ||
                                            (gp_stroke_eraser_is_occluded(p, 
pt2, pc2[0], pc2[1]) == false))
                                        {
-                                               /* Point is affected */
-                                               pt1->flag |= GP_SPOINT_TAG;
-                                               pt2->flag |= GP_SPOINT_TAG;
+                                               /* Edge is affected - Check 
individual points now */
+                                               if (len_v2v2_int(mval, pc1) <= 
radius) {
+                                                       pt1->flag |= 
GP_SPOINT_TAG;
+                                               }
+                                               if (len_v2v2_int(mval, pc2) <= 
radius) {
+                                                       pt2->flag |= 
GP_SPOINT_TAG;
+                                               }
                                                do_cull = true;
                                        }
                                }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to