Commit: 040ec894a4922ea9b59506cbf8b48d528ad39f8b
Author: Antonio Vazquez
Date:   Fri Mar 9 18:31:48 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB040ec894a4922ea9b59506cbf8b48d528ad39f8b

Cleanup: Rename brush icon field

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

M       source/blender/blenkernel/intern/gpencil.c
M       source/blender/editors/gpencil/gpencil_paint.c
M       source/blender/makesdna/DNA_gpencil_types.h
M       source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/blenkernel/intern/gpencil.c 
b/source/blender/blenkernel/intern/gpencil.c
index 25007a6bb13..f3215a61ca1 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -590,7 +590,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush->subdivide = 1;
        brush->draw_random_sub = 0.0f;
        copy_v3_v3(brush->curcolor, curcolor);
-       brush->icon = GPBRUSH_PENCIL;
+       brush->icon_id = GPBRUSH_PENCIL;
        brush->type = GP_BRUSH_TYPE_DRAW;
 
        brush->lazy_radius = LAZY_RADIUS;
@@ -622,7 +622,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush->thick_smoothlvl = 3;
        brush->draw_random_sub = 0.0f;
        copy_v3_v3(brush->curcolor, curcolor);
-       brush->icon = GPBRUSH_PEN;
+       brush->icon_id = GPBRUSH_PEN;
        brush->type = GP_BRUSH_TYPE_DRAW;
 
        brush->lazy_radius = LAZY_RADIUS;
@@ -652,7 +652,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush->subdivide = 1;
        brush->draw_random_sub = 0.0f;
        copy_v3_v3(brush->curcolor, curcolor);
-       brush->icon = GPBRUSH_INK;
+       brush->icon_id = GPBRUSH_INK;
        brush->type = GP_BRUSH_TYPE_DRAW;
 
        brush->lazy_radius = LAZY_RADIUS;
@@ -688,7 +688,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush->subdivide = 1;
        brush->draw_random_sub = 0.0f;
        copy_v3_v3(brush->curcolor, curcolor);
-       brush->icon = GPBRUSH_INKNOISE;
+       brush->icon_id = GPBRUSH_INKNOISE;
        brush->type = GP_BRUSH_TYPE_DRAW;
 
        brush->lazy_radius = LAZY_RADIUS;
@@ -725,7 +725,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush->subdivide = 0;
        brush->draw_random_sub = 0;
        copy_v3_v3(brush->curcolor, curcolor);
-       brush->icon = GPBRUSH_BLOCK;
+       brush->icon_id = GPBRUSH_BLOCK;
        brush->type = GP_BRUSH_TYPE_DRAW;
 
        brush->lazy_radius = LAZY_RADIUS;
@@ -755,7 +755,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush->subdivide = 1;
        brush->draw_random_sub = 0.0f;
        copy_v3_v3(brush->curcolor, curcolor);
-       brush->icon = GPBRUSH_MARKER;
+       brush->icon_id = GPBRUSH_MARKER;
        brush->type = GP_BRUSH_TYPE_DRAW;
 
        brush->lazy_radius = LAZY_RADIUS;
@@ -769,7 +769,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush->fill_leak = 3;
        brush->fill_threshold = 0.1f;
        brush->fill_simplylvl = 1;
-       brush->icon = GPBRUSH_FILL;
+       brush->icon_id = GPBRUSH_FILL;
        brush->type = GP_BRUSH_TYPE_FILL;
 
        brush->draw_smoothfac = 0.5f;
@@ -788,7 +788,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush = BKE_gpencil_brush_addnew(ts, "Soft Eraser", false);
        brush->thickness = 30.0f;
        brush->flag |= (GP_BRUSH_ENABLE_CURSOR | GP_BRUSH_DEFAULT_ERASER);
-       brush->icon = GPBRUSH_ERASE_SOFT;
+       brush->icon_id = GPBRUSH_ERASE_SOFT;
        brush->type = GP_BRUSH_TYPE_ERASE;
        brush->eraser_mode = GP_BRUSH_ERASER_SOFT;
        copy_v3_v3(brush->curcolor, curcolor);
@@ -797,7 +797,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush = BKE_gpencil_brush_addnew(ts, "Hard Eraser", false);
        brush->thickness = 30.0f;
        brush->flag |= GP_BRUSH_ENABLE_CURSOR;
-       brush->icon = GPBRUSH_ERASE_HARD;
+       brush->icon_id = GPBRUSH_ERASE_HARD;
        brush->type = GP_BRUSH_TYPE_ERASE;
        brush->eraser_mode = GP_BRUSH_ERASER_HARD;
        copy_v3_v3(brush->curcolor, curcolor);
@@ -806,7 +806,7 @@ void BKE_gpencil_brush_init_presets(ToolSettings *ts)
        brush = BKE_gpencil_brush_addnew(ts, "Stroke Eraser", false);
        brush->thickness = 30.0f;
        brush->flag |= GP_BRUSH_ENABLE_CURSOR;
-       brush->icon = GPBRUSH_ERASE_STROKE;
+       brush->icon_id = GPBRUSH_ERASE_STROKE;
        brush->type = GP_BRUSH_TYPE_ERASE;
        brush->eraser_mode = GP_BRUSH_ERASER_STROKE;
        copy_v3_v3(brush->curcolor, curcolor);
@@ -837,7 +837,7 @@ bGPDbrush *BKE_gpencil_brush_addnew(ToolSettings *ts, const 
char *name, bool set
        brush->draw_strength = 1.0f;
        brush->draw_jitter = 0.0f;
        brush->flag |= GP_BRUSH_USE_JITTER_PRESSURE;
-       brush->icon = GPBRUSH_CUSTOM;
+       brush->icon_id = GPBRUSH_CUSTOM;
 
        /* curves */
        brush->cur_sensitivity = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
diff --git a/source/blender/editors/gpencil/gpencil_paint.c 
b/source/blender/editors/gpencil/gpencil_paint.c
index c8603de26ca..cd2e339c2fa 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1497,7 +1497,7 @@ static bGPDbrush *gp_get_default_eraser(ToolSettings *ts)
                brush_dft = BKE_gpencil_brush_addnew(ts, "Soft Eraser", false);
                brush_dft->thickness = 30.0f;
                brush_dft->flag |= (GP_BRUSH_ENABLE_CURSOR | 
GP_BRUSH_DEFAULT_ERASER);
-               brush_dft->icon = GPBRUSH_ERASE_SOFT;
+               brush_dft->icon_id = GPBRUSH_ERASE_SOFT;
                brush_dft->type = GP_BRUSH_TYPE_ERASE;
                brush_dft->eraser_mode = GP_BRUSH_ERASER_SOFT;
 
diff --git a/source/blender/makesdna/DNA_gpencil_types.h 
b/source/blender/makesdna/DNA_gpencil_types.h
index 9e3a4815de8..79411b0c5cb 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -132,7 +132,7 @@ typedef struct bGPDbrush {
        float fill_threshold;     /* factor for transparency */
        int   fill_simplylvl;     /* number of simplify steps */
        int   fill_draw_mode;     /* type of control lines drawing mode */
-       int   icon;               /* icon identifier */
+       int   icon_id;            /* icon identifier */
 
        int   lazy_radius;        /* distance to last point to create new point 
*/
        float lazy_factor;        /* factor of smooth */
diff --git a/source/blender/makesrna/intern/rna_scene.c 
b/source/blender/makesrna/intern/rna_scene.c
index 46db7851a1d..d718f7ff18a 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -743,7 +743,7 @@ static int gpencil_get_brush_icon(int type)
                        }
                }
                else {
-                       item_tmp.icon = gpencil_get_brush_icon(brush->icon);
+                       item_tmp.icon = gpencil_get_brush_icon(brush->icon_id);
                }
 
                RNA_enum_item_add(&item, &totitem, &item_tmp);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to