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
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-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-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-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
2018-06-22Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/makesrna/intern/rna_image.c source/blender/makesrna/intern/rna_object.c source/blender/makesrna/intern/rna_object_force.c source/blender/makesrna/intern/rna_screen.c source/blender/makesrna/intern/rna_sculpt_paint.c source/blender/makesrna/intern/rna_space.c source/blender/python/bmesh/bmesh_py_types.c source/blender/python/generic/bpy_internal_import.h source/blender/python/intern/bpy_rna_anim.c source/blender/python/intern/gpu_offscreen.c
2018-06-22BKE_library: Add func to check an ID is actually in G_MAIN database.Bastien Montagne
2018-06-05Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/intern/blendfile.c source/blender/blenloader/intern/readfile.h source/blender/blenloader/intern/versioning_250.c source/blender/blenloader/intern/versioning_260.c source/blender/blenloader/intern/versioning_270.c source/blender/blenloader/intern/versioning_legacy.c source/blender/editors/render/render_shading.c source/blender/makesrna/intern/rna_movieclip.c source/blender/render/intern/source/pipeline.c source/blender/render/intern/source/voxeldata.c
2018-06-05Cleanup: use new accessors to blendfile path (Main.name).Bastien Montagne
2018-06-05Cleanup: add hleper functions to get filepath from Main.Bastien Montagne
This helps making things clearer and cleaner. Func returning filepath of G.main is separate, so that we can easily track its usages, and hopefully deprecate it at some point. Though that usage of G.main is likely the less evil one, you nearly always want current blendfile path in those cases anyway.
2018-05-31Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/editors/object/object_add.c source/blender/editors/object/object_select.c source/blender/editors/space_outliner/outliner_edit.c
2018-05-31Cleanup: get rid of last G.main usages in BKE library code.Bastien Montagne
2018-05-30ID copy: Add flag which allows custom data to reference original datablockSergey Sharybin
2018-05-14Fix T55031: add explicit copy flag to force deep-copying shapekey datablock ↵Bastien Montagne
with 'parent' one. Chose to change defaut behavior (0-flag one) here, for sake of consistency. Default behavior of simple BKE_id_copy() remains unchanged though.
2018-05-04ID management: add higher level BKE_id_new... helpers.Bastien Montagne
Those should be used in priority when you need to create either a new datablock in Main, or a new temp one. Lower level BKE_libblock_... should only be used when you need a very specific, uncommon behavior.
2018-05-03Fix for material/node tree localizationSergey Sharybin
The workaround removal was wrong, the whole id->adt of a local copy is to be NULL. But now instead of modifying original datablock, we tell library manager to not copy animation data.
2018-01-25Merge branch 'master' into blender2.8Campbell Barton
2018-01-25Cleanup: correct ATTR_NONNULL useCampbell Barton
2017-12-06Merge branch 'master' into blender2.8Sergey Sharybin
2017-12-06Library: Add flag top keep ID library pointer aroundSergey Sharybin
This only applies to ID being copied outside of bmain. Handy for cases when it is important to check if the copy corresponds to a data block coming from library. Example of that is proxy evaluation with copy on write. Thanks Bastien for review!
2017-11-29Preparing merge of id_override_static: add BKE_id_swap().Bastien Montagne
This function swaps the memory content of two data-blocks (of same type obviously), while preserving most of the ID 'header' itself. It is intended to be used to quickly and easily replace the data of an existing ID by another one, presumably a temporary 'working' one, without having to suffer from things like name changes, registering/removing from Main database, etc.
2017-11-05Merge branch 'master' into blender2.8Campbell Barton
2017-11-05Cleanup: remove paranoid NULL checkCampbell Barton
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-06-14Merge branch 'master' into blender2.8Bastien Montagne