[Bf-blender-cvs] [514cb2b5498] greasepencil-edit-curve: Merge branch 'master' into greasepencil-edit-curve

Antonio Vazquez noreply at git.blender.org
Thu Oct 22 20:04:52 CEST 2020


Commit: 514cb2b5498323dfa920c992546230a21da75a59
Author: Antonio Vazquez
Date:   Thu Oct 22 20:04:42 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rB514cb2b5498323dfa920c992546230a21da75a59

Merge branch 'master' into greasepencil-edit-curve

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

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



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

diff --cc source/blender/editors/gpencil/gpencil_edit.c
index 607e5aea358,7d79e748f75..7508277a51f
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@@ -5345,7 -4678,9 +5345,10 @@@ typedef bool (*GPencilTestFn)(bGPDstrok
                                const float diff_mat[4][4],
                                void *user_data);
  
- static void gpencil_cutter_dissolve(bGPdata *gpd, bGPDlayer *hit_layer, bGPDstroke *hit_stroke)
 -static void gpencil_cutter_dissolve(bGPDlayer *hit_layer,
++static void gpencil_cutter_dissolve(bGPdata *gpd,
++                                    bGPDlayer *hit_layer,
+                                     bGPDstroke *hit_stroke,
+                                     const bool flat_caps)
  {
    bGPDspoint *pt = NULL;
    bGPDspoint *pt1 = NULL;
@@@ -5389,8 -4724,19 +5392,19 @@@
          pt->flag &= ~GP_SPOINT_TAG;
        }
      }
+     /* If flat caps mode check extremes. */
+     if (flat_caps) {
+       if (hit_stroke->points[0].flag & GP_SPOINT_TAG) {
+         hit_stroke->caps[0] = GP_STROKE_CAP_FLAT;
+       }
+ 
+       if (hit_stroke->points[hit_stroke->totpoints - 1].flag & GP_SPOINT_TAG) {
+         hit_stroke->caps[1] = GP_STROKE_CAP_FLAT;
+       }
+     }
+ 
      gpencil_stroke_delete_tagged_points(
 -        hit_layer->actframe, hit_stroke, gpsn, GP_SPOINT_TAG, false, 1);
 +        gpd, hit_layer->actframe, hit_stroke, gpsn, GP_SPOINT_TAG, false, 1);
    }
  }
  
@@@ -5477,7 -4824,7 +5492,7 @@@ static int gpencil_cutter_lasso_select(
      }
      LISTBASE_FOREACH_MUTABLE (bGPDstroke *, gps, &gpf->strokes) {
        if (gps->flag & GP_STROKE_SELECT) {
-         gpencil_cutter_dissolve(gpd, gpl, gps);
 -        gpencil_cutter_dissolve(gpl, gps, flat_caps);
++        gpencil_cutter_dissolve(gpd, gpl, gps, flat_caps);
        }
      }
    }



More information about the Bf-blender-cvs mailing list