Fix undo overreach in various paint modes for #69760 and related. #117417

Open
Alexander Gavrilov wants to merge 1 commits from angavrilov/blender:pr-undo-fixes into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

1 Commits

Author SHA1 Message Date
Alexander Gavrilov 8ca49d2e3a Fix undo overreach in various paint modes for #69760 and related.
This tries to fix undo overreach on selection of vertex groups,
shape keys, uv maps, colors and attributes in various modes.

- The Vertex Paint mode is now a subtype of Sculpt, so it should
  use a sculpt undo step on entering the mode, and property changes
  shouldn't write undo steps.
- Sculpt undo modes were deliberately over-undoing color attribute
  selection changes for some reason.
- The Weight Paint mode uses memfile, so it should save steps
  for property changes, except for those excluded from undo,
  e.g. by bc0a6b0400.
- If a memfile undo step happens anyway for some reason in sculpt
  and vertex paint modes, immediately following property changes
  to object and mesh datablocks should also push to avoid over-undo
  if the immediately following scuplt step is reverted (unrelated
  ones like materials or scene seem safe).
2024-01-30 18:18:18 +02:00