Page MenuHome

WIP fix for T82388: Sculpt mode: Unexpected undo behavior.
ClosedPublic

Authored by Bastien Montagne (mont29) on Nov 9 2020, 12:47 PM.

Details

Summary

Main idea is that non-memfile first undo step should check into previous
memfile and tag the ID it is editing as future_changed.

That way, when we go back and undo to the memfile, said IDs are properly
detected as changed and re-read from the memfile.

Otherwise, undo system sees them as unchanged, and just re-use the
current data instead.

Diff Detail

Repository
rB Blender
Branch
T82388 (branched from master)
Build Status
Buildable 11196
Build 11196: arc lint + arc unit

Event Timeline

Bastien Montagne (mont29) requested review of this revision.Nov 9 2020, 12:47 PM
Bastien Montagne (mont29) created this revision.

rebased against latest master.

After discussion with Bastien this seems fine in the current design. It would be better if undo of switching modes was the same for all modes and the mechanism well documented, but that's beyond the scope of this bugfix.

source/blender/editors/undo/memfile_undo.c
314

This needs a comment explaining what the function does and why it needs to be used.

324–326

Remove debug print.

This revision is now accepted and ready to land.Nov 10 2020, 3:47 PM
  • Cleanup, rebase onto master and pass Object instead of context.