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-19Docs: notes on thumbnail sizesCampbell Barton
The rationale for storing thumbnails at different sizes wasn't obvious.
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-16Remove G.relbase_validCampbell Barton
In almost all cases there is no difference between `G.relbase_valid` and checking `G.main->filepath` isn't an empty string. In many places a non-empty string is already being used instead of `G.relbase_valid`. The only situation where this was needed was when saving from `wm_file_write` where they temporarily became out of sync. This has been replaced by adding a new member to `BlendFileWriteParams` to account for saving an unsaved file for the first time. Reviewed By: brecht Ref D13564
2021-12-14Cleanup: resolve parameter mis-matches in doc-stringsCampbell Barton
Renamed or removed parameters which no longer exist.
2021-12-13Cleanup: use "filepath" term for Main, BlendFileData & FileGlobalCampbell Barton
Use "filepath" which is the current convention for naming full paths. - Main use "name" which isn't obviously a file path. - BlendFileData & FileGlobal used "filename" which is often used for the name component of a path (without the directory).
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-25Assets: Snapping with visual feedback while draggingGermano Cavalcante
The drag and drop feature of objects in 3D View has been modified to include: - Snap the object being dragged. - Visual feedback through a box and the placement tool grid. Maniphest Tasks: T90198 Differential Revision: https://developer.blender.org/D12912
2021-10-19Cleanup: use 'e' prefix for enum typesCampbell Barton
2021-10-06BMain: Add utils to check if a Main is empty or not.Bastien Montagne
Mostly intended for debug code (asserts).
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-07-27BlenRead: Add GHash-based search for already read linked IDs.Bastien Montagne
Ths commit adds a new `IDNameLibMap` to `Main`, used during file reading to quickly find already read linked IDs. Without that, search would use string-based search over list of linked data, which becomes extremely slow and inneficient in cases where a lot of IDs are linked from a same library. See also {T89194}. Extrem-usecase reported in T89194 is now about 4 times faster in linked data reading (about 2 times faster for the whole .blend file loading). More normal cases (like Sprites studio production files) have barely measurable speed improvements, a few percents at best. NOTE: `main_idmap` API was extended to support insertion and removal of IDs from the mapping, avoids having to re-create the whole thing several time during libraries expansion in readcode. Differential Revision: https://developer.blender.org/D11757
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
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.
2021-02-02BKE BMain relations: add utils to (re)set tags of the entries.Bastien Montagne
2021-01-22Refactor BMain relations temp data.Bastien Montagne
`bmain.relations` is used to store temp data of relations between IDs, to speed-up some complex processes heavily relying on such information. Previous implementation was failry unclear/confusing, and required a not-so-nice hack to 'tag' some ID as processed. New code changes as such: * Using `from`/`to` naming (instead of `user`/`used`). * More clear separation between `to` `id_pointer` and `from` one, using an union instead of hacking around difference between `ID *` and `ID **` pointers. * Adds storage of `session_uuid` informations (mainly useful as debug/ensuring proper consistency of data currently). * Adds a structure per ID in the mapping. This enables possibility of storing tags (and potentially more data in the future) per-ID, without polluting the IDs themselves with very short-life info. Differential Revision: https://developer.blender.org/D10164
2020-11-19Cleanup: Grammar: "Allow to" vs gerund missed in last commitHans Goudey
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
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-29Add utils to remove an ID from the relations runtime data in Main.Bastien Montagne
2020-05-29Merge branch 'blender-v2.83-release'Brecht Van Lommel
2020-05-29Blender: change bugfix release versioning from a/b/c to .1/.2/.3Brecht Van Lommel
The file subversion is no longer used in the Python API or user interface, and is now internal to Blender. User interface, Python API and file I/O metadata now use more consistent formatting for version numbers. Official releases use "2.83.0", "2.83.1", and releases under development use "2.90.0 Alpha", "2.90.0 Beta". Some Python add-ons may need to lower the Blender version in bl_info to (2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0. https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility This change is in preparation of LTS releases, and also brings us more in line with semantic versioning. Fixes T76058. Differential Revision: https://developer.blender.org/D7748
2020-05-15Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-15Fix duplicate ID's being created when appending/linkingCampbell Barton
This removes grease pencil brush creation/dat-block delete on load, since this causes duplicate data-blocks. Add assert to prevent this happening in the future since the error is isn't obvious.
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-05Cleanup: macro hygiene, parenthesize argumentsCampbell Barton
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-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-02-18Cleanup: protect parameters of `FOREACH_MAIN_ID` & co macros.Bastien Montagne
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-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.
2019-11-07Fix T69822: Switching sculpt objects breaks undoCampbell Barton
This introduces object mode tagging for data which hasn't yet been written back to the ID data. Now when selecting other sculpt objects, the original objects data is flushed back to the ID before writing a memfile undo step.
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-20Cleanup: add missing macros to clang-formatCampbell 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-18Fix mistake in previous commit.Bastien Montagne
2019-03-18Cleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.Bastien Montagne
We don't want to use flow control like `break` statement into the basic `FOREACH_MAIN_ID` macro, as this is a nested loop. When refined behavior is needed (like breaking whole iteration, or just skipping to next ID type), FOREACH_MAIN_LISTBASE and FOREACH_MAIN_LISTBASE_ID macros should be used instead. Based on D4382 by @campbellbarton (Other potential solution, using flow control macros: D4384).
2019-03-08Cleanup: use plural names for Main listsCampbell Barton
Convention was not to but after discussion on 918941483f7e we agree its best to change the convention. Names now mostly follow RNA. Some exceptions: - Use 'nodetrees' instead of 'nodegroups' since the struct is called NodeTree. - Use 'gpencils' instead of 'grease_pencil' since 'gpencil' is a common abbreviation in the C code. Other exceptions: - Leave 'wm' as it's a list of one. - Leave 'ipo' as is for versioning.
2019-02-27Cleanup: Main struct member namesCampbell Barton
Rename latt to lattice and don't use plural names.
2019-02-27DNA: rename Lamp -> LightCampbell Barton
- BKE_lamp -> BKE_light - Main.lamp -> light
2019-02-18BKE_main: FOREACH macros: fix shadowing 'i' variable.Bastien Montagne
2019-02-18BKE_main: make FOREACH new macros working when deleting some IDs.Bastien Montagne
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-14Cleanup: replace Main ID's foreach functions by macros.Bastien Montagne
Am really no a big fan of using macros for that kind of things, but meh... C solution to do that with functions (using callbacks) is even worse. :(
2019-02-11readfile: skip negative sized thumbnailsCampbell Barton
We may want to use 'TEST' BCode in the future for including data besides thumbnails. This allows negative values to be used w/o attempting to load a thumbnail.
2019-02-08BKE_main: add a util to generate/extend a GSet with all ID pointers of a ↵Bastien Montagne
Main database.
2019-02-07BKE_main: add utils to loop over whole IDs of a given Main database.Bastien Montagne
We are currently having the same boiler plate code in tens of places accross our code, we can as well have a utils to do that.
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.