diff options
-rw-r--r-- | source/blender/blenkernel/intern/mask_rasterize.c | 14 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c index 7b84abc3d36..2fe1ffaae9e 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.c +++ b/source/blender/blenkernel/intern/mask_rasterize.c @@ -499,10 +499,10 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas unsigned int sf_vert_tot = 0; unsigned int tot_feather_quads = 0; - if (masklay->restrictflag & MASK_RESTRICT_RENDER || masklay->alpha == 0.0f) { - MaskRasterLayer *layer = &mr_handle->layers[masklay_index]; - layer_bucket_init_dummy(layer); - layer->alpha = 0.0f; /* signal to skip this layer */ + if (masklay->restrictflag & MASK_RESTRICT_RENDER) { + /* skip the layer */ + mr_handle->layers_tot--; + masklay_index--; continue; } @@ -1002,11 +1002,7 @@ float BKE_maskrasterize_handle_sample(MaskRasterHandle *mr_handle, const float x float value_layer; /* also used as signal for unused layer (when render is disabled) */ - if (layer->alpha == 0.0f) { - continue; - } - - if (BLI_in_rctf_v(&layer->bounds, xy)) { + if (layer->alpha != 0.0f && BLI_in_rctf_v(&layer->bounds, xy)) { value_layer = 1.0f - layer_bucket_depth_from_xy(layer, xy); switch (layer->falloff) { diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 8832f32f43d..4702253140a 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2248,7 +2248,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe uiBlockSetEmboss(block, UI_EMBOSSN); row = uiLayoutRow(split, TRUE); - uiItemR(row, itemptr, "alpha", 0, "", ICON_NONE); // enable when used + uiItemR(row, itemptr, "alpha", 0, "", ICON_NONE); uiItemR(row, itemptr, "hide", 0, "", 0); uiItemR(row, itemptr, "hide_select", 0, "", 0); uiItemR(row, itemptr, "hide_render", 0, "", 0); |