Fix #141247: Assert while using sculpt filter tools

Introduced with 906a27bdb2

Pull Request: https://projects.blender.org/blender/blender/pulls/141248
This commit is contained in:
Sean Kim
2025-07-01 01:51:32 +02:00
committed by Sean Kim
parent 2a1ad5bf6c
commit c45727c9d0
3 changed files with 9 additions and 3 deletions

View File

@@ -2431,7 +2431,9 @@ static wmOperatorStatus sculpt_cloth_filter_invoke(bContext *C,
RNA_float_get(op->ptr, "area_normal_radius"),
RNA_float_get(op->ptr, "strength"));
auto_mask::filter_cache_ensure(*depsgraph, sd, ob);
if (auto_mask::is_enabled(sd, ob, nullptr)) {
auto_mask::filter_cache_ensure(*depsgraph, sd, ob);
}
const float cloth_mass = RNA_float_get(op->ptr, "cloth_mass");
const float cloth_damping = RNA_float_get(op->ptr, "cloth_damping");

View File

@@ -509,7 +509,9 @@ static int sculpt_color_filter_init(bContext *C, wmOperator *op)
const SculptSession &ss = *ob.sculpt;
filter::Cache *filter_cache = ss.filter_cache;
filter_cache->active_face_set = SCULPT_FACE_SET_NONE;
auto_mask::filter_cache_ensure(*depsgraph, sd, ob);
if (auto_mask::is_enabled(sd, ob, nullptr)) {
auto_mask::filter_cache_ensure(*depsgraph, sd, ob);
}
return OPERATOR_PASS_THROUGH;
}

View File

@@ -2439,7 +2439,9 @@ static wmOperatorStatus sculpt_mesh_filter_start(bContext *C, wmOperator *op)
filter::Cache *filter_cache = ss.filter_cache;
filter_cache->active_face_set = SCULPT_FACE_SET_NONE;
auto_mask::filter_cache_ensure(*depsgraph, sd, ob);
if (auto_mask::is_enabled(sd, ob, nullptr)) {
auto_mask::filter_cache_ensure(*depsgraph, sd, ob);
}
sculpt_filter_specific_init(*depsgraph, filter_type, op, ob);