[Bf-blender-cvs] [1e218d8b68b] temp-gpencil-bezier-stroke-type: GPencil: Fix compile errors

Falk David noreply at git.blender.org
Thu May 27 12:44:28 CEST 2021


Commit: 1e218d8b68bd10082a1015adf1146a726358810f
Author: Falk David
Date:   Thu May 27 12:44:24 2021 +0200
Branches: temp-gpencil-bezier-stroke-type
https://developer.blender.org/rB1e218d8b68bd10082a1015adf1146a726358810f

GPencil: Fix compile errors

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

M	source/blender/editors/gpencil/gpencil_bake_animation.c
M	source/blender/editors/gpencil/gpencil_curve_draw.c
M	source/blender/editors/gpencil/gpencil_edit.c
M	source/blender/gpencil_modifiers/intern/MOD_gpencillength.c

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

diff --git a/source/blender/editors/gpencil/gpencil_bake_animation.c b/source/blender/editors/gpencil/gpencil_bake_animation.c
index 30ebc9189c5..ba7017238da 100644
--- a/source/blender/editors/gpencil/gpencil_bake_animation.c
+++ b/source/blender/editors/gpencil/gpencil_bake_animation.c
@@ -346,7 +346,7 @@ static int gpencil_bake_grease_pencil_animation_exec(bContext *C, wmOperator *op
                 depsgraph, &gsc, sctx, gpl_dst, gpf_dst, gps, project_type, false);
           }
           else {
-            BKE_gpencil_stroke_geometry_update(gpd_dst, gps);
+            BKE_gpencil_stroke_geometry_update(gpd_dst, gps, GP_GEO_UPDATE_DEFAULT);
           }
         }
       }
diff --git a/source/blender/editors/gpencil/gpencil_curve_draw.c b/source/blender/editors/gpencil/gpencil_curve_draw.c
index b57b6accf9a..83df6bb63ad 100644
--- a/source/blender/editors/gpencil/gpencil_curve_draw.c
+++ b/source/blender/editors/gpencil/gpencil_curve_draw.c
@@ -436,7 +436,7 @@ static void gpencil_curve_draw_init(bContext *C, wmOperator *op, const wmEvent *
   /* Get active layer or create a new one. */
   bGPDlayer *gpl = CTX_data_active_gpencil_layer(C);
   if (gpl == NULL) {
-    gpl = BKE_gpencil_layer_addnew(tcd->gpd, DATA_("Curve"), true);
+    gpl = BKE_gpencil_layer_addnew(tcd->gpd, DATA_("Curve"), true, false);
   }
   tcd->gpl = gpl;
 
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 170bbc687d1..04731602ca5 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -4700,7 +4700,6 @@ static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op)
   const bool keep_ends = RNA_boolean_get(op->ptr, "keep_ends");
 
   const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_src);
-  const bool is_curve_edit = (bool)GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd_src);
 
   /* sanity checks */
   if (ELEM(NULL, gpd_src)) {
@@ -4783,11 +4782,6 @@ static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op)
               gpl_dst = BKE_gpencil_layer_addnew(gpd_dst, gpl->info, false, false);
             }
 
-            /* add layer if not created before */
-            if (gpl_dst == NULL) {
-              gpl_dst = BKE_gpencil_layer_addnew(gpd_dst, gpl->info, false);
-            }
-
             /* add frame if not created before */
             if (gpf_dst == NULL) {
               gpf_dst = BKE_gpencil_layer_frame_get(gpl_dst, gpf->framenum, GP_GETFRAME_ADD_NEW);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c
index fd94ac92bc3..726f436de8d 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillength.c
@@ -109,7 +109,7 @@ static void applyLength(LengthGpencilModifierData *lmd, bGPdata *gpd, bGPDstroke
   changed |= gpencil_modify_stroke(gps, len * lmd->end_fac, lmd->overshoot_fac, 2);
 
   if (changed) {
-    BKE_gpencil_stroke_geometry_update(gpd, gps);
+    BKE_gpencil_stroke_geometry_update(gpd, gps, GP_GEO_UPDATE_DEFAULT);
   }
 }



More information about the Bf-blender-cvs mailing list