Commit Graph

3 Commits

Author SHA1 Message Date
Bastien Montagne 59d59006c4 GPv3: Implement EditMode Undo.
Relatively basic and straightforward implementation.

Further optimizations are possible (and needed), especially regarding
the handling of caches.

Notes:
* All drawings are stored in each undo step. This is needed (also for
  Reference drawings), in case some drawings are added, removed or
  re-ordered between undo steps.
* The whole tree of layers is copied as-is, using the C++ classes copy
  constructors, so they only handle what these constructors copy
  (noticeably, the `Layer` copy constructor does not currently handles
   masks?).
* The active layer pointer is stored and restored by its name.
* The layer customdata is also duplicated using standard `BKE_customdata`
  API.

Pull Request: https://projects.blender.org/blender/blender/pulls/117072
2024-02-15 10:19:52 +01:00
Hans Goudey d02d6ec4e5 Cleanup: Remove unnecessary keywords in C++ headers 2024-01-24 11:46:39 -05:00
Hans Goudey ca560cd15e Cleanup: Move BKE_undo_system.h to C++ 2024-01-15 12:44:13 -05:00