[Bf-blender-cvs] [15f2dcf46de] temp-gpencil-bezier-stroke-type: GPencil: Move to layer for curves

Falk David noreply at git.blender.org
Mon Mar 15 00:36:25 CET 2021


Commit: 15f2dcf46deda530fa69c331117c330f72ee1528
Author: Falk David
Date:   Sun Mar 14 17:08:41 2021 +0100
Branches: temp-gpencil-bezier-stroke-type
https://developer.blender.org/rB15f2dcf46deda530fa69c331117c330f72ee1528

GPencil: Move to layer for curves

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

M	source/blender/editors/gpencil/gpencil_edit.c

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

diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 007a8e8f7e6..560833e75cb 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1418,7 +1418,7 @@ static int gpencil_extrude_exec(bContext *C, wmOperator *op)
           continue;
         }
 
-        LISTBASE_FOREACH(bGPDstroke *, gps, &gpf->strokes) {
+        LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
           /* skip strokes that are invalid for current view */
           if (ED_gpencil_stroke_can_use(C, gps) == false) {
             continue;
@@ -1955,8 +1955,12 @@ static int gpencil_move_to_layer_exec(bContext *C, wmOperator *op)
         continue;
       }
 
+      bool is_stroke_selected = GPENCIL_STROKE_TYPE_BEZIER(gps) ?
+                                    gps->editcurve->flag & GP_CURVE_SELECT :
+                                    gps->flag & GP_STROKE_SELECT;
+
       /* TODO: Don't just move entire strokes - instead, only copy the selected portions... */
-      if (gps->flag & GP_STROKE_SELECT) {
+      if (is_stroke_selected) {
         BLI_remlink(&gpf->strokes, gps);
         BLI_addtail(&strokes, gps);
       }



More information about the Bf-blender-cvs mailing list