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-06-28 15:24:23 +0300
committerAntonioya <blendergit@gmail.com>2019-06-28 15:24:23 +0300
commitdee6fe1441aeb875bcebb8c363ade4e2db4c888e (patch)
tree0931c86822e4df6670320c6e4b499daa778bd972
parent4f3f68df300539472264412f3b79e1024f70eb0d (diff)
GPencil: Rename "Clamp Layer" to "Mask Layer"
The old name was not meaning what this option does. Dtected while writting the manual.
-rw-r--r--release/scripts/startup/bl_ui/properties_data_gpencil.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py4
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py4
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c2
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c6
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.h4
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_blend_frag.glsl4
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c4
8 files changed, 16 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index 44a7990d570..de438050b69 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -137,8 +137,8 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel):
srow = col.row(align=True)
srow.prop(gpl, "opacity", text="Opacity", slider=True)
- srow.prop(gpl, "clamp_layer", text="",
- icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE')
+ srow.prop(gpl, "mask_layer", text="",
+ icon='MOD_MASK' if gpl.mask_layer else 'LAYER_ACTIVE')
srow = col.row(align=True)
srow.prop(gpl, "use_solo_mode", text="Show Only On Keyframed")
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 33d41da192b..112fb4361d6 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -902,8 +902,8 @@ class GPENCIL_UL_layer(UIList):
row.prop(gpl, "info", text="", emboss=False)
row = layout.row(align=True)
- row.prop(gpl, "clamp_layer", text="",
- icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE',
+ row.prop(gpl, "mask_layer", text="",
+ icon='MOD_MASK' if gpl.mask_layer else 'LAYER_ACTIVE',
emboss=False)
row.prop(gpl, "lock", text="", emboss=False)
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 35c4a5ec5a1..7afb417792c 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -120,8 +120,8 @@ class TOPBAR_PT_gpencil_layers(Panel):
srow = col.row(align=True)
srow.prop(gpl, "opacity", text="Opacity", slider=True)
- srow.prop(gpl, "clamp_layer", text="",
- icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE')
+ srow.prop(gpl, "mask_layer", text="",
+ icon='MOD_MASK' if gpl.mask_layer else 'LAYER_ACTIVE')
srow = col.row(align=True)
srow.prop(gpl, "use_solo_mode", text="Show Only On Keyframed")
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 {
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index a3ef539d0d5..b59e97f1991 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1435,11 +1435,11 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
prop, "Disallow Locked Materials Editing", "Avoids editing locked materials in the layer");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
- prop = RNA_def_property(srna, "clamp_layer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mask_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_USE_MASK);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(
- prop, "Clamp Layer", "Clamp any pixel outside underlying layers drawing");
+ prop, "Mask Layer", "Remove any pixel outside underlying layers drawing");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
/* solo mode: Only display frames with keyframe */