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-07-13Fix (studio-reported) bad remapping of libraries.Bastien Montagne
New remapper code would also fail in some cases when remapping libraries, similar to the issue yesterday, because ID_LI type had no mask value. That would fail to remap `parent` member of a library to NULL when deleting that parent, leading to a crash e.g. in Outliner tree building code. Reported by @JulienKaspar from Blender studio.
2022-07-11Fix (studio-reported) crash in ID remapping code on rare cases.Bastien Montagne
Some ID types did not have a filter value, even though they would be used in remapping code, leading to missing remappings. In that specific case, shape keys would actually never be properly remapped. Reproducible in r1230 of `Heist/pro/animation_test/einar/einar_new_expression_shapes2.blend`,
2022-04-06Fix badly broken caches handling during undo/redo.Bastien Montagne
Original rework of caches during undo/redo (see D8183) had a very bad flaw hidden in it: using the key of a ghash as source of data. While this was effectively working then (cache pointer itself being part of the key, and said cache pointers not being cleared on file write), this is a general very bad way to do things. Now that cache pointers are more and more cleared on file write (as part of clearing runtime-data to reduce false-positives when checking if an ID has changed or not), this has to be fixed properly by: * Not storing the cache pointer itself in the IDCacheKey. * In undo context, in readfile code trying to preserve caches, store the cache pointers as values of the mapping, together with the usages counter The first change potentially affects all usages of `BKE_idtype_id_foreach_cache`, but in practice this code is only used by memfile reading code (i.e. undo) currently. Related to T97015. Reviewed By: brecht Maniphest Tasks: T97015 Differential Revision: https://developer.blender.org/D14559
2022-02-18Cleanup: Rename original curve object type enumHans Goudey
This commit renames enums related the "Curve" object type and ID type to add `_LEGACY` to the end. The idea is to make our aspirations clearer in the code and to avoid ambiguities between `CURVE` and `CURVES`. Ref T95355 To summarize for the record, the plans are: - In the short/medium term, replace the `Curve` object data type with `Curves` - In the longer term (no immediate plans), use a proper data block for 3D text and surfaces. Differential Revision: https://developer.blender.org/D14114
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
2022-02-09Cleanup: use consistent copyright location, move descriptionsCampbell Barton
Order copyright immediately after the license block, this was done almost everywhere with a few exceptions. Remove authors from a few files (we had already removed "Contributors" section however with old patches being applied this gets added back in). Also move descriptive text into the doxygen comment block under \file. In some cases remove the text as it was accidentally copied.
2022-02-07Curves: Rename "Hair" types, variables, and functions to "Curves"Hans Goudey
Based on discussions from T95355 and T94193, the plan is to use the name "Curves" to describe the data-block container for multiple curves. Eventually this will replace the existing "Curve" data-block. However, it will be a while before the curve data-block can be replaced so in order to distinguish the two curve types in the UI, "Hair Curves" will be used, but eventually changed back to "Curves". This patch renames "hair-related" files, functions, types, and variable names to this convention. A deep rename is preferred to keep code consistent and to avoid any "hair" terminology from leaking, since the new data-block is meant for all curve types, not just hair use cases. The downside of this naming is that the difference between "Curve" and "Curves" has become important. That was considered during design discussons and deemed acceptable, especially given the non-permanent nature of the somewhat common conflict. Some points of interest: - All DNA compatibility is lost, just like rBf59767ff9729. - I renamed `ID_HA` to `ID_CV` so there is no complete mismatch. - `hair_curves` is used where necessary to distinguish from the existing "curves" plural. - I didn't rename any of the cycles/rendering code function names, since that is also used by the old hair particle system. Differential Revision: https://developer.blender.org/D14007
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-09-22Initial implementation of local ID re-use when appending.Bastien Montagne
This commit adds to ID struct a new optional 'weak reference' to a linked ID (in the form of a blend file library path and full ID name). This can then be used on next append to try to find a matching local ID instead of re-making the linked data local again. Ref. T90545 NOTE: ID re-use will be disabled for regular append for the time being (3.0 release), and only used for assets. Therefore, this commit should not change anything user-wise. Differential Revision: https://developer.blender.org/D12545
2021-09-16Fix: properly implement the 'only append' execption case for WorkSpaces.Bastien Montagne
Add needed extra flag and utils to IDType to mark and check an ID type as only appendable. Note that this is only a loose user-level enforcement currently, in any case you need to be able to link an ID to append it currently, so for low-level code this does not really matter. Currently only WorkSpace and Screen ID types are marked with the new `IDTYPE_FLAGS_ONLY_APPEND` flag.
2021-03-04Cleanup: Main `foreach ID` code: Remove `MAX_LIBARRAY` and improve comments.Bastien Montagne
The `MAX_LIBARRAY` define was an annoying doublon to the `INDEX_ID_MAX` enum value now defined in `DNA_ID.h`, and it is no more useful. And comments were somewhat outdated. Also added an explanation about chosen order for the `INDEX_ID_<IDTYPE>` order.
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-10-07Fix T81272: Crash on opening old files where nodetrees had no name.Bastien Montagne
This code gets called before do_version can fix that, so we have to work around it for now.
2020-09-08Cleanup: doxygen syntax for idtype.cCampbell Barton
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-06Runtime cache preservation during undo: add support for nodes and embedded IDs.Bastien Montagne
2020-07-03Add key structure and hashing utils for ID caches.Bastien Montagne
Part of D8183, refactoring how we preserve caches across undo steps in readfile code.
2020-05-09Cleanup: double-spaces in commentsCampbell Barton
2020-04-20Simulations: Add new simulation data blockJacques Lucke
This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225
2020-04-03Cleanup: clarification of 'name' in BKE_idtype functionsSybren A. Stüvel
The 'name' parameter of `BKE_idtype_idcode_from_name()`, and the `str` parameter of `idtype_get_info_from_name()`, are expected to be the 'user visible name' of an `IDTypeInfo` struct. This is made clearer in the code by renaming those parameters to `idtype_name` and mentioning it in the documentation of the `BKE_idtype_idcode_from_name()` function. Differential Revision: https://developer.blender.org/D7317
2020-03-20Cleanup: remove debug print accidentally included in own previous commit.Bastien Montagne
Thanks to @brecht for the heads up!
2020-03-19Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.Bastien Montagne
Mpving utils from idcode to idtype proved to be somewhat painful for some reasons, but now all looks good. Had to add a fake/empty shell for the special snowflake too, `ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
2020-03-18Objects: add Volume object type, and prototypes for Hair and PointCloudBrecht Van Lommel
Only the volume object is exposed in the user interface. It is based on OpenVDB internally. Drawing and rendering code will follow in another commit. https://wiki.blender.org/wiki/Source/Objects/Volume https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES build option. These are unfinished, and included only to make it easier to cooperate on development in the future and avoid tricky merges. https://wiki.blender.org/wiki/Source/Objects/New_Object_Types Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6945
2020-03-09Cleanup: palette: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: GreasePencil: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: Ipo: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: FreestyleLineStyle: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: Mask: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: MovieClip: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: ParticleSettings: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: PaintCurve: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: CacheFile: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: WorkSpace: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09Cleanup: WindowManager: Move to IDTypeInfo and remove unused WM API.Bastien Montagne
Getting rid of one static 'registered' callback in BKE, yeah!
2020-03-08Cleanup: Sound: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-08Cleanup: Speaker: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: VFont: Move to IDTypeInfo and remove unused BKE APIDalai Felinto
This was particularly strange because we had a _free_data() function. But still the one I replaced was of course the _free() one. And we should rename the _free_data_ function later to avoid confusions.
2020-03-06Cleanup: Text: Move to IDTypeInfo and remove unused BKE API.Dalai Felinto
2020-03-06Cleanup: Image: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: Texture: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: Material: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: Action: Move to IDTypeInfo, and remove unused BKE API.Dalai Felinto
2020-03-06Cleanup: Armature: Move to IDTypeInfo, and remove unused BKE API.Dalai Felinto
2020-03-06Cleanup: Lattice: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: MetaBall: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: Curve: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: Mesh: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: Collection: Move to IDTypeInfo, and remove unused BKE API.Dalai Felinto
Note: we still need BKE_collection_free since we call it from scene.c.
2020-03-06Cleanup: bScreen: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Cleanup: bNodeTree: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne