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
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-12-16Fix T94115: Selecting current action in undo history undoes allCampbell Barton
When selecting the current undo step there is no need to do anything. Fix and minor refactor to de-duplicate refreshing after running undo/redo & undo history.
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-10-19Cleanup: use 'e' prefix for enum typesCampbell Barton
2021-09-15Cleanup: doxy sections, parameter syntaxCampbell Barton
2021-08-26Cleanup: Use `ID_IS_LINKED` instead of direct `id.lib` pointer check.Bastien Montagne
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-13Undo System: avoid redundant decoding on undoCampbell Barton
In most cases the undo system was loading undo steps twice. This was needed since some undo systems (sculpt, paint, text) require stepping out of the current undo step. Use a flag to limit this to the undo systems that need it. This improves performance for other undo systems. This gives around 1.96x speedup in edit-mesh for high-poly objects. Reviewed by: mont29 Ref D11893
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
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.