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
path: root/source
AgeCommit message (Collapse)Author
2021-08-23GPencil: Fix memory leak in split & trim functionsYimingWu
Authored by Henrik Dick (weasel) Reviewed By YimingWu (NicksBest), Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D12284
2021-08-23Fix T90772: Image Editor not sampling color from the the currentlyPhilipp Oeser
selected pass Caused by {rBebaa3fcedd23}. Seems this above commit assumed an ImageUser's multi_index is only used for Multiview/Stereo? This is not the case, multi_index also stores the index for layer/pass combination. If we call both BKE_image_multilayer_index and BKE_image_multiview_index (even though this is not appropriate/needed for multilayer images?), we might end up overwriting multi_index again. note: looking at this I was also wondering why we update the ImageUser in image-buffer-aquiring funnctions [and not from the UI, e.g. template_image_layers, but that is a whole different story I guess, see comment in T90772 as well] note2: this could also use a utility function (this is not the only place where this is done), this is fo a cleanup commit. Maniphest Tasks: T90772 Differential Revision: https://developer.blender.org/D12267
2021-08-23Fix T90651: camera reconstruction crash without scene cameraPhilipp Oeser
This was working differently in 2.79, tried tracking this down and it seems this was wrong since the 2.8 beginning in {rB7907dfc40018}. This would not only crash without an active scene camera, but would also result in different tracks from different camera's constraints could not be selected. So select id depends on corresponding camera, remove the dependency on scene camera completely. Maniphest Tasks: T90651 Differential Revision: https://developer.blender.org/D12230
2021-08-23Revert cleanup changes to node DNA.Lukas Tönne
This was used a some point to get a clear type for the node flags enum, but isn't a necessary change right now. Node DNA cleanup should be done in a separate patch.
2021-08-23RNA: add length augmented to RNA_string_get_allocCampbell Barton
This was noted as a TODO as it wraps RNA_property_string_get_alloc which takes a length return argument.
2021-08-23Cleanup: rename len to str_len for BLF functionsCampbell Barton
Make it obvious which variable this is the length of.
2021-08-23Cleanup: use BLI_str_utf8 prefixCampbell Barton
Rename: - BLI_str_utf8_invalid_byte (was BLI_utf8_invalid_byte) - BLI_str_utf8_invalid_strip (was BLI_utf8_invalid_strip)
2021-08-23Fix T90847: snap to face of Add Primitive tool not working in edit modeGermano Cavalcante
BVHTree was being created but not balanced. Error introduced in {rBfcc844f8fbd0}.
2021-08-22Utility classes for compact node definitions in C++.Lukas Tönne
Node definitions in C++ are currently spread out over a large number of files all over the code base (nodes, DNA, RNA, UI). By contrast, python nodes are very compact and can be added much more easily. To make node definitions in C++ more convenient, this patch adds some utility functions that allow defining type properties and callbacks of a node in a single file. The NodeDefinition template takes a struct (which should usually also be a child class of the template) and finds static fields and functions of the template argument to use for the node type. The "Mesh Primitive Ellipse" node has been added as an example case, it may not end up being used. Other existing node types are unaffected, this patch only provides alternative ways to define a node. Known limitations: - Only ID properties can be added in the node source files without additional DNA structs. This should be sufficient for the vast majority of nodes, but can be augmented with conventional DNA structs in node->storage if necessary. - Runtime node definitions are identified only by their idname, they do not have a fixed integer type. This has to be taken into account for versioning. - Sockets are currently added in the init function. The "template" system is not supported and a better alternative should be added eventually.
2021-08-22Fix Windows builds after Zstandard commitsLukas Stockner
2021-08-21Use Zstandard compression for the sequencer cacheLukas Stockner
Reviewed By: campbellbarton, brecht, mont29 Differential Revision: https://developer.blender.org/D5799
2021-08-21Add support for Zstandard compression for .blend filesLukas Stockner
Compressing blendfiles can help save a lot of disk space, but the slowdown while loading and saving is a major annoyance. Currently Blender uses Zlib (aka gzip aka Deflate) for compression, but there are now several more modern algorithms that outperform it in every way. In this patch, I decided for Zstandard aka Zstd for several reasons: - It is widely supported, both in other programs and libraries as well as in general-purpose compression utilities on Unix - It is extremely flexible - spanning several orders of magnitude of compression speeds depending on the level setting. - It is pretty much on the Pareto frontier for all of its configurations (meaning that no other algorithm is both faster and more efficient). One downside of course is that older versions of Blender will not be able to read these files, but one can always just re-save them without compression or decompress the file manually with an external tool. The implementation here saves additional metadata into the compressed file in order to allow for efficient seeking when loading. This is standard-compliant and will be ignored by other tools that support Zstd. If the metadata is not present (e.g. because you manually compressed a .blend file with another tool), Blender will fall back to sequential reading. Saving is multithreaded to improve performance. Loading is currently not multithreaded since it's not easy to predict the access patterns of the loading code when seeking is supported. In the future, we might want to look into making this more predictable or disabling seeking for the main .blend file, which would then allow for multiple background threads that decompress data ahead of time. The compression level was chosen to get sizes comparable to previous versions at much higher speeds. In the future, this could be exposed as an option. Reviewed By: campbellbarton, brecht, mont29 Differential Revision: https://developer.blender.org/D5799
2021-08-21Refactor low-level blendfile reading into separate filesLukas Stockner
Instead of handling mmap, compression etc. all directly in readfile.c, refactor the code to use a generic FileReader. This makes it easier to add new compression methods or similar, and allows to reuse the logic in other places (e.g. thumbnail reading). Reviewed By: campbellbarton, brecht, mont29 Differential Revision: https://developer.blender.org/D5799
2021-08-21Cleanup: minor changes to blf_font.cCampbell Barton
- Use early return when kerning isn't used. - Remove early return that prevented matching acquire/release calls.
2021-08-21Cleanup: organize blf_font.c functions using doxy-sectionsCampbell Barton
Functions in this file were scattered and not well organized.
2021-08-21Cleanup: spelling in comments & minor cleanupCampbell Barton
Also hyphenate 'mouse-move' use doxy sections in render_update.c & move function comment from the header to the source.
2021-08-21Correct build error from 0d7aab2375e6bb06e89dad851550b283a1ff805cCampbell Barton
2021-08-21Refactor: BLF Kerning Cache After UseHarley Acheson
Optimization of font kerning by only caching kerning values after a pair is encountered. Also saves unscaled values so they don't have to be rebuilt between font size changes. See D12274 for more details and speed comparison. Differential Revision: https://developer.blender.org/D12274 Reviewed by Campbell Barton
2021-08-20DocPy: Cleanup missing newline resulting in wrong html generationAaron Carlisle
2021-08-20Cleanup, use BKE_scene_uses_cycles_experimental_featuresKévin Dietrich
2021-08-20Cleanup, remove extra code from previous commitKévin Dietrich
This got accidentally introduced while revising dependencies between patches for this feature, did not notice until it was too late.
2021-08-20Alembic Procedural: basic cache control settingsKévin Dietrich
This adds a setting to enable data caching, and another one to set the maximum cache size in megabytes. When caching is enabled we load the data for the entire animation in memory, as we already do, however, if the data exceeds the memory limit, render is aborted. When caching is disabled, we simply load the data for the current frame in memory. Ref D10197 Reviewed By: brecht Differential Revision: https://developer.blender.org/D11163
2021-08-20Fix T90795: Moving keys in Grease Pencil Dopesheet crashes BlenderGermano Cavalcante
`td->loc` is referenced but not initialized.
2021-08-20Functions: remove multi-function networkJacques Lucke
The multi-function network system was able to compose multiple multi-functions into a new one and to evaluate that efficiently. This functionality was heavily used by the particle nodes prototype a year ago. However, since then we only used multi-functions without the need to compose them in geometry nodes. The upcoming "fields" in geometry nodes will need a way to compose multi-functions again. Unfortunately, the code removed in this commit was not ideal for this different kind of function composition. I've been working on an alternative that will be added separately when it becomes needed. I've had to update all the function nodes, because their interface depended on the multi-function network data structure a bit. The actual multi-function implementations are still the same though.
2021-08-20Geometry Nodes: add missing versioning for subdivision surface nodeJacques Lucke
This was missing from rBfecec1644ce54ea386eaeed5ca6748d4a7b2737b.
2021-08-20Cleanup: remove duplicate lineJacques Lucke
2021-08-20Functions: add utility methods to parameter builderJacques Lucke
2021-08-20Functions: add clear method to vector arrayJacques Lucke
2021-08-20BLI: add utility methods to IndexMaskJacques Lucke
2021-08-20Cleanup: Add CLOG to wm_files_link.cBastien Montagne
2021-08-20Cleanup: use "free_data" suffix when the argument isn't freedCampbell Barton
Avoid API misuse that caused leaks in T90791 & 2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
2021-08-20Cleanup: rename BKE_mesh_free_data -> BKE_mesh_free_data_for_undoCampbell Barton
This function only makes sense for undo which doesn't initialize the meshes ID. Otherwise BKE_id_free should be used.
2021-08-20Cleanup: remove BKE_mesh_free_data use for lineart mesh copiesCampbell Barton
Even though this didn't leak memory, BKE_mesh_free_data doesn't handle freeing data that is part of the ID making it error prone.
2021-08-20Cleanup: accidentally included printfCampbell Barton
2021-08-20Fix memory leak with building springs in the cloth simulatorCampbell Barton
Error in 2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
2021-08-20Fix T90791: Knife project leaks memory with curve/text cutterCampbell Barton
2021-08-20Cleanup: rename BKE_mesh_free -> BKE_mesh_free_dataCampbell Barton
It wasn't obvious this didn't free the memory of the mesh it's self leading to memory leaks.
2021-08-20Cleanup: unused warningsCampbell Barton
2021-08-20Cleanup: clang-formatJesse Yurkovich
2021-08-20Cleanup, formatKévin Dietrich
2021-08-19UI: Use theme's alpha for Summary instead of a hardcoded valuePablo Vazquez
2021-08-19GPencil: Cleanup old printf debug linesAntonio Vazquez
These lines were very old debug code and now it's not required because the code is very tested.
2021-08-19Image blendwrite: Fix handling of packedfiles.Bastien Montagne
Packedfiles need some special attention when writing Image to disk. Source: D12242, Jeroen Bakker (@jbakker), thanks.
2021-08-19Partially fix T90593: Image ID wrongly seen as changed on undos.Bastien Montagne
Several pure runtime data in this ID type were not properly cleared by write/read processes. Note that the initial undo step (the one leading back to initial read file state) is still forcing re-load of image, for some reasons. Common investigation together with Jeroen Bakker (@jbakker), thanks. See also D12242.
2021-08-19UI: Match row color for Summary in Mask animation editorAntonio Vazquez
The back color of the row was missing.
2021-08-19GPencil: Match row color for Summary in Grease Pencil animation editorAntonio Vazquez
The background of the summary row was different in Grease Pencil mode. Reviewed by: Pablo Vazquez, Matias Mendiola
2021-08-19Fix the value in the graphical editor header when transformingGermano Cavalcante
The header did not display the actual value when transforming with snapping
2021-08-19Fix T87173: wrong Auto-Snap in animation editorsGermano Cavalcante
This was partially broken with {rBde9ea94fc6f}. The `Frame Step` and `Second Step` snapping options were working as if they were `Nearest Frame` and `Nearest Second` respectively in the `Dope Sheet` and `NLA` editors. In the `Graph Editor` the problem was more serious: "Second Step: ... The keyframe itself moves along as though in snapping were active at all, while its handles 'stay behind' until it reaches the next second boundary, at which point the teleport handles to 'catch up'". The snapping code for these modes was spread across the transform mode code and `recalcData` of each data type. Therefore, create a unified snapping code for these options so that all issues are fixed in one place. Differetial Revision: https://developer.blender.org/D12241
2021-08-19Transform Convert Action: conventionalize TransData creationGermano Cavalcante
`td2d->loc`, `td2d->loc2d`, `td->loc` and `td->iloc` were not being initialized as is done with the other conversion types. This avoids problems with transform modes becoming incompatible. This avoids problems with incompatible transform modes that could result in a crash.
2021-08-19Fix incremental snap in animation editorsGermano Cavalcante
Animation editors have their own snap types and incremental is not supported.