Page MenuHome

Fix T39196 dyntopo undo applied to the wrong mesh.
AbandonedPublic

Authored by Antonis Ryakiotakis (psy-fi) on Mar 21 2014, 3:46 PM.

Details

Summary

The cause here is simple:

Undoing nodes that do not belong to the current object will cause the
saved bmesh log entry to be reverted instead. This is easy to fix by
enforcing name matching (can be improved) between current object name
and dyntopo undo node name and deleting older entries similarly to how
edit mode works.

However there are complications. Deleting dyntopo entries in this way
can leave a brush stroke as first dyntopo log entry. This can present
issues if we attempt to delete that entry since it's deleted mesh
elements will get their ids (which would still be valid at the time)
released. This can result in crashing if we attempt to resculpt on the
mesh. To fix this I have disabled releasing the deleted entries.

It's still possible to somehow crash this however,
so I won't commit until I find the cause

Diff Detail

Branch
sculptdyntopofix

Event Timeline