[Bf-blender-cvs] [476afb643ac] greasepencil-edit-curve: GPencil: Fix errors after merge
Antonio Vazquez
noreply at git.blender.org
Mon Jun 22 11:04:33 CEST 2020
Commit: 476afb643ace4f8dc823159bdf033c97bd1e16cf
Author: Antonio Vazquez
Date: Mon Jun 22 11:03:15 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rB476afb643ace4f8dc823159bdf033c97bd1e16cf
GPencil: Fix errors after merge
===================================================================
M source/blender/editors/gpencil/gpencil_select.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 1eef4a5b00f..ca538924100 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -1727,9 +1727,9 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
continue;
}
- /* firstly, check for hit-point */
- for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
- int xy[2];
+ /* firstly, check for hit-point */
+ for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
+ int xy[2];
bGPDspoint pt2;
gp_point_to_parent_space(pt, gpstroke_iter.diff_mat, &pt2);
@@ -1745,27 +1745,12 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
if (pt_distance < hit_distance) {
hit_layer = gpl;
hit_stroke = gps_active;
- hit_point = (!is_multiedit) ? pt->runtime.pt_orig : pt;
+ hit_point = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt;
hit_distance = pt_distance;
}
}
}
}
- if (ELEM(NULL, hit_stroke, hit_point)) {
- /* If nothing hit, check if the mouse is inside any filled stroke.
- * Only check filling materials. */
- MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, gps->mat_nr + 1);
- if ((gp_style->flag & GP_MATERIAL_FILL_SHOW) == 0) {
- continue;
- }
- bool hit_fill = ED_gpencil_stroke_point_is_inside(gps, &gsc, mval, gpstroke_iter.diff_mat);
- if (hit_fill) {
- hit_stroke = gps_active;
- hit_point = &gps_active->points[0];
- /* Extend selection to all stroke. */
- whole = true;
- }
- }
}
GP_EVALUATED_STROKES_END(gpstroke_iter);
}
More information about the Bf-blender-cvs
mailing list