Fix T48897: Flatten brush fails on first stroke

The flatten brush depended on accumulate being disabled,
Adding dynotopo support for accumulate caused problems for this tool (see T44390).
Enable for existing files.
This commit is contained in:
Campbell Barton 2016-07-20 13:54:55 +10:00
parent f2fa73786b
commit 690063edb9
Notes: blender-bot 2023-02-14 07:44:27 +01:00
Referenced by issue #48897,  Flatten sculpt brush not flatten in the first stroke
2 changed files with 11 additions and 0 deletions

View File

@ -1225,5 +1225,11 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
for (Brush *br = main->brush.first; br; br = br->id.next) {
if (br->sculpt_tool == SCULPT_TOOL_FLATTEN) {
br->flag |= BRUSH_ACCUMULATE;
}
}
}
}

View File

@ -256,6 +256,11 @@ void BLO_update_defaults_startup_blend(Main *bmain)
if (br) {
br->alpha = 1.0f;
}
br = (Brush *)BKE_libblock_find_name_ex(bmain, ID_BR, "Flatten/Contrast");
if (br) {
br->flag |= BRUSH_ACCUMULATE;
}
}
}