diff options
author | Antonioya <blendergit@gmail.com> | 2019-06-28 15:24:23 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-06-28 15:24:23 +0300 |
commit | dee6fe1441aeb875bcebb8c363ade4e2db4c888e (patch) | |
tree | 0931c86822e4df6670320c6e4b499daa778bd972 /source/blender/draw/engines/gpencil | |
parent | 4f3f68df300539472264412f3b79e1024f70eb0d (diff) |
GPencil: Rename "Clamp Layer" to "Mask Layer"
The old name was not meaning what this option does. Dtected while writting the manual.
Diffstat (limited to 'source/blender/draw/engines/gpencil')
4 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 13b17af8f76..97d2d3393a9 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -1827,7 +1827,7 @@ static void gpencil_shgroups_create(GPENCIL_e_data *e_data, if ((shgrp != NULL) && (tag_first)) { array_elm = &cache_ob->shgrp_array[idx]; array_elm->mode = idx == 0 ? eGplBlendMode_Regular : gpl->blend_mode; - array_elm->clamp_layer = gpl->flag & GP_LAYER_USE_MASK; + array_elm->mask_layer = gpl->flag & GP_LAYER_USE_MASK; array_elm->blend_opacity = gpl->opacity; array_elm->init_shgrp = shgrp; cache_ob->tot_layers++; diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index b4c015b8527..e5dadba9bdc 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -549,7 +549,7 @@ void GPENCIL_cache_init(void *vedata) DRW_shgroup_uniform_texture_ref(blend_shgrp, "blendColor", &stl->g_data->temp_color_tx_fx); DRW_shgroup_uniform_texture_ref(blend_shgrp, "blendDepth", &stl->g_data->temp_depth_tx_fx); DRW_shgroup_uniform_int(blend_shgrp, "mode", &stl->storage->blend_mode, 1); - DRW_shgroup_uniform_int(blend_shgrp, "clamp_layer", &stl->storage->clamp_layer, 1); + DRW_shgroup_uniform_int(blend_shgrp, "mask_layer", &stl->storage->mask_layer, 1); DRW_shgroup_uniform_int(mix_shgrp, "tonemapping", &stl->storage->tonemapping, 1); /* create effects passes */ @@ -1043,7 +1043,7 @@ void GPENCIL_draw_scene(void *ved) array_elm = &cache_ob->shgrp_array[e]; if (((array_elm->mode == eGplBlendMode_Regular) && (!use_blend) && - (!array_elm->clamp_layer)) || + (!array_elm->mask_layer)) || (e == 0)) { if (init_shgrp == NULL) { init_shgrp = array_elm->init_shgrp; @@ -1069,7 +1069,7 @@ void GPENCIL_draw_scene(void *ved) GPU_framebuffer_bind(fbl->temp_fb_b); GPU_framebuffer_clear_color_depth_stencil(fbl->temp_fb_b, clearcol, 1.0f, 0x0); stl->storage->blend_mode = array_elm->mode; - stl->storage->clamp_layer = (int)array_elm->clamp_layer; + stl->storage->mask_layer = (int)array_elm->mask_layer; stl->storage->tonemapping = DRW_state_do_color_management() ? 0 : 1; DRW_draw_pass(psl->blend_pass); stl->storage->tonemapping = 0; diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h index 416331e7aeb..d84bdfd8f2c 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.h +++ b/source/blender/draw/engines/gpencil/gpencil_engine.h @@ -70,7 +70,7 @@ typedef struct tGPencilObjectCache_shgrp { /** type of blend (regular, add, mult, etc...) */ int mode; /** flag to enable the layer clamping */ - bool clamp_layer; + bool mask_layer; /** factor to define the opacity of the layer */ float blend_opacity; DRWShadingGroup *init_shgrp; @@ -171,7 +171,7 @@ typedef struct GPENCIL_Storage { short framebuffer_flag; /* flag what framebuffer need to create */ int blend_mode; - int clamp_layer; + int mask_layer; /* simplify settings*/ bool simplify_fill; 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 b70a55b51fa..85dee4390a5 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl @@ -7,7 +7,7 @@ uniform sampler2D strokeDepth; uniform sampler2D blendColor; uniform sampler2D blendDepth; uniform int mode; -uniform int clamp_layer; +uniform int mask_layer; uniform int tonemapping; #define ON 1 @@ -142,7 +142,7 @@ void main() gl_FragDepth = min(stroke_depth, mix_depth); } else { - if (clamp_layer == ON) { + if (mask_layer == ON) { discard; } else { |