Fix #117900: Sculpt mode doesn't clear face corner normals

In sculpt mode vertex and face normals are updated explicitly, but
corner normals, which are cached now, aren't updated for performance
reasons. This means that when the mesh is deformed, they need to be
cleared. See b339e3937d for some background on the complexity
of this area.
This commit is contained in:
Hans Goudey 2024-02-06 09:22:25 -05:00
parent 0baee63b85
commit 36f0ecb978
1 changed files with 2 additions and 0 deletions

View File

@ -5277,6 +5277,8 @@ void SCULPT_flush_update_step(bContext *C, SculptUpdateType update_flags)
* are trivial to access from the PBVH. Updating the object's evaluated geometry bounding
* box is necessary because sculpt strokes don't cause an object reevaluation. */
mesh->tag_positions_changed_no_normals();
/* Sculpt mode does node use or recalculate face corner normals, so they are cleared. */
mesh->runtime->corner_normals_cache.tag_dirty();
}
else {
/* Drawing happens from the modifier stack evaluation result.