Cleanup: Perform cleanup on sculpt_automasking.cc #117651

Merged
Hans Goudey merged 4 commits from Sean-Kim/blender:cleanup-automask into main 2024-01-31 21:43:12 +01:00
2 changed files with 6 additions and 8 deletions
Showing only changes of commit 41c651d872 - Show all commits

View File

@ -204,9 +204,6 @@ static bool needs_factors_cache(const Sculpt *sd, const Brush *brush)
return true;
}
/* TODO: Unsure why the BRUSH_AUTOMASKING_VIEW_NORMAL mode requires a check against the
* propagation steps variable. This can probably be limited to checking if the brush itself
* exists. */
if (automasking_flags & BRUSH_AUTOMASKING_VIEW_NORMAL) {
return brush && brush->automasking_boundary_edges_propagation_steps != 1;
}
@ -822,6 +819,11 @@ bool tool_can_reuse_automask(int sculpt_tool)
SCULPT_TOOL_DRAW_FACE_SETS);
}
std::unique_ptr<Cache> cache_init(const Sculpt *sd, Object *ob)
{
return cache_init(sd, nullptr, ob);
}
std::unique_ptr<Cache> cache_init(const Sculpt *sd, const Brush *brush, Object *ob)
{
SculptSession *ss = ob->sculpt;

View File

@ -1290,12 +1290,8 @@ Cache *active_cache_get(SculptSession *ss);
*
* For automasking modes that cannot be calculated in real time,
* data is also stored at the vertex level prior to the stroke starting.
*
* \param sd: the sculpt tool
* \param brush: the brush being used (optional)
* \param ob: the object being operated on
* \return the automask cache
*/
std::unique_ptr<Cache> cache_init(const Sculpt *sd, Object *ob);
std::unique_ptr<Cache> cache_init(const Sculpt *sd, const Brush *brush, Object *ob);
void cache_free(Cache *automasking);