[Bf-blender-cvs] [24cdffde555] master: GPencil: Cleanup - Rename ED_gpencil_stroke_color_use to ED_gpencil_stroke_material_editable

Antonio Vazquez noreply at git.blender.org
Sat Jan 16 16:50:54 CET 2021


Commit: 24cdffde555bac873904d2fbfe9d57fc0feb8a54
Author: Antonio Vazquez
Date:   Sat Jan 16 16:44:49 2021 +0100
Branches: master
https://developer.blender.org/rB24cdffde555bac873904d2fbfe9d57fc0feb8a54

GPencil: Cleanup - Rename ED_gpencil_stroke_color_use to ED_gpencil_stroke_material_editable

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

M	source/blender/editors/gpencil/gpencil_data.c
M	source/blender/editors/gpencil/gpencil_edit.c
M	source/blender/editors/gpencil/gpencil_intern.h
M	source/blender/editors/gpencil/gpencil_interpolate.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/gpencil/gpencil_sculpt_paint.c
M	source/blender/editors/gpencil/gpencil_select.c
M	source/blender/editors/gpencil/gpencil_utils.c
M	source/blender/editors/gpencil/gpencil_vertex_ops.c
M	source/blender/editors/gpencil/gpencil_vertex_paint.c
M	source/blender/editors/gpencil/gpencil_weight_paint.c
M	source/blender/editors/include/ED_gpencil.h
M	source/blender/editors/screen/screen_context.c
M	source/blender/editors/transform/transform_convert_gpencil.c

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

diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 7eac4af0cba..8f24ce0ddd8 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -1560,7 +1560,7 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op)
               continue;
             }
             /* check if the color is editable */
-            if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+            if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
               continue;
             }
             /* some stroke is already at front*/
@@ -1725,7 +1725,7 @@ static int gpencil_stroke_change_color_exec(bContext *C, wmOperator *op)
               continue;
             }
             /* check if the color is editable */
-            if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+            if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
               continue;
             }
 
@@ -3388,7 +3388,7 @@ static int gpencil_material_select_exec(bContext *C, wmOperator *op)
             continue;
           }
           /* check if the color is editable */
-          if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+          if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
             continue;
           }
 
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 9628790f27e..b5269bbfacf 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1867,7 +1867,7 @@ static int gpencil_move_to_layer_exec(bContext *C, wmOperator *op)
       }
 
       /* Check if the color is editable. */
-      if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+      if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
         continue;
       }
 
@@ -2610,7 +2610,7 @@ static int gpencil_delete_selected_points(bContext *C)
             continue;
           }
           /* check if the color is editable */
-          if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+          if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
             continue;
           }
 
@@ -2808,7 +2808,7 @@ static int gpencil_snap_to_grid(bContext *C, wmOperator *UNUSED(op))
           continue;
         }
         /* check if the color is editable */
-        if (ED_gpencil_stroke_color_use(obact, gpl, gps) == false) {
+        if (ED_gpencil_stroke_material_editable(obact, gpl, gps) == false) {
           continue;
         }
 
@@ -2946,7 +2946,7 @@ static int gpencil_snap_to_cursor(bContext *C, wmOperator *op)
             continue;
           }
           /* check if the color is editable */
-          if (ED_gpencil_stroke_color_use(obact, gpl, gps) == false) {
+          if (ED_gpencil_stroke_material_editable(obact, gpl, gps) == false) {
             continue;
           }
           /* only continue if this stroke is selected (editable doesn't guarantee this)... */
@@ -3050,7 +3050,7 @@ static bool gpencil_stroke_points_centroid(Depsgraph *depsgraph,
           continue;
         }
         /* check if the color is editable */
-        if (ED_gpencil_stroke_color_use(obact, gpl, gps) == false) {
+        if (ED_gpencil_stroke_material_editable(obact, gpl, gps) == false) {
           continue;
         }
         /* only continue if this stroke is selected (editable doesn't guarantee this)... */
@@ -3565,7 +3565,7 @@ static int gpencil_stroke_join_exec(bContext *C, wmOperator *op)
           continue;
         }
         /* check if the color is editable. */
-        if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+        if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
           continue;
         }
         elem = &strokes_list[tot_strokes];
@@ -3697,7 +3697,7 @@ static int gpencil_stroke_flip_exec(bContext *C, wmOperator *op)
           continue;
         }
         /* check if the color is editable */
-        if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+        if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
           continue;
         }
 
@@ -4516,7 +4516,7 @@ static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op)
               continue;
             }
             /* check if the color is editable */
-            if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+            if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
               continue;
             }
             /* Separate selected strokes. */
@@ -4717,7 +4717,7 @@ static int gpencil_stroke_split_exec(bContext *C, wmOperator *op)
             continue;
           }
           /* check if the color is editable */
-          if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+          if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
             continue;
           }
           /* Split selected strokes. */
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index 4c554be1cc4..5fea46626d5 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -679,7 +679,7 @@ struct GP_EditableStrokes_Iter {
               continue; \
             } \
             /* check if the color is editable */ \
-            if (ED_gpencil_stroke_color_use(obact_, gpl, gps) == false) { \
+            if (ED_gpencil_stroke_material_editable(obact_, gpl, gps) == false) { \
               continue; \
             } \
     /* ... Do Stuff With Strokes ...  */
@@ -780,7 +780,7 @@ struct GP_EditableStrokes_Iter {
                 continue; \
               } \
               /* check if the color is editable */ \
-              if (ED_gpencil_stroke_color_use(obact_, gpl, gps) == false) { \
+              if (ED_gpencil_stroke_material_editable(obact_, gpl, gps) == false) { \
                 continue; \
               } \
     /* ... Do Stuff With Strokes ...  */
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index 1c967110198..9a952e1a54b 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -229,7 +229,7 @@ static bool gpencil_interpolate_check_todo(bContext *C, bGPdata *gpd)
         continue;
       }
       /* check if the color is editable */
-      if (ED_gpencil_stroke_color_use(ob, gpl, gps_from) == false) {
+      if (ED_gpencil_stroke_material_editable(ob, gpl, gps_from) == false) {
         continue;
       }
 
@@ -315,7 +315,7 @@ static void gpencil_interpolate_set_points(bContext *C, tGPDinterpolate *tgpi)
       }
 
       /* check if the color is editable */
-      if (ED_gpencil_stroke_color_use(ob, tgpil->gpl, gps_from) == false) {
+      if (ED_gpencil_stroke_material_editable(ob, tgpil->gpl, gps_from) == false) {
         valid = false;
       }
 
@@ -1038,7 +1038,7 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op)
           continue;
         }
         /* check if the color is editable */
-        if (ED_gpencil_stroke_color_use(ob, gpl, gps_from) == false) {
+        if (ED_gpencil_stroke_material_editable(ob, gpl, gps_from) == false) {
           continue;
         }
 
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index fd965f09de0..7571f7cded8 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1738,7 +1738,7 @@ static void gpencil_stroke_doeraser(tGPsdata *p)
     /* loop over strokes, checking segments for intersections */
     LISTBASE_FOREACH_MUTABLE (bGPDstroke *, gps, &gpf->strokes) {
       /* check if the color is editable */
-      if (ED_gpencil_stroke_color_use(p->ob, gpl, gps) == false) {
+      if (ED_gpencil_stroke_material_editable(p->ob, gpl, gps) == false) {
         continue;
       }
 
diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index 10b24f4b29f..0d3ab9011d6 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -1586,7 +1586,7 @@ static bool gpencil_sculpt_brush_do_frame(bContext *C,
       continue;
     }
     /* check if the color is editable */
-    if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+    if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
       continue;
     }
 
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 281ab8c5adc..a00d21bf88a 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -2473,7 +2473,7 @@ static void gpencil_selected_hue_table(bContext *C,
         if (ED_gpencil_stroke_can_use(C, gps) == false) {
           continue;
         }
-        if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
+        if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
           continue;
         }
         if ((gps->flag & GP_STROKE_SELECT) == 0) {
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index b50450eeff3..9acedb97a80 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -579,7 +579,7 @@ bool ED_gpencil_stroke_can_use(const bContext *C, const bGPDstroke *gps)
 }
 
 /* Check whether given stroke can be edited for the current color */
-bool ED_gpencil_stroke_color_use(Object *ob, const bGPDlayer *gpl, const bGPDstroke *gps)
+bool ED_gpencil_stroke_material_editable(Object *ob, const bGPDlayer *gpl, const bGPDstroke *gps)
 {
   /* check if the color is editable */
   MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, gps->mat_nr + 1);
@@ -2173,7 +2173,7 @@ void ED_gpencil_update_color_uv(Main *bmain, Material *mat)
           LISTBASE_FOREACH (bG

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list