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-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-29LibQuery: Remove last 'bool returns' from public API.Bastien Montagne
Those were used in a very few places to detect whether iteration should be stopped or not, but one can use `BKE_lib_query_foreachid_iter_stop` now for that. Also fix early break handling in embedded IDs processing. Fix T90922: Fix return policy inconsistency in `scene_foreach_id`.
2021-10-29LibQuery: Add macro to help break looping when requested.Bastien Montagne
The new `BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL` execute the given statement and then check status of `LibraryForeachIDData` data, and return in case stop of iteration is requested. This is very similar to the other `BKE_LIB_FOREACHID_PROCESS_` existing macros, and allows us to properly break iteration when a sub-function has requested it. Part of T90922: Fix return policy inconsistency in `scene_foreach_id`.
2021-10-29Fix potential early-return in WM foreach_id process.Bastien Montagne
Add a function to check if iteration over ID usages should stop (using internal `IDWALK_STOP` status flag). Use it in `BKE_LIB_FOREACHID_PROCESS_` macros, and in `window_manager_foreach_id` to handle properly the active workspace case (previous code could skip the call to `BKE_workspace_active_set` in case iteration over ID usages was stopped by callback on that specific ID usage). Part of T90922: Fix return policy inconsistency in `scene_foreach_id`.
2021-10-26Cleanup: LibQuery: Rename `BKE_LIB_FOREACHID_PROCESS` to ↵Bastien Montagne
`BKE_LIB_FOREACHID_PROCESS_IDSUPER`. More in-line name with the rest of that macro-based API, especially since this will be extended in the future.
2021-05-05LibOverride/LibQuery: Refactor 'non-overridable' status management.Bastien Montagne
Move the detection/decision of whether an ID pointer should be taken into account in library override hierarchy processing to the LibQuery area of code, by introducing a new callback flag. This allows to factorize the test logic, be explicit in liboverride code about ID relationships that can be ignored when exploring the override hierarchy, and adds the possibility to do more checks about pointers to be tagged as non-overridable in the future. Note that all but the 'special' ID pointers (loop-back, embedded, etc.) should be overridable. If some is not, relevant IDType 'foreach_id' callback code is reponsible to tag it properly. Python-defined IDProperties however are not systematicaly overridable (yet), so this should allow us to detect that case and act accordingly in an incomming commit. No behavioral change expected in this commit.
2021-03-12LibQuery: Add an option to process internal runtime ID pointers.Bastien Montagne
In some cases (advanced, low-level code) we also want to process ID pointers like `ID.newid` or `ID.orig_id`.
2021-02-25BKE_lib_query: Add a function to detect and tag all unused IDs.Bastien Montagne
With the option to detect orphaned data recursively (i.e. if ID `a` is the only user of ID `b`, and ID `a` is unused, ID `b` will also get tagged as unused). To be used by the Purge operation.
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
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-05-25Libquery: Refactor: add bmain to data passed to callback.Bastien Montagne
No reason to enforce defining own callback user data for something that controlling has already available...
2020-05-21Refactor: Move object foreach_id to new IDTypeInfo structure.Bastien Montagne
2020-05-18Refactor: Move WindowManager and Screen foreach_id to new IDTypeInfo structure.Bastien Montagne
That one was a bit more complicated, and is still only partial refactor (ultimately we want to have a foreach_id callback in SpaceType itself I think...).
2020-05-07Initial step to move libquery to IDTypeInfo.Bastien Montagne
Part of T74960 (and hence T75724). This commit only adds the basics helper code, and alter some internal libquery code to use it. Porting each IDType to the new system will be done gradually from there, to allow better detection and handling of potential issues. Differential Revision: https://developer.blender.org/D7598
2020-04-22Cleanup: clarify and update some flags descriptions in libquery code.Bastien Montagne
2020-03-11Cleanup: Typo in comments.Bastien Montagne
2020-03-11LibQuery: Add option to NOT process embedded IDs.Bastien Montagne
Request from depsgraph department, which does basically consider those embedded IDs as any other data-block (unlike any BKE ID management code).
2020-03-11Cleanup: rename 'private' to 'embedded' for sub-data IDs.Bastien Montagne
'Private' can be a rather confusing term, especially when considering its meaning in programming languages. So now root node trees and master collections are 'embedded' IDs instead.
2020-03-11Cleanup in ID remapping code re owner_id vs. self_id.Bastien Montagne
The former is always a real, in-Main data-block, while the later, when different, should be one of those embedded 'private' IDs (like root node ree or master collection).
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2020-02-18libquery: add optional handling of 'UI' ID pointers.Bastien Montagne
Handling those through different ways /might/ be needed sometimes, but in most case this is just a nest of issues, since you can easily forget to take them into account. Note that this should be a 'non-functional' change, as this new behavior is not used anywhere yet.
2020-02-13libquery: Add 'owner id' to callback data.Bastien Montagne
In some cases it's important to always have a proper ID as reference, e.g. whene generating data supposed to represent main data-base...
2020-02-13Refactor libquery ID looper callback to take a single parameter.Bastien Montagne
Using a struct here allows to change given parameters to the callbacks without having to edit all callbacks functions, which is always noisy and time consuming.
2020-02-10Fix mismatch in BKE headers' multi-include safeguards naming.Bastien Montagne
Forgot to update those in recent `BKE_lib_` files renames.
2020-02-10Cleanup: Add basic doc about each `BKE_main` and `BKE_lib` files.Bastien Montagne
Including expected prefixes for functions in those files. Part 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.