Merge branch 'blender-v3.1-release'

This commit is contained in:
Sergey Sharybin 2022-02-28 10:57:12 +01:00
commit 6f23401e98
4 changed files with 8 additions and 2 deletions

View File

@ -483,6 +483,10 @@ void deg_graph_node_tag_zero(Main *bmain,
if (comp_node->type == NodeType::ANIMATION) {
continue;
}
else if (comp_node->type == NodeType::COPY_ON_WRITE) {
id_node->is_cow_explicitly_tagged = true;
}
comp_node->tag_update(graph, update_source);
}
deg_graph_id_tag_legacy_compat(bmain, graph, id, (IDRecalcFlag)0, update_source);

View File

@ -107,6 +107,7 @@ class ImageEngine {
space->release_buffer(instance_data->image, image_buffer, lock);
ImageUser *iuser = space->get_image_user();
BKE_image_multiview_index(instance_data->image, iuser);
drawing_mode.cache_image(vedata, instance_data->image, iuser);
}

View File

@ -15,7 +15,7 @@ void main()
if (maskInvertStencil) {
mask.rgb = 1.0 - mask.rgb;
}
float mask_step = smoothstep(0, 3.0, mask.r + mask.g + mask.b);
float mask_step = smoothstep(0.0, 3.0, mask.r + mask.g + mask.b);
mask.rgb *= maskColor;
mask.a = mask_step * opacity;

View File

@ -53,6 +53,7 @@ static void update_curve_mask(CurveMaskCache *curve_mask_cache,
{
BLI_assert(curve_mask_cache->curve_mask != nullptr);
int offset = (int)floorf(diameter / 2.0f);
int clamped_radius = max_ff(radius, 1.0);
unsigned short *m = curve_mask_cache->curve_mask;
@ -76,7 +77,7 @@ static void update_curve_mask(CurveMaskCache *curve_mask_cache,
pixel_xy[1] = static_cast<float>(y) + aa_offset;
for (int j = 0; j < aa_samples; j++) {
const float len = len_v2v2(pixel_xy, bpos);
const int sample_index = min_ii((len / radius) * CurveSamplesBaseLen,
const int sample_index = min_ii((len / clamped_radius) * CurveSamplesBaseLen,
CurveSamplesLen - 1);
const float sample_weight = curve_mask_cache->sampled_curve[sample_index];