GPencil: Rename "Clamp Layer" to "Mask Layer"
The old name was not meaning what this option does. Dtected while writting the manual.
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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++;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user