[Bf-blender-cvs] [3b7a32ffb03] temp-gpencil-bezier-stroke-type: GPencil: Fix point selection of eval bezier strokes

Falk David noreply at git.blender.org
Sun Apr 4 11:26:26 CEST 2021


Commit: 3b7a32ffb03faae796817ed423ca681d9f0d5c2a
Author: Falk David
Date:   Sun Apr 4 11:26:17 2021 +0200
Branches: temp-gpencil-bezier-stroke-type
https://developer.blender.org/rB3b7a32ffb03faae796817ed423ca681d9f0d5c2a

GPencil: Fix point selection of eval bezier strokes

The point selection for bezier strokes was not correct. The
selection didn't use the active stroke and curve to select.

===================================================================

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 9df588fb354..6b665d2b19c 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -2240,8 +2240,8 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
   /* First Pass: Find point which gets hit */
   GP_EVALUATED_STROKES_BEGIN (gpstroke_iter, C, gpl, gps) {
     bGPDstroke *gps_active = (gps->runtime.gps_orig) ? gps->runtime.gps_orig : gps;
-    if (GPENCIL_STROKE_TYPE_BEZIER(gps_active)) {
-      bGPDcurve *gpc = gps_active->editcurve;
+    if (GPENCIL_STROKE_TYPE_BEZIER(gps)) {
+      bGPDcurve *gpc = gps->editcurve;
       if (gpencil_select_curve_point_closest(C,
                                              gpc,
                                              &gpstroke_iter,
@@ -2252,8 +2252,8 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
                                              &hit_distance)) {
         hit_layer = gpl;
         hit_stroke = gps_active;
-        hit_point = &gps->points[hit_curve_point->point_index];
-        hit_curve = gpc;
+        hit_point = &gps_active->points[hit_curve_point->point_index];
+        hit_curve = gps_active->editcurve;
       }
     }
     else {



More information about the Bf-blender-cvs mailing list