Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-06-21 10:52:17 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-06-21 17:08:26 +0300
commitce64cfd6edc2a0ec0aabfd4daaa5f655763cc74b (patch)
treeb4d8f46c936bffc8fc4eb2142c19ab151c935c89 /source
parent3cf39c09bfe7d95a6114dbde6e2b0d8f49ab5f29 (diff)
Fix T89306: GPencil selection doesn't work correctly with modifiers
The problem was introduced with Bezier modification because the selection code was using the original stroke and not the evaluated version.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index e1776988186..55521ac4d15 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -1276,7 +1276,7 @@ static bool gpencil_stroke_do_circle_sel(bGPdata *gpd,
pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt;
bGPDspoint pt_temp;
- gpencil_point_to_parent_space(pt_active, diff_mat, &pt_temp);
+ gpencil_point_to_parent_space(pt, diff_mat, &pt_temp);
gpencil_point_to_xy(gsc, gps, &pt_temp, &x0, &y0);
/* do boundbox check first */
@@ -1847,7 +1847,7 @@ static bool gpencil_generic_stroke_select(bContext *C,
bGPDspoint *pt;
int i;
bool hit = false;
- for (i = 0, pt = gps_active->points; i < gps_active->totpoints; i++, pt++) {
+ for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
bGPDspoint *pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt;
/* convert point coords to screenspace */
@@ -1889,7 +1889,7 @@ static bool gpencil_generic_stroke_select(bContext *C,
mval[0] = (box.xmax + box.xmin) / 2;
mval[1] = (box.ymax + box.ymin) / 2;
- whole = ED_gpencil_stroke_point_is_inside(gps_active, &gsc, mval, gpstroke_iter.diff_mat);
+ whole = ED_gpencil_stroke_point_is_inside(gps, &gsc, mval, gpstroke_iter.diff_mat);
}
/* if stroke mode expand selection. */
@@ -2252,7 +2252,7 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
int i;
/* firstly, check for hit-point */
- for (i = 0, pt = gps_active->points; i < gps_active->totpoints; i++, pt++) {
+ for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
int xy[2];
bGPDspoint pt2;