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:
authorAntonioya <blendergit@gmail.com>2019-05-30 13:15:41 +0300
committerAntonioya <blendergit@gmail.com>2019-05-30 14:23:26 +0300
commit0f8746e724f981c298e4a7c751759e75b0fe6d4c (patch)
tree82bb370b619de260389b4f554ea031a2128f0e6e
parent1cb74768c12b0cd668f88af4ad8fe1598a5d44e9 (diff)
GPencil: Rename Blend mode "Normal" to "Regular"
The UI used "Regular" already, but internally the code didn't.
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c16
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c2
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl6
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
5 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 8c318f66169..4718985d1c8 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -242,7 +242,7 @@ static void DRW_gpencil_recalc_geometry_caches(Object *ob,
if ((gps->tot_triangles == 0) || (gps->triangles == NULL)) {
if ((gps->totpoints > 2) &&
((gp_style->fill_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH) || (gp_style->fill_style > 0) ||
- (gpl->blend_mode != eGplBlendMode_Normal))) {
+ (gpl->blend_mode != eGplBlendMode_Regular))) {
DRW_gpencil_triangulate_stroke_fill(ob, gps);
}
}
@@ -819,7 +819,7 @@ static void gpencil_add_fill_vertexdata(GpencilBatchCache *cache,
interp_v3_v3v3(tfill, gps->runtime.tmp_fill_rgba, tintcolor, tintcolor[3]);
tfill[3] = gps->runtime.tmp_fill_rgba[3] * opacity;
if ((tfill[3] > GPENCIL_ALPHA_OPACITY_THRESH) || (gp_style->fill_style > 0) ||
- (gpl->blend_mode != eGplBlendMode_Normal)) {
+ (gpl->blend_mode != eGplBlendMode_Regular)) {
if (cache->is_dirty) {
const float *color;
if (!onion) {
@@ -1078,7 +1078,7 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache,
(scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_REMOVE_FILL_LINE)) {
if ((gp_style->fill_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH) ||
(gp_style->fill_style > GP_STYLE_FILL_STYLE_SOLID) ||
- (gpl->blend_mode != eGplBlendMode_Normal)) {
+ (gpl->blend_mode != eGplBlendMode_Regular)) {
GP_SET_SRC_GPS(src_gps);
continue;
}
@@ -1099,7 +1099,7 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache,
}
/* hide any blend layer */
- if ((!stl->storage->simplify_blend) || (gpl->blend_mode == eGplBlendMode_Normal)) {
+ if ((!stl->storage->simplify_blend) || (gpl->blend_mode == eGplBlendMode_Regular)) {
/* fill */
if ((gp_style->flag & GP_STYLE_FILL_SHOW) && (!stl->storage->simplify_fill) &&
((gps->flag & GP_STROKE_NOFILL) == 0)) {
@@ -1110,7 +1110,7 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache,
/* No fill strokes, must show stroke always */
if (((gp_style->flag & GP_STYLE_STROKE_SHOW) || (gps->flag & GP_STROKE_NOFILL)) &&
((gp_style->stroke_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH) ||
- (gpl->blend_mode == eGplBlendMode_Normal))) {
+ (gpl->blend_mode == eGplBlendMode_Regular))) {
/* recalc strokes uv (geometry can be changed by modifiers) */
if (gps->flag & GP_STROKE_RECALC_GEOMETRY) {
ED_gpencil_calc_stroke_uv(ob, gps);
@@ -1686,7 +1686,7 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data,
else {
if (elm->gpl != gpl_prev) {
/* first layer is always blend Normal */
- array_elm->mode = idx == 0 ? eGplBlendMode_Normal : gpl->blend_mode;
+ array_elm->mode = idx == 0 ? eGplBlendMode_Regular : gpl->blend_mode;
array_elm->end_shgrp = shgrp;
gpl_prev = elm->gpl;
tag_first = true;
@@ -1830,7 +1830,7 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data,
/* save first group */
if ((shgrp != NULL) && (tag_first)) {
array_elm = &cache_ob->shgrp_array[idx];
- array_elm->mode = idx == 0 ? eGplBlendMode_Normal : gpl->blend_mode;
+ array_elm->mode = idx == 0 ? eGplBlendMode_Regular : gpl->blend_mode;
array_elm->clamp_layer = gpl->flag & GP_LAYER_USE_MASK;
array_elm->blend_opacity = gpl->opacity;
array_elm->init_shgrp = shgrp;
@@ -1842,7 +1842,7 @@ static void DRW_gpencil_shgroups_create(GPENCIL_e_data *e_data,
/* save last group */
if (shgrp != NULL) {
- array_elm->mode = idx == 0 ? eGplBlendMode_Normal : gpl->blend_mode;
+ array_elm->mode = idx == 0 ? eGplBlendMode_Regular : gpl->blend_mode;
array_elm->end_shgrp = shgrp;
}
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 5a8c36d7b8a..6bcffe3fb9f 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -950,7 +950,7 @@ void GPENCIL_draw_scene(void *ved)
bool is_last = (e == cache_ob->tot_layers - 1) ? true : false;
array_elm = &cache_ob->shgrp_array[e];
- if (((array_elm->mode == eGplBlendMode_Normal) && (!use_blend) &&
+ if (((array_elm->mode == eGplBlendMode_Regular) && (!use_blend) &&
(!array_elm->clamp_layer)) ||
(e == 0)) {
if (init_shgrp == NULL) {
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl
index 73aed062cf1..757acec03e1 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl
@@ -14,7 +14,7 @@ uniform int tonemapping;
#define ON 1
#define OFF 0
-#define MODE_NORMAL 0
+#define MODE_REGULAR 0
#define MODE_OVERLAY 1
#define MODE_ADD 2
#define MODE_SUB 3
@@ -111,8 +111,8 @@ void main()
vec4 mix_color = texelFetch(blendColor, uv, 0).rgba;
float mix_depth = texelFetch(blendDepth, uv, 0).r;
- /* Normal mode */
- if (mode == MODE_NORMAL) {
+ /* Default mode */
+ if (mode == MODE_REGULAR) {
if (stroke_color.a > 0) {
if (mix_color.a > 0) {
FragColor = vec4(mix(stroke_color.rgb, mix_color.rgb, mix_color.a), stroke_color.a);
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index c0d3c1ab3d5..5a32f9bc23c 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -397,7 +397,7 @@ typedef enum eGPDlayer_OnionFlag {
/* layer blend_mode */
typedef enum eGPLayerBlendModes {
- eGplBlendMode_Normal = 0,
+ eGplBlendMode_Regular = 0,
eGplBlendMode_Overlay = 1,
eGplBlendMode_Add = 2,
eGplBlendMode_Subtract = 3,
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index f00921bf072..925588e8ea6 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -113,7 +113,7 @@ static const EnumPropertyItem rna_enum_gplayer_move_type_items[] = {
};
static const EnumPropertyItem rna_enum_layer_blend_modes_items[] = {
- {eGplBlendMode_Normal, "NORMAL", 0, "Regular", ""},
+ {eGplBlendMode_Regular, "REGULAR", 0, "Regular", ""},
{eGplBlendMode_Overlay, "OVERLAY", 0, "Overlay", ""},
{eGplBlendMode_Add, "ADD", 0, "Add", ""},
{eGplBlendMode_Subtract, "SUBTRACT", 0, "Subtract", ""},