[Bf-funboard] "Undo" to Saved moment.
davidj at gmail.com
Mon Dec 4 04:45:19 CET 2017
Correct. If you undo back to a previously saved state, blender does not
return the file to the "unmodified" state (i.e. remove the "*" which
indicates the file is modified)
Can you explain the user-workflow you want to enable and why it's important
Today, if you want to return to the previously saved state, you can do this
in Blender with "File -> Revert". The two drawbacks of using revert are
(a) it takes longer to reload the file, and (b) it will revert everything,
including your view-changes, camera pivots, etc.
Like many things in Blender, allowing undo to clear the "modified (*)"
indicator when it reaches the previously saved state is not a "simple thing
to fix". In-part because the Blender undo stack does not undo all savable
operations. It also might not be as useful as you think if it were added to
For example, changing any bit of blender's UI layout, including which
screen layout you are on, or moving any of the screen layout sliders, or
even scrubbing the timeline is a "modification" which will be saved and
marks the file as modified (*). However, these "view change" operations are
intentionally not in the undo stack, which is reserved for "content"
This creates two bits of complexity.
(1) In order for blender undo to properly clear the "modified" flag, it
would need two modified flags... content_modified, and view_modified. The
undo stack would obviously also need to track the last saved undo frame.
This way, if you performed an undo to the last saved undo frame, blender
could check if the "view_modified" bit was clear, and if so, then (and only
then) it could remove the modified flag (*).
(2) If, however, you performed an undo back to the last_saved_undo_frame
and the view_modified bit was set, then it would have no choice but to
leave the file modified indicator (*) shown, because it knows the view is
modified, but there is no undo stack to return the view to it's unmodified
state (or to know what those modifications are).
This doesn't sound terribly complex, but because of (2), using the feature
would be highly unreliable.
The user-workflow I assume you want to enable is "undo back to the
previously saved state (where the asterisk disappears)". However, in
blender, there might not be such a state, because you may have performed a
view modification that isn't in the undo stack. To users, this would be
reported as the bug "sometimes pressing undo does not return you to an
unmodified state (with asterisk removed)".
If you really want pressing undo to always return you to an "unmodified"
state, the only way I can see to do it would be to create two different
modification indicators, one for "content (undo stack)" modifications, and
one for "view change" modifications. For example, (*) could mean content
change, and (^) could mean view-state change. If you changed both (as
usually happens), you would see (*^) in the title bar. If you pressed undo
and returned to a previously saved state, but the view config was changed,
you would still see (^).
This doesn't sound horrible... though I don't know of any other application
that does it.. so it's kind of non-standard.
More information about the Bf-funboard