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-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
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-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653
2020-03-06Cleanup: Library: Move to IDTypeInfo, and remove unused BKE API.Bastien Montagne
2020-02-10Refactor: move `Library`-specific functions into proper `BKE_library` file.Bastien Montagne
Even though we do not have much of those, this might change in the future, and in any case having specific functions for this ID type in generic `BKE_lib` area was really confusing.
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.
2020-01-20Cleanup: remove redundant functionBrecht Van Lommel
2020-01-20Fix T73129: sculpt mode slow on mesh with fake userBrecht Van Lommel
We can't use the fast path when the mesh is used by mulitple objects and so slower sculpting is expected then. But fake users should not affect this. This also fixes the same type of error in a few other areas.
2019-12-20ID Management: Improve speed of code used when creating/renaming and ID.Bastien Montagne
This commit affects `id_sort_by_name()` and `check_for_dupid()` helper: * Add a new parameter, `ID *id_sorting_hint`, to `id_sort_by_name()`, and when non-NULL, check if we can insert `id` immediately before or after it. This can dramatically reduce time spent in that function. * Use loop over whole list in `check_for_dupid()` to also define the likely ID pointer that will be neighbor with our new one. This gives another decent speedup to all massive addition cases: | Number and type of names of IDs | old code | new code | speed improvement | | -------------------------------- | -------- | -------- | ----------------- | | 40K, mixed (14k rand, 26k const) | 39s | 33s | 18% | | 40K, fully random | 51s | 42s | 21% | | 40K, fully constant | 40s | 34s | 18% | Combined with the previous commits, this makes massive addition of IDs more than twice as fast as previously.
2019-09-19Fix T66154: viewlayer hide/exclude settings getting lost for linked collectionsBrecht Van Lommel
The problem was that the object and collection pointers in Base and LayerCollection would get lost of file read. Normally such ID pointers would be resolved by pointing to an ID_ID placeholder which has the datablock name, and then replacing it will the real datablock. However ID_ID is only written for directly linked datablocks. This adds the concept of an indirectly linked datablock with a weak reference to it. For this we write an ID_ID_WEAK_REF code, which is a reference that will only be resolved if the datablock was read for another reason. Differential Revision: https://developer.blender.org/D4416
2019-09-17Fix T69931: Materials with keyframes duplicated by 'make single user' are ↵Bastien Montagne
linked. Another sneaky bite from the infamous private ID data: While those monsters are not in bmain, the actions used by their animdata are regular cute little ID's, living with the herd in the safe and sound Main DB... So we have to be careful not to propagate the nasty black magic required to handle the formers when we duplicate their animdata. Saying it again: private ID datablocks should never have had their own animdata & actions, this is endless issue also with RNA paths... And makes copying of animation between materials and such needlessly complicated.
2019-09-02DatablockManagement: Cleanup logic of private IDs handling in ↵Bastien Montagne
`BKE_libblock_copy_ex()`. Now that we have the private ID data flag, we can be more simple *and* generic here.
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-08Cleanup: Typo in naming (BLE instead of BKE, tssttt).Bastien Montagne
2019-07-07Cleanup: spellingCampbell Barton
2019-06-26Cleanup: un-wrap lines in headers, use doxy commentsCampbell Barton
2019-05-23Merge branch 'blender2.7'Bastien Montagne
Conflicts: source/blender/blenkernel/intern/library.c source/blender/blenloader/intern/readfile.c source/blender/editors/screen/screen_edit.c
2019-05-22BKE Library handling: add function to recompute usercounts of IDs.Bastien Montagne
This will be needed in undo/redo case, since we do not re-read linked IDs, their usercounts become total garbage (especially in 'used by local ID' cases)...
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-06Cleanup: use default ID type's name instead of generic 'Untitled' for new IDs.Bastien Montagne
2019-03-06Cleanup: rename BKE_library's `new_id()` to `BKE_id_new_name_validate()`.Bastien Montagne
The former was probably one of the worst function names in our whole code base, totally misleading, and quiet often used as a variable name too.
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-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-05Cleanup: Remove old deprecated BKE_libblock_copy_nolib() from BKE_library.Bastien Montagne
Was not used anymore, time to get rid of it.
2019-02-05BKE_library: add 'no preview' flag to LIB_ID_COPY_LOCALIZE.Bastien Montagne
No local work copy is expected to need preview data, at least it should not. Part of copy flags cleanup, done in separate commit in case something goes wrong here...
2019-02-05Cleanup: initial regrouping of ID create/copy flags.Bastien Montagne
Those two first sets of flags should represent some common use cases. The goal here is to reduce verbosity of calls to BKE_id_copy_ex, and help make it more obvious the 'common behaviours' of ID copying across codebase.
2019-02-05Cleanup: comments before items in enums.Bastien Montagne
2019-02-05Cleanup: BKE_library: rename id_copy to BKE_id_copy.Bastien Montagne
Time to follow conventions for that one as well.
2019-02-05Cleanup: BKE_library: remove 'test' param of id_copy.Bastien Montagne
This was used in *one* place only... much better to have a dedicated helper for that kind of things. ;)
2019-02-02Cleanup: remove author/date info from doxy headersCampbell Barton
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-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-29Fix duplicate brushes from recent startup filesCampbell Barton
Default versioning caused duplicates when the startup was re-saved. See c305759762aa3
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-16Add experimental batch IDs deletion.Bastien Montagne
Main idea is to remove IDs to be deleted from Main, to avoid looping on them to remove other deleted IDs usage (this is the most expensive process in ID deletion, by far). Speed improvements when deleting a large amount of IDs from a Main containing a lot of them is quite significant, some examples for Objects: * Removing 1k from 10k: 32% quicker (2.5s to 1.7s). * Removing 10k from 20k: 60% quicker (59s to 23s). * Removing 20k from 20k: 99.5% quicker (82s to 0.4s)! Note however that this process is more risky/touchy, since we by-pass some safety checks from regular ID removal here. So will only give access to that code from python API for now (in separate commit), so that it gets really tested. Also still need to think about how to hook it up in UI (probably mostly for Outliner), since we often do higher-level operations there...
2019-01-15Cleanup: rename BKE_libblock_delete to BKE_id_delete.Bastien Montagne
2019-01-15Cleanup: rename BKE_libblock_free_us to BKE_id_free_us.Bastien Montagne
2019-01-15Cleanup: Remove deprecated BKE_libblock_free(_ex) functions, document ↵Bastien Montagne
BKE_id_free(_ex) ones.
2018-12-17Fix T58652: Crash editing shape keys weirdness with instancesSergey Sharybin
This is a second attempt to get the crash fixed. The original fix worked, but it was reverted by d3e0d7f0825. Now the logic goes as: - All pointers which we can not have shared (the ones which are owned by the runtime) are cleared. - The rest of runtime stays untouched. This seems to be enough to keep particles happy.
2018-12-14Fix broken particle distribution after recent fixSergey Sharybin
2018-12-07Fix error in Main cleanupCampbell Barton
See 481cdb08ed6f3
2018-12-04Fix for assert failure in material previewSergey Sharybin
All localized datablocks are not supposed to have animation data associated with them. There was an easy way to reproduce assert failure: toggle animation decorator for Viewport Display -> Color.
2018-11-09BKE_id_is_in_gobal_main > BKE_id_is_in_global_mainDalai Felinto
2018-11-07Cleanup/Refactor: move Main stuff into BKE's new main.c file (and header).Bastien Montagne
We already had a BKE_main.h header, no reason not to put there Main-specific functions, BKE_library has already more than enough to handle with IDs and library management!
2018-10-31UI/Unique ID name: add library ID name if present.Bastien Montagne
Also reshuffle a bit that whole code, did some renaming, `BKE_id_to_unique_string_key()` is now using same base code (instead of using whole library filepath...), etc.
2018-09-11Workspace: support reordering of workspaces from RMB menu.Brecht Van Lommel
Drag and drop will follow later, it's a bit complicated to make this work reliable in the current UI code.
2018-08-23Add helper to BKE_library to generate unique string key for an ID.Bastien Montagne
Basically just concatenates ID's name (including its IDtype code) and that library's name, if any. This must give unique string in a given Main database, suitable for GHash keys e.g.
2018-08-06Cleanup LIB_ID_COPY_ flags a bit, add missing comment.Bastien Montagne