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
diff options
context:
space:
mode:
authorFalk David <falkdavid@gmx.de>2021-02-27 11:28:37 +0300
committerFalk David <falkdavid@gmx.de>2021-02-27 15:08:46 +0300
commit4b16cb1e9aff4410cda1e2182e73330c814f99ac (patch)
tree28b3125dc5d47c2b00d5cbba7cb6ce3a23310c69
parente3c11b36dae03c783234ca528fbcf7a85d346df3 (diff)
Fix T85987: Selection when GP is parented
When a GP object was parented to e.g. a bone, box selection as well as point selection were broken in that the selection from the user would not correlate with what was actually being selected. The issue was that box and point selection did not use the active evaluated stroke data. The fix uses the correct data. Reviewed By: antoniov Maniphest Tasks: T85987 Differential Revision: https://developer.blender.org/D10555
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index e01c1ec54d7..aab08e9c8c4 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -1847,7 +1847,7 @@ static bool gpencil_generic_stroke_select(bContext *C,
bGPDspoint *pt;
int i;
bool hit = false;
- for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
+ for (i = 0, pt = gps_active->points; i < gps_active->totpoints; i++, pt++) {
bGPDspoint *pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt;
/* convert point coords to screenspace */
@@ -2252,12 +2252,12 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
int i;
/* firstly, check for hit-point */
- for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
+ for (i = 0, pt = gps_active->points; i < gps_active->totpoints; i++, pt++) {
int xy[2];
bGPDspoint pt2;
gpencil_point_to_parent_space(pt, gpstroke_iter.diff_mat, &pt2);
- gpencil_point_to_xy(&gsc, gps, &pt2, &xy[0], &xy[1]);
+ gpencil_point_to_xy(&gsc, gps_active, &pt2, &xy[0], &xy[1]);
/* do boundbox check first */
if (!ELEM(V2D_IS_CLIPPED, xy[0], xy[1])) {