Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-24Cleanup: remove stdio.h header from MEM_guardedalloc.hCampbell Barton
This was included for `FILE *` which isn't used in the header. Ref D10799
2021-02-26Undo: don't log an error when the undo limit has been exceededCampbell Barton
2021-02-09Cleanup: comments, replace 'undoes' with 'undo-steps'Campbell Barton
2021-02-09Cleanup: spellingCampbell Barton
2021-02-05Cleanup/refactor: Undosys: Get rid of the magic values for undo direction.Bastien Montagne
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.
2021-02-03BKE UndoSys refactor: deduplicate and simplify code, sanitize naming.Bastien Montagne
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
2021-01-25Cleanup: spellingCampbell Barton
2021-01-12UndoSys: Refactor step 1: cleanup and simplify logic in main undo/redo handlers.Bastien Montagne
* 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
2021-01-07UndoSystem: Early out from core undo/redo handlers when undo step is NULL.Bastien Montagne
Also added `undosys_stack_validate` debug check to redo case.
2021-01-07Cleanup: Undo system: minor simplification in non-debug code.Bastien Montagne
2021-01-06UndoType: Refactor: replace `use_context` boolean by a bitflag.Bastien Montagne
We will soon need more options here, sinmpler and cleaner to use a bitflag then.
2021-01-06Cleanup/refactor: UndoType: Clarify `use_context` variable.Bastien Montagne
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`?
2020-12-28UI: List library overrides in the OutlinerJulian Eisel
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
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-10-30Fix undo steps not allowing re-using old BMain in non-global undo.Bastien Montagne
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.
2020-10-30Cleanup: malformed doxygen sectionsCampbell Barton
2020-10-30Undo System: support for grouping steps with begin/end callsCampbell Barton
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.
2020-08-07Cleanup: Blenkernel, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
2020-07-13LibOverride: Cleanup: Remove option to disable library overrides.Bastien Montagne
Code is mature enough now to not need this anymore, people who do not want to use liboverrides can just not create them.
2020-05-14Fix sculpt/paint missing undo-step limitingCampbell Barton
2020-05-11Fix T76642: Incorrect behavior limiting undo stepsCampbell Barton
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
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
2020-04-02add memory address to undo steps print.Bastien Montagne
Helps identifying who is what in debugger...
2020-03-30Fix undo debug logging not printing all types of undo pushesBrecht Van Lommel
Ref D7274
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-17Cleanup: minor changes.Bastien Montagne
2020-02-10Cleanup: Rename `BKE_library_override_` functions to `BKE_lib_override_library_`Bastien Montagne
pqrt of T72604.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
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.
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-09-11Fix T69754: crash in sculpting after library overrides were enabledBrecht Van Lommel
The rest of this function uses G_MAIN, so do the same.
2019-08-22LibOverride: Cleanup: tget rid of G.main usage when we can get it from context.Bastien Montagne
2019-07-28Cleanup: remove unused ID-map undo APICampbell Barton
Removing this since it was added for TexFace support which has since been removed.
2019-07-26Fix T67256: Add object redo duplicates, after exiting sculpt modeCampbell Barton
2019-07-23Fix T67040: Undo crashes after renamingCampbell Barton
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.
2019-07-21Revert "Fix T67040: Undo crashes after renaming"Brecht Van Lommel
This reverts commit c635663e4a8169f68010b9234fa60f17ad03d7cb. This is causing crashes with sculpt mode and object mode switching. Fixes T67217.
2019-07-16Fix T67040: Undo crashes after renamingCampbell Barton
Caused by error keeping the first memfile undo step.
2019-07-11Undo System: add is_final argument (no functional changes)Campbell Barton
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.
2019-07-11Cleanup: avoid recursion for undo/redo step skippingCampbell Barton
Simplifies making further changes.
2019-07-02Cleanup: spellingCampbell Barton
2019-06-15Cleanup: Rename: Static Override -> Library Override.Bastien Montagne
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.
2019-05-19Fix buildDalai Felinto
Issue introduced on b7eba20236ca. I'm surprised it compiled elsewhere, but in Linux at least this fix was required.
2019-05-19UI: Edit Menu Operator PollingHarley Acheson
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
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
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
2019-03-13Fix use of uninitialized variable in undo system.Brecht Van Lommel
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-07Cleanup: remove unnecessary undo functionCampbell Barton
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-06Undo System: remove accumulate/store modesCampbell Barton
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.
2019-02-04Undo System: add function to print undo stepsCampbell Barton
Useful for debugging.