Proposal: Pressing undo never changes the active (Grease Pencil) tool
Proposal
While using Grease Pencil tools, pressing Undo never adjusts the active tool or mode by default.
A preferences option is added that allows users to choose whether they want the active tool to be adjusted while going back through the undo stack.
How it is now
Currently, in some cases, when you're undoing modifications to your grease pencil drawing, the active tool will change to the tool you were using at the current place in the undo stack.
To replicate:
- draw a grease pencil stroke.
- switch to sculpt>push mode and alter the stroke.
- press undo twice.
The active tool has changed from push to draw again. Here's a video showing what happens: youtube.com/watch
Non-standard
This behaviour is at odds with all other drawing painting programs I've used (including Photoshop, Flash/Animate, Toon Boom Harmony, TVPaint, Clip Studio Paint), and is extremely frustrating when it happens (for you too?). In all these other programs the active tool is independent of the undo stack, and doesn't change while undoing.
Here's a video demonstrating how it's arranged in photoshop for instance youtu.be/yBoxrgZVMj4
Inconsistency
This all said, the grease pencil tools do work as I expected (active tool not affected by undoing) when the tools that were used before undoing were all part of the same mode (e.g. drawing and erasing).
But currently when tools from different modes are used (e.g. push and draw), undoing those steps adjusts the active tool and mode.
For consistency this difference should be removed. I think the default, at least for Grease Pencil tools, should be that undo never adjusts the active tool or mode.
Scope
I don't use much of Blender apart form the Grease Pencil stuff. So I don't know whether the proposed change would make sense for tools/operations that don't relate to GP. Thoughts on that very welcome.
4 Comments
There's currently a grease pencil undo bug that's stopping the add-on from working correctly developer.blender.org/T79003
scroll down here for a version of this add on that seems to work (at least in a grease pencil context) it:
repeatedly executes an undo until the current tool hasn't changed (effectively: it undo's past any mode/tool changes, and then undos the next operation that was doing anything else)
it restores the mode & tool that was active before the operator was called.
cmd+Z
blenderartists.org/t/my-undo-wrapper-add-on-breaks-the-grease-pencil-ui-help-needed/1240787
This addon code gets close. Works as intended most of the time but occasionally it gets into a weird state after undoing where the interface shows that one tool is active, while another one is actually the active one (draw and push). Don't know why.
in the meantime i'd love to script a wrapper for undo that achieves the desired behaviour (active tool not affected by undoing) but this is a struggle so far. if anyone feels like giving me a hand that'd be fantastic!