[Bf-blender-cvs] [4b16cb1e9af] master: Fix T85987: Selection when GP is parented
Falk David
noreply at git.blender.org
Sat Feb 27 13:09:41 CET 2021
Commit: 4b16cb1e9aff4410cda1e2182e73330c814f99ac
Author: Falk David
Date: Sat Feb 27 09:28:37 2021 +0100
Branches: master
https://developer.blender.org/rB4b16cb1e9aff4410cda1e2182e73330c814f99ac
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
===================================================================
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 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])) {
More information about the Bf-blender-cvs
mailing list