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-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-20Docs: minor correction to doc-stringCampbell Barton
The text editor no longer accumulates changes.
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-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-06-30Cleanup: use const arguments for accessor functionsCampbell 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-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`?
2021-01-05Cleanup: UndoType: use `size_t` for memory size of structs.Bastien Montagne
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-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-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-05-14Fix sculpt/paint missing undo-step limitingCampbell Barton
2020-03-17Add experimental global undo speedup.Bastien Montagne
The feature is hidden behind an experimental option, you'll have to enable it in the preferences to try it. This feature is not yet considered fully stable, crashes may happen, as well as .blend file corruptions (very unlikely, but still possible). In a nutshell, the ideas behind this code are to: * Detect unchanged IDs across an undo step. * Reuse as much as possible existing IDs memory, even when its content did change. * Re-use existing depsgraphs instead of building new ones from scratch. * Store accumulated recalc flags, to avoid needless re-compute of things that did not change, when the ID itself is detected as modified. See T60695 and D6580 for more technical details.
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2019-11-13Fix sculpt + undo curve crashCampbell Barton
PaintCurve data ID data wasn't being remapped. Error in initial undo refactor.
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 missing ID pointer updates for texture paint undoCampbell Barton
Partial fix for T61263, however mem-file undo sometimes reloads imbuf's.
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-02Cleanup: spellingCampbell Barton
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-17ClangFormat: format '#if 0' code in source/Campbell 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-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.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
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.
2019-01-31Undo System: add Main argument to encode/decodeCampbell Barton
Needed since we don't always have the context, and avoids adding G_MAIN into undo callbacks.
2019-01-30Fix T60974: Dyntopo crash on undo after object deletedCampbell Barton
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.
2019-01-29Fix T60809: Crash undoing object rename in edit-modeCampbell Barton
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).
2018-06-13Fix undo of transform after frame change undoing too much.Brecht Van Lommel
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.
2018-05-15Fix T55032: Redo w/ file saved in edit-mode failedCampbell Barton
It's important edit-mode has a step stored for redo to work, file load now ensures this in a generic way.
2018-04-14Fix T54568: Undo memory de-duplication failedCampbell Barton
Error in 651b8fb14e caused de-duplication to fail.
2018-04-05Undo System: return undo step from undo push initCampbell Barton
Also improve logging
2018-04-03Undo System: id-map avoid duplicate add/lookupCampbell Barton
Add versions of add/lookup that check the previous item.
2018-03-31Undo: unified undo system w/ linear historyCampbell Barton
- 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