Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-03-09 18:27:24 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-03-09 18:27:24 +0300
commit29f3af95272590d26f610ae828b2eeee89c82a00 (patch)
treea696a58a2561c48f7ec6166e369e22081e0a64d8 /source/blender/editors/interface/interface_icons.c
parentdcb93126876879d969a30a7865700abd072066f8 (diff)
GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r--source/blender/editors/interface/interface_icons.c53
1 files changed, 52 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index c1018a67fb3..3e07023e52d 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -2050,7 +2050,10 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
}
/* reset the icon */
- if ((ob != NULL) && (ob->mode & OB_MODE_PAINT_GPENCIL) && (br->gpencil_settings != NULL)) {
+ if ((ob != NULL) &&
+ (ob->mode & (OB_MODE_PAINT_GPENCIL | OB_MODE_VERTEX_GPENCIL | OB_MODE_SCULPT_GPENCIL |
+ OB_MODE_WEIGHT_GPENCIL)) &&
+ (br->gpencil_settings != NULL)) {
switch (br->gpencil_settings->icon_id) {
case GP_BRUSH_ICON_PENCIL:
br->id.icon_id = ICON_GPBRUSH_PENCIL;
@@ -2088,6 +2091,54 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
case GP_BRUSH_ICON_ERASE_STROKE:
br->id.icon_id = ICON_GPBRUSH_ERASE_STROKE;
break;
+ case GP_BRUSH_ICON_TINT:
+ br->id.icon_id = ICON_BRUSH_TEXDRAW;
+ break;
+ case GP_BRUSH_ICON_VERTEX_DRAW:
+ br->id.icon_id = ICON_BRUSH_MIX;
+ break;
+ case GP_BRUSH_ICON_VERTEX_BLUR:
+ br->id.icon_id = ICON_BRUSH_BLUR;
+ break;
+ case GP_BRUSH_ICON_VERTEX_AVERAGE:
+ br->id.icon_id = ICON_BRUSH_BLUR;
+ break;
+ case GP_BRUSH_ICON_VERTEX_SMEAR:
+ br->id.icon_id = ICON_BRUSH_BLUR;
+ break;
+ case GP_BRUSH_ICON_VERTEX_REPLACE:
+ br->id.icon_id = ICON_BRUSH_MIX;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_SMOOTH:
+ br->id.icon_id = ICON_GPBRUSH_SMOOTH;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_THICKNESS:
+ br->id.icon_id = ICON_GPBRUSH_THICKNESS;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_STRENGTH:
+ br->id.icon_id = ICON_GPBRUSH_STRENGTH;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_RANDOMIZE:
+ br->id.icon_id = ICON_GPBRUSH_RANDOMIZE;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_GRAB:
+ br->id.icon_id = ICON_GPBRUSH_GRAB;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_PUSH:
+ br->id.icon_id = ICON_GPBRUSH_PUSH;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_TWIST:
+ br->id.icon_id = ICON_GPBRUSH_TWIST;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_PINCH:
+ br->id.icon_id = ICON_GPBRUSH_PINCH;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_CLONE:
+ br->id.icon_id = ICON_GPBRUSH_CLONE;
+ break;
+ case GP_BRUSH_ICON_GPBRUSH_WEIGHT:
+ br->id.icon_id = ICON_GPBRUSH_WEIGHT;
+ break;
default:
br->id.icon_id = ICON_GPBRUSH_PEN;
break;