[Bf-blender-cvs] [7cabd6bf54d] temp-gpencil-interpolate: Merge branch 'master' into temp-gpencil-interpolate

Antonio Vazquez noreply at git.blender.org
Mon Jan 25 16:16:34 CET 2021


Commit: 7cabd6bf54d62fc60a17e131e639c8f53e571fa0
Author: Antonio Vazquez
Date:   Mon Jan 25 16:15:50 2021 +0100
Branches: temp-gpencil-interpolate
https://developer.blender.org/rB7cabd6bf54d62fc60a17e131e639c8f53e571fa0

Merge branch 'master' into temp-gpencil-interpolate

 Conflicts:
	source/blender/editors/gpencil/gpencil_interpolate.c

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



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

diff --cc source/blender/editors/gpencil/gpencil_interpolate.c
index ae22ac32f81,972b2ed7351..b6004113476
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@@ -614,6 -546,25 +614,10 @@@ static int gpencil_interpolate_invoke(b
      return OPERATOR_CANCELLED;
    }
  
 -  /* cannot interpolate in extremes */
 -  if (ELEM(cfra, actframe->framenum, actframe->next->framenum)) {
 -    BKE_report(op->reports,
 -               RPT_ERROR,
 -               "Cannot interpolate as current frame already has existing grease pencil frames");
 -    return OPERATOR_CANCELLED;
 -  }
 -
+   if (GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)) {
+     BKE_report(op->reports, RPT_ERROR, "Cannot interpolate in curve edit mode");
+     return OPERATOR_CANCELLED;
+   }
 -
 -  /* need editable strokes */
 -  if (!gpencil_interpolate_check_todo(C, gpd)) {
 -    BKE_report(op->reports, RPT_ERROR, "Interpolation requires some editable strokes");
 -    return OPERATOR_CANCELLED;
 -  }
 -
    /* try to initialize context data needed */
    if (!gpencil_interpolate_init(C, op)) {
      if (op->customdata) {
@@@ -1089,11 -975,31 +1093,16 @@@ static int gpencil_interpolate_seq_exec
          "Cannot find a pair of grease pencil frames to interpolate between in active layer");
      return OPERATOR_CANCELLED;
    }
 -  /* cannot interpolate in extremes */
 -  if (ELEM(cfra, actframe->framenum, actframe->next->framenum)) {
 -    BKE_report(op->reports,
 -               RPT_ERROR,
 -               "Cannot interpolate as current frame already has existing grease pencil frames");
 -    return OPERATOR_CANCELLED;
 -  }
  
+   if (GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)) {
+     BKE_report(op->reports, RPT_ERROR, "Cannot interpolate in curve edit mode");
+     return OPERATOR_CANCELLED;
+   }
+ 
    /* loop all layer to check if need interpolation */
    LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
 -    bGPDframe *prevFrame, *nextFrame;
 -    bGPDstroke *gps_from, *gps_to;
 -    int cframe, fFrame;
 -
 -    /* Need a set of frames to interpolate. */
 -    if ((gpl->actframe == NULL) || (gpl->actframe->next == NULL)) {
 -      continue;
 -    }
      /* all layers or only active */
 -    if (((flag & GP_TOOLFLAG_INTERPOLATE_ALL_LAYERS) == 0) && (gpl != active_gpl)) {
 +    if ((!all_layers) && (gpl != active_gpl)) {
        continue;
      }
      /* only editable and visible layers are considered */



More information about the Bf-blender-cvs mailing list