← All ideas
  • Published 22 Jun 2023

New Undo::ed.undo_enable(), ed.undo_disable(), and History

Recently, I'm developing a new addon about Curve Color Override. I found that Blender only offers ed.undo() and ed.redo(). There are no other functions to write more complex mechanisms. Therefore, I have to write a new undo addon to track the undo history. The current issues:

  1. bpy.context.window_manager.operators stores the operator's history, but it will be empty when users call ed.undo(). It's hard to track the history.
  2. Blender must append ed.undo_enable() and ed.undo_disable() to allow developers to control the state of the undo feature. Sometimes, our add-ons require avoiding the undo feature.
  3. Blender should keep the undo history trackable. We call ed.undo() and we lose the history. For example, blender offers "bpy.context.window_manager.history".
  4. bl_options = {"UNDO"} might not work for complex add-ons. The undo feature works uncorrectly. It can't undo importing scripts. In this case, we need to ed.undo_appendUndoOperator(my_undo_function).
100%

Development Status: Open

Upvote 1 Downvote 0
Tony-Huang
22 Jun 2023

0 Comments