Age | Commit message (Collapse) | Author |
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
This was included for `FILE *` which isn't used in the header.
Ref D10799
|
|
|
|
|
|
|
|
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values
everywhere.
Note that this also introduce the `STEP_INVALID` value in that enum.
Finally, kept the matching struct members in some lower-level readfile
code as an `int` to avoid having to include `BKE_undo_system.h` in a lot
of unrelated files.
|
|
Now we only use 'undo' or 'redo' in function names when the direction is
clear (and we assert about it). Otherwise, use 'load' instead.
When passing an undo step to BKE functions, consider calling code has
done its work and is actually passing the target step (i.e. the final
step intended to be loaded), instead of assuming we have to load the
step before/after it.
Also deduplicate and simplify a lot of core undo code in BKE, now
`BKE_undosys_step_load_data_ex` is the only place where all the complex
logic of undo/redo loop (to handle several steps in a row) is placed. We also
only use a single loop there, instead of the two existing ones in
previous code.
Note that here we consider that when we are loading the current active
step, we are undoing. This makes sense in that doing so //may// undo
some changes (ideally it should never do so), but should never, ever
redo anything.
`BKE_undosys_step_load_from_index` also gets heavily simplified, it's
not basically a shallow wrapper around
`BKE_undosys_step_load_from_index`.
And some general update of variable names, commenting, etc.
Part of T83806.
Differential Revision: https://developer.blender.org/D10227
|
|
|
|
* Simplify and clarify logic in `BKE_undosys_step_undo/redo_with_data_ex`,
by adding early return on invalid situations, renaming some variables,
and adding comments.
* Add more sanity checks in those functions.
No behavioral change are expected here, besides in potential edge-case,
invalid situations.
This is a preliminary change, before some deeper modifications of
`BKE_undosys` undo/redo API.
Differential Revision: https://developer.blender.org/D10033
|
|
Also added `undosys_stack_validate` debug check to redo case.
|
|
|
|
We will soon need more options here, sinmpler and cleaner to use a
bitflag then.
|
|
Rename it to mark it is only for `encode` callbacks, fix `encode`
callback of text undo to early fail in case it gets a NULL context, add
an assert to `BKE_undosys_step_push_with_type` that context is not NULL
when undotype requires a valid one.
Note that in practice this should not change anything, currently it
seems that we always get a valid context in
`BKE_undosys_step_push_with_type`?
|
|
Having a centeral place to find a list of all library overrides should be
useful for managing production scenes where library overrides are used a lot.
This change adds the individually overridden properties of a data-block under
the data-block itself. Just how we show modifiers, constraints or pose channels
there. This way we can also expose library override operations/options better
in future.
There's also a filter option for the library overrides now, so they can be
hidden. It is only available in the View Layer display mode though, like the
other filter options.
One internal change this has to do is adding more informative return values to
undo pushes and the library override functions called by it. That way we can
send a notifier when library overrides change for the Outliner to know when to
rebuild the tree.
Differential Revision: https://developer.blender.org/D7631
Reviewed by: Andy Goralczyk, Bastien Montagne, William Reynish
|
|
|
|
Non-memfile undo steps never properly initialized the flag allowing to
re-use old Main data during undo/redo. This lead to doing a complete
full re-reading of data when undoing/redoing mode switches e.g.
Note that current undo system is supposed to support any kind of mode
switch across those steps, however this needs to be properly deeply
tested, so only comitting this to master. It would be way too risky for
2.91 release.
|
|
|
|
This adds support for treating multiple undo steps as a single step
from the user perspective.
This is needed for outliner mode switching and `object.switch_object`
operator which change active object and mode in a single action.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.
No functional changes.
|
|
Code is mature enough now to not need this anymore, people who do not
want to use liboverrides can just not create them.
|
|
|
|
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
Helps identifying who is what in debugger...
|
|
Ref D7274
|
|
|
|
|
|
pqrt of T72604.
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Also correct some outdated symbol references,
add missing 'name' commands.
|
|
The rest of this function uses G_MAIN, so do the same.
|
|
|
|
Removing this since it was added for TexFace support
which has since been removed.
|
|
|
|
Correct fix that doesn't cause T67217.
Temporarily removing the excluded undo step broke memfile-undo
since freeing the undo steps needs to access other steps in
the list to merge shared chunks, see: memfile_undosys_step_free.
Pass the exclude step as an argument instead.
|
|
This reverts commit c635663e4a8169f68010b9234fa60f17ad03d7cb. This is causing
crashes with sculpt mode and object mode switching.
Fixes T67217.
|
|
Caused by error keeping the first memfile undo step.
|
|
This is needed step out of undo steps which accumulate changes,
larger changes could be made to handle this but better not
make them at this point.
|
|
Simplifies making further changes.
|
|
|
|
Better to make internal code naming match official/UI naming to some
extent, this will reduce confusion in the future.
This is 'breaking' scripts and files that would use that feature, but
since it is not yet officially supported nor exposed in 2.80, as far
as that release is concerned, it is effectively
a 'no functional changes' commit.
|
|
Issue introduced on b7eba20236ca.
I'm surprised it compiled elsewhere, but in Linux at least this fix was
required.
|
|
This patch updates the polling that enable/disables Edit Menu items. Slight Undo History menu changes
Differential Revision: https://developer.blender.org/D4846
Reviewed by Brecht Van Lommel
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|