Page MenuHome

Fix T95843: Invalid mesh runtime data after sculpt undo
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Mar 8 2022, 6:40 PM.

Details

Summary

When the geometry of the sculpt mesh was replaced when restoring from
a full undo step, the runtime data was not cleared (including any
normals, triangulation data, or any other cached derived data).
In the report, only the invalid normals were observed.

The fix is to simply clear these caches. Later they will be reallocated
and recalculated if necessary. Since the whole mesh replaced here
anyway, this should be a safe fix.

Diff Detail

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Mar 8 2022, 6:40 PM
Hans Goudey (HooglyBoogly) created this revision.

Looks fine to me, also could not find issues in testing.

Since the change is simple and we've both tested it, I'll commit this to the 3.1 branch.

This revision is now accepted and ready to land.Mar 8 2022, 7:15 PM