[Bf-blender-cvs] [ffe6a79c61f] greasepencil-edit-curve: GPencil: Remove stroke Curve flag

Antonio Vazquez noreply at git.blender.org
Tue Jun 9 20:00:16 CEST 2020


Commit: ffe6a79c61fd77aa7dd4fc9fa0e608414cf21c01
Author: Antonio Vazquez
Date:   Tue Jun 9 20:00:06 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rBffe6a79c61fd77aa7dd4fc9fa0e608414cf21c01

GPencil: Remove stroke Curve flag

Not needed

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

M	source/blender/editors/gpencil/gpencil_edit_curve.c
M	source/blender/editors/gpencil/gpencil_utils.c
M	source/blender/makesdna/DNA_gpencil_types.h

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

diff --git a/source/blender/editors/gpencil/gpencil_edit_curve.c b/source/blender/editors/gpencil/gpencil_edit_curve.c
index 03b2e5fb0bb..a697c8b40ce 100644
--- a/source/blender/editors/gpencil/gpencil_edit_curve.c
+++ b/source/blender/editors/gpencil/gpencil_edit_curve.c
@@ -79,7 +79,6 @@ static int gp_write_stroke_curve_data_exec(bContext *C, wmOperator *op)
         BKE_gpencil_free_stroke_editcurve(gps);
       }
       BKE_gpencil_stroke_editcurve_update(gps);
-      gps->flag |= GP_STROKE_CURVE_MODE;
     }
   }
 
@@ -92,7 +91,7 @@ static int gp_write_stroke_curve_data_exec(bContext *C, wmOperator *op)
 
 void GPENCIL_OT_write_sample_stroke_curve_data(wmOperatorType *ot)
 {
-  PropertyRNA *prop;
+  // PropertyRNA *prop;
 
   /* identifiers */
   ot->name = "Write sample stroke curve data";
@@ -112,4 +111,4 @@ void GPENCIL_OT_write_sample_stroke_curve_data(wmOperatorType *ot)
   //     ot->srna, "num_points", 2, 0, 100, "Curve points", "Number of test curve points", 0, 100);
 }
 
-/** \} */
\ No newline at end of file
+/** \} */
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 069ae62a623..77a03767850 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -2616,7 +2616,7 @@ void ED_gpencil_select_curve_toggle_all(bContext *C, int action)
   /* if toggle, check if we need to select or deselect */
   if (action == SEL_TOGGLE) {
     action = SEL_SELECT;
-    GP_EDITABLE_STROKES_BEGIN(gps_iter, C, gpl, gps) {
+    GP_EDITABLE_STROKES_BEGIN (gps_iter, C, gpl, gps) {
       if (gps->editcurve != NULL && gps->flag & GP_STROKE_SELECT) {
         action = SEL_DESELECT;
       }
@@ -2625,7 +2625,7 @@ void ED_gpencil_select_curve_toggle_all(bContext *C, int action)
   }
 
   if (action == SEL_DESELECT) {
-    GP_EDITABLE_STROKES_BEGIN(gps_iter, C, gpl, gps) {
+    GP_EDITABLE_STROKES_BEGIN (gps_iter, C, gpl, gps) {
       if (gps->editcurve != NULL) {
         bGPDcurve *gpc = gps->editcurve;
         for (int i = 0; i < gpc->tot_curve_points; i++) {
@@ -2646,7 +2646,6 @@ void ED_gpencil_select_curve_toggle_all(bContext *C, int action)
       /* Make sure stroke has a curve */
       if (gps->editcurve == NULL) {
         BKE_gpencil_stroke_editcurve_update(gps);
-        gps->flag |= GP_STROKE_CURVE_MODE;
       }
 
       bGPDcurve *gpc = gps->editcurve;
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 0f0fe00107a..ea19108bbe9 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -288,8 +288,6 @@ typedef enum eGPDstroke_Flag {
   /* Flag used to indicate that stroke is used for fill close and must use
    * fill color for stroke and no fill area */
   GP_STROKE_NOFILL = (1 << 8),
-  /* Stroke is actually using curve edition */
-  GP_STROKE_CURVE_MODE = (1 << 11),
   /* only for use with stroke-buffer (while drawing arrows) */
   GP_STROKE_USE_ARROW_START = (1 << 12),
   /* only for use with stroke-buffer (while drawing arrows) */



More information about the Bf-blender-cvs mailing list