Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
This complicated handling of undo steps in a generic way
especially switching between undo systems that stored data to ones
that accumulated changes.
Now each undo system must treat it's steps as check-point,
internally it can apply/rewind changes.
This commit also fixes projection paint where the object mode wasn't
following the undo steps.
|
|
Useful for debugging.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Favour G_MAIN in functions that might free it.
|
|
Needed since we don't always have the context,
and avoids adding G_MAIN into undo callbacks.
|
|
Add the ability for undo steps to request memfile undo step added after
them, useful for mode switching, where we need the data to exist for
undo to enter the mode.
|
|
Currently names are used for edit-mode undo-steps,
any changes to Main ID names cause lookup failure (crashing).
This commit ensures any undo steps that use ID lookups have the same
mem-file undo state loaded that was used to encode the steps.
Renaming also has an undo push added (last commit).
|
|
|
|
Part of T60660
|
|
|
|
Apply steps between the active and the undo state being decoded.
|
|
That kind of implicit includes should really only be done when totally,
absolutely necessary, and ideally only with rather simple 'second-level'
headers.
Otherwise not being explicit with includes always end up biting in
unexpected ways...
|
|
That feature will not be ready (or at least, not tested enough) to be
officially part of 2.80 beta. So we disable it by default, hidding it
behind a startup option (`--enable-static-override`), and a python
app var (`bpy.app.use_static_override`).
That way, people who really want to play with it can do it easily, while
not exposing/enabling non-production-ready feature by default.
Note that underlying override code remains active, i.e. files we do have
overridden data-blocks will be loaded correctly according to static override.
|
|
|
|
|
|
|
|
Using accumulation undo type (eg painting)
as the first undo step, broke code which adds an initial memfile undo.
|
|
This includes making Eevee match Cycles behavior of inserting an emission
node when linking colors to closures.
|
|
For grouped undo we should not skip the undo push, rather replace the
previous undo push. This way undo goes back to the state after the last
operation in the group.
|
|
|
|
|
|
|
|
It's important edit-mode has a step stored for redo to work,
file load now ensures this in a generic way.
|
|
Caused sculpt to crash.
|
|
I.E. only enable auto-override for 'active' selected object when making
an override of a linked group. This will ease on auto-override creation,
and you typically do not want to auto-override most objects in the group
anyway (in proxy system, you could only proxyfy one object of the group
anyaway!).
|
|
|
|
Error in 651b8fb14e caused de-duplication to fail.
|
|
Got lost in big undo refactor.
Note that this is probably (maybe) not how we want to have it in the
end, things like EditMode undo should probably not trigger this check?
|
|
|
|
Also improve logging
|
|
|
|
Was testing with small number of items, so this went unnoticed.
|
|
Add versions of add/lookup that check the previous item.
|
|
|
|
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
undo data is restored.
- Some undo types accumulate changes (image & text editing)
others store the state multiple times (with de-duplication).
This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
manage restoring correct ID's.
Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
Previously this wasn't done, making history fail in some cases.
This can be optimized to skip some combinations of undo steps.
grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.
See D3113
|