[Bf-blender-cvs] [9afed02356e] greasepencil-object: Annotation Eraser: Only erase the point within the cursor, not the whole segment
Joshua Leung
noreply at git.blender.org
Wed Jul 25 06:46:49 CEST 2018
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;
}
}
More information about the Bf-blender-cvs
mailing list