Cleanup: Remove unnecessary conditional when restoring the mesh
The `SCULPT_BRUSH_TYPE_GRAB` and `SCULPT_BRUSH_TYPE_ELASTIC_DEFORM` types are already handled above the removed lines, generically, without checking for size pressure. This check of the if statement was effectively always false as it would never be encountered. Pull Request: https://projects.blender.org/blender/blender/pulls/146826
This commit is contained in:
@@ -5030,11 +5030,7 @@ static void restore_from_undo_step_if_necessary(const Depsgraph &depsgraph,
|
||||
}
|
||||
|
||||
/* Restore the mesh before continuing with anchored stroke. */
|
||||
if ((brush->flag & BRUSH_ANCHORED) ||
|
||||
(ELEM(brush->sculpt_brush_type, SCULPT_BRUSH_TYPE_GRAB, SCULPT_BRUSH_TYPE_ELASTIC_DEFORM) &&
|
||||
BKE_brush_use_size_pressure(brush)) ||
|
||||
(brush->flag & BRUSH_DRAG_DOT))
|
||||
{
|
||||
if (brush->flag & BRUSH_ANCHORED || brush->flag & BRUSH_DRAG_DOT) {
|
||||
|
||||
undo::restore_from_undo_step(depsgraph, sd, ob);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user