Sculpt: fix shift-smooth strength option
Finally fixed the last of what turned out to be many bugs that were causing it to be ignored.
This commit is contained in:
parent
4e2a5c5562
commit
2d541b2e39
|
@ -1537,11 +1537,11 @@ void BKE_builtin_apply_hard_edge_mode(BrushChannelSet *chset, bool do_apply)
|
|||
}
|
||||
}
|
||||
|
||||
void BKE_builtin_commandlist_create(Brush *brush,
|
||||
BrushChannelSet *chset,
|
||||
BrushCommandList *cl,
|
||||
int tool,
|
||||
BrushMappingData *mapdata)
|
||||
ATTR_NO_OPT void BKE_builtin_commandlist_create(Brush *brush,
|
||||
BrushChannelSet *chset,
|
||||
BrushCommandList *cl,
|
||||
int tool,
|
||||
BrushMappingData *mapdata)
|
||||
{
|
||||
BrushCommand *cmd;
|
||||
BrushChannel *ch;
|
||||
|
@ -1560,9 +1560,8 @@ void BKE_builtin_commandlist_create(Brush *brush,
|
|||
|
||||
float radius = BKE_brush_channelset_get_float(chset, "radius", NULL);
|
||||
|
||||
bool no_autosmooth = ELEM(
|
||||
brush->sculpt_tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_MASK);
|
||||
bool no_rake = ELEM(brush->sculpt_tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_MASK);
|
||||
bool no_autosmooth = ELEM(tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_MASK);
|
||||
bool no_rake = ELEM(tool, SCULPT_TOOL_BOUNDARY, SCULPT_TOOL_MASK);
|
||||
;
|
||||
|
||||
/* build autosmooth command */
|
||||
|
|
|
@ -8726,6 +8726,11 @@ void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSettings
|
|||
|
||||
ok = ok && !(brush->flag & (BRUSH_ANCHORED | BRUSH_DRAG_DOT));
|
||||
|
||||
if (ss->cache->alt_smooth && brush->sculpt_tool == SCULPT_TOOL_SMOOTH) {
|
||||
float factor = BRUSHSET_GET_FLOAT(ss->cache->channels_final, smooth_strength_factor, NULL);
|
||||
BRUSHSET_SET_FLOAT(ss->cache->channels_final, strength, factor);
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
if (SCULPT_stroke_is_first_brush_step(ss->cache)) {
|
||||
if (ss->cache->commandlist) {
|
||||
|
@ -8734,11 +8739,6 @@ void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSettings
|
|||
|
||||
BrushCommandList *list = ss->cache->commandlist = BKE_brush_commandlist_create();
|
||||
|
||||
if (ss->cache->alt_smooth && brush->sculpt_tool == SCULPT_TOOL_SMOOTH) {
|
||||
float factor = BRUSHSET_GET_FLOAT(ss->cache->channels_final, smooth_strength_factor, NULL);
|
||||
BRUSHSET_SET_FLOAT(ss->cache->channels_final, strength, factor);
|
||||
}
|
||||
|
||||
BKE_builtin_commandlist_create(
|
||||
brush, ss->cache->channels_final, list, brush->sculpt_tool, &ss->cache->input_mapping);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue