diff options
author | Joseph Eagar <joeedh@gmail.com> | 2021-10-07 12:27:09 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2021-10-07 12:27:09 +0300 |
commit | 00bd631c7ccef79462f2904ecfb751d7b34ef91e (patch) | |
tree | b0d1c7b444395c603721607fd0d4455da4067958 /source/blender/editors/sculpt_paint | |
parent | eadbacdbb06ab1ea4b0c744c31959bdf2f41bc98 (diff) |
Fix mask expand not properly supporting
both inverse and keep mask modes being on
at the same time.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_expand.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c index 40874375772..34da7daed65 100644 --- a/source/blender/editors/sculpt_paint/sculpt_expand.c +++ b/source/blender/editors/sculpt_paint/sculpt_expand.c @@ -1243,7 +1243,12 @@ static void sculpt_expand_mask_update_task_cb(void *__restrict userdata, } if (expand_cache->preserve) { - new_mask = max_ff(new_mask, expand_cache->original_mask[vd.index]); + if (expand_cache->invert) { + new_mask = min_ff(new_mask, expand_cache->original_mask[vd.index]); + } + else { + new_mask = max_ff(new_mask, expand_cache->original_mask[vd.index]); + } } if (new_mask == initial_mask) { |