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-20Fix T94715: multiple volumes using the same .vdb causes freezeBrecht Van Lommel
Needs more TBB task isolation, as even freeing an OpenVDB grid uses multithreading.
2022-01-17Fix T94624: Object as font instances don't workHans Goudey
The fundamental limitation is that we can only have one instance ("dupli") generator at a time. Because the mesh output of a curve object is output as an instances, the geometry set instances existed, replacing the object as font instances. The "fix" is to reverse the order. The behavior won't be perfect still, but at least the old behavior will be preserved, which is really what matters for a feature like this. One way to take this change further would be completely disabling regular geometry evaluation while this option is active. However, it doesn't seem like that would actually improve the state of the code. Differential Revision: https://developer.blender.org/D13768
2022-01-11Fix T94600: Apply single shrinkwrap constraint failsPhilipp Oeser
rBd6891d9bee2b introduced a way to apply a single constraint from the constraint stack. For this we want to work in the evaluated domain, in particular the constraint target should be evaluated (the shrinkwrap constraint needs to have access to the target's evaluated mesh). Thx a lot to @sergey for handholding here! Maniphest Tasks: T94600 Differential Revision: https://developer.blender.org/D13765
2022-01-11Fix T94454: Python API curve to mesh use after free without depsgraphHans Goudey
This was caused by a mistake in eb0eb54d9644c5139, which removed the clearing of the curve edit mode pointers that are set when creating the temporary data for the conversion. If they are not cleared, the generic ID free function will also free the edit mode data, which is wrong when the source curve is in edit mode.
2022-01-11Fix T94442: Trim curve node can crash with duplicate pointHans Goudey
The calculation to find the factor between two evaluated points assumed that the points were not at the same location. This assumption is some- what reasonable, since we might expect `lower_bound` to skip those point anyway. However, the report found a case where the first two evaluated points were coincident, and there is no strong reason not to make this safe, so add a check for 0 length before the division.
2022-01-11Fix T94115: Selecting current action in undo history undoes allCampbell Barton
When selecting the current undo step there is no need to do anything. Fix and minor refactor to de-duplicate refreshing after running undo/redo & undo history.
2022-01-11Fix meta-ball bound-box calculation reading past buffer boundsCampbell Barton
This broke "test_undo.view3d_multi_mode_select" test in "lib/tests/ui_simulate" and is likely exposed by recent changes to bounding box calculation. The missing check for DL_INDEX4 dates back to code from 2002 which intended to check this but was checking for DL_INDEX3 twice which got removed as part of a cleaned up. This could be hidden from memory checking tools as meta-balls over-allocate vertex arrays.
2022-01-11Fix T93871: Image.has_data returns True for images that failed to loadBrecht Van Lommel
2022-01-10Fix T93707: Dragging the tweaked NLA strip causes crashSybren A. Stüvel
Earlier code assumed that the active strip was on the active track. This commit detects when this assumption doesn't hold, and adds a more thorough search of the active strip.
2022-01-10Fix T92561: unstable particle distribution with Alembic filesKévin Dietrich
When enabling or disabling a Mesh Sequence Cache modifier of an Object with a hair particle system, the hair would switch positions. This is caused because original coordinates in Blender are expected to be normalized, and toggling the modifier would cause the usage of different orco layers: one that is normalized, and the other which isn't. This bug exposes a few related issues: - if the Alembic file did not have orco data, `MOD_deform_mesh_eval_get`, used by the particle system modifier, would add an orco layer without normalization - `MOD_deform_mesh_eval_get` would also ignore the presence of an orco layer (e.g. one that could have been read from Alembic) - if the Alembic file did have orco data, the data would be read unnormalized To fix those various issues, original coordinates are normalized when read from Alembic and unnormalized when written to Alembic; and a new utility function `BKE_mesh_orco_ensure` is added to add a normalized orco layer if none exists on the mesh already, this function derives from the code used in the particle system. Reviewed By: brecht Maniphest Tasks: T92561 Differential Revision: https://developer.blender.org/D13306
2021-12-02Fix `Action.asset_data["is_single_frame"]` set incorrectlySybren A. Stüvel
The asset metadata custom property `["is_single_frame"]` was set incorrectly. Since this is intended for forward compatibility, including being covered by the asset metadata indexing, it's important to have it set correctly from the first release of Blender that includes the asset browser. Differential Revision: https://developer.blender.org/D13452
2021-12-02Fix T93548: Appended (material) assets don't have a fake userJulian Eisel
Since our design is to always keep data-blocks marked as assets on exit, and our technical design for this is to do this via fake users, ensure the fake user is set for an appended asset. Reviewed by: Bastien Montagne Differential Revision: https://developer.blender.org/D13443
2021-11-30BPath traversing: allow skipping weak library referencesSybren A. Stüvel
Add flag to `BKE_bpath_traverse_id()` and friends to skip weak references (see below). This makes a distinction between "this blend file depends on that file" and "this blend file references that file, but doesn't directly use its data". This distinction is for the Asset Bundle install operator, which refuses to copy the blend file when it's not self-contained. Weak references are those that are not directly used by the blend file, but are still present to allow path rewriting. For example, when an Asset is loaded its originating blend file is saved in `ID::library_weak_reference`; this reference is purely for deduplication purposes, and not for actually loading any data. Reviewed by: mont29, brecht Differential Revision: https://developer.blender.org/D13412
2021-11-29Fix T93384: Objects with Constraints to curves have wrong locations on file loadSergey Sharybin
Regression since 3.93 caused by 752c6d668bcb. Follow the code from 2.93 which was always leaving curve modifiers evaluation with a valid and clean state of the bounding box. This is also what was proposed and agreed on in the following design task: T92206: Bounding Box: compute during depsgraph evaluation Tested with files from T90808 and T93384. For the 3.0 going with the safest and minimal change. The rest of the bounding box un-entanglement is to happen outside of the stable branch. Thanks The patch is based on the code from Philipp Oeser and investigation by Germano Cavalcante and Dr. Sybren A. Stüvel, thanks! Differential Revision: https://developer.blender.org/D13409
2021-11-25Fix T93338: Curve Guide force field crashPhilipp Oeser
Caused by {rBcf2baa585cc8}. For Curve Guide force fields to work, the `Path Animation` option has to be enabled. With it disabled, we are lacking the necessary `anim_path_accum_length` data initialized [done by `BKE_anim_path_calc_data`] which `BKE_where_on_path` relies on since above commit. Now just check for this before using it - and return early otherwise. Prior to said commit, `BKE_where_on_path` would equally return early with a similar message, so that is expected behavior here. Maniphest Tasks: T93338 Differential Revision: https://developer.blender.org/D13371
2021-11-25Fix T91444: Edge Loop Preview fails with two Mirror ModifiersBastien Montagne
The mirror modifiers merge option caused unnecessary re-ordering to the vertex array with original vertices merging into their copies. While this wasn't an error, it meant creating a 1:1 mapping from input vertices to their final output wasn't reliable (when looping over vertices first to last) as is done in BKE_editmesh_vert_coords_when_deformed. As merging in either direction is supported, keep the source meshes vertices in-order since it allows the vertex coordinates to be extracted. NOTE: Since this change introduce issues for some cases (e.g. bound modifiers like SurfaceDeform), this change is only applied to newly created modifiers, existing ones will still use the old incorrect merge behavior. Reviewed By: @brecht Maniphest Tasks: T93321, T91444 Differential Revision: https://developer.blender.org/D13355
2021-11-25Fix T93321: Modified Mirror modifier behavior break some other tools like ↵Bastien Montagne
bound SurfaceDeform. Revert "Fix T91444: Edge Loop Preview fails with two Mirror Modifiers" This reverts commit 1a7757b0bc6945ab7d3b281f3e0dd7130bcf80f0. Caused issue reported in T93321, boiling down to the fact that other operations or modifiers (like the SurfaceDeform one) rely on the order of the vertices in the mesh to remain consistent. Changing this in a modifier would mean those operations need to be reset/re-created (e.g. rebound for the SurfaceDeform case), which is not doable in `do_version` code.
2021-11-24Fix T90808: wrong BoundBox after undo curve selectionGermano Cavalcante
There are two functions that recalculate the boundbox of an object: - One that considers the evaluated geometry - Another that only considers the object's `data`. Most of the time, the bound box is calculated on the final object (with modifiers), so it doesn't seem right to just rely on `ob->data` to recalculate the `ob->runtime.bb`. Be sure to calculate the BoundBox based on the final geometry and only use `ob->data` as a fallback Differential Revision: https://developer.blender.org/D12282
2021-11-24Assets: Sanitize threaded preview creation with undoJulian Eisel
Basically, this fixes disappearing previews when editing asset metadata or performing undo/redo actions. The preview generation in a background job will eventually modify ID data, but the undo push was done prior to that. So obviously, an undo then would mean the preview is lost. This patch makes it so undo/redo will regenerate the preview, if the preview rendering was invoked but not finished in the undone/redone state. The preview flag PRV_UNFINISHED wasn't entirely what we needed. So I had to change it to a slightly different flag, with different semantics.
2021-11-23Fix T93231: crash when overwriting vertex group with other domainJacques Lucke
The problem was that we forgot to actually remove the vertex group when it should be deleted. We only removed all the data that was attached to it. Differential Revision: https://developer.blender.org/D13326
2021-11-23Asset Browser: add operator for installing asset bundlesSybren A. Stüvel
Add an operator "Copy to Asset Library" for installing asset bundles into already-existing asset libraries. The operator is shown when: - the "Current File" library is selected, - the blend file name matches `*_bundle.blend`, and - the file is not already located in an asset library. The user can select a target asset library, then gets a "Save As" dialogue box to select where in that library the file should be saved. This allows for renaming, saving in a subdirectory, etc. The Asset Catalogs from the asset bundle are merged into the target asset library. The operator will refuse to run when external files are referenced. This is not done in its poll function, as it's quite an extensive operator (it loops over all ID datablocks). Reviewed by: Severin Differential Revision: https://developer.blender.org/D13312
2021-11-23Fix T93092: incomplete animation rendering of multi-layer exr compositionJacques Lucke
This was broken by rB0c3b215e7d5456878b155d13440864f49ad1f230. The caching of loaded exr files needed some special treatment. Differential Revision: https://developer.blender.org/D13313
2021-11-23Fix T93090: crash with data transfer modifier and geometry nodesJacques Lucke
There was a missing normals layer that was requested by the data transfer modifier from the target object. The normal layer was correctly added to the target object. However, it never reached the data transfer modifier because the mesh was copied in `BKE_object_get_evaluated_mesh` (in the call to `get_mesh_for_write`) and the copy does not include the normals layer. The solution is to not use `get_mesh_for_write` here which was only used because `BKE_object_get_evaluated_mesh` returns a non-const `Mesh *`. Mid term, it should actually return a `const Mesh *` to avoid the confusion. Differential Revision: https://developer.blender.org/D13319
2021-11-22Fix grayed out preview generation button for light objectsJulian Eisel
Mistake in e7bea3fb6ed0. We should only skip preview generation for objects that don't support preview rendering, not completely forbid accessing preview data of such IDs.
2021-11-19Asset Preferences: disallow single file as asset librarySybren A. Stüvel
Asset libraries should be directories on disk. By manually entering a file path it was possible to have a single blend file as asset library, but that was not a designed-for situation, and it doesn't play well with the asset catalog system.
2021-11-19Fix (unreported) wrong behavior of constraints in liboverrides.Bastien Montagne
All constraints were 'made local', including the ones comming from the reference linked object.
2021-11-18Fix T92442: undo removal of Eevee cryptomatte accurate mode optionBrecht Van Lommel
The Cycles accurate mode was removed, but the Eevee option for this has a different meaning and should not have been removed. The Eevee accurate makes cryptomatte accumulate for every sample, which Cycles has always done regardless of any option.
2021-11-18Fix: error when materializing curve point attributeJacques Lucke
Differential Revision: https://developer.blender.org/D13271
2021-11-17Cleanup: compiler warningsBrecht Van Lommel
2021-11-16Fix T92857: Deadlock in geometry nodes curve multi-threadingHans Goudey
The spline code, especially Bezier splines, often make use of lazily evaluation and caching. In order to do that, they use mutex locks. When multi-threading, this can lead to problems. Further detail can be found in rBfcc844f8fbd0d1. To fix the deadlock, isolate the task before multi-threading when holding a lock. Differential Revision: https://developer.blender.org/D13229
2021-11-16Fix crash on freeing hair systemSybren A. Stüvel
Fix a crash when a hair system's `ParticleSettings` ID datablock was linked from another file but couldn't be found. This results in default settings, with `type = PART_EMITTER`, where the particle data still has a non-NULL `hair` pointer. Previously, copies of such a particle system would NOT copy hair data for non-hair particle systems, hence the pointer of the copy pointed to the original data, which got freed (at least) twice upon closing the blend file. This is now fixed by always copying the hair data, regardless of the particle system type. Reviewed by: mont29 Differential Revision: https://developer.blender.org/D13245
2021-11-16Tests: fix memory leak of GHOST system pathsSybren A. Stüvel
Dispose of GHOST system paths when tearing down `BlendfileLoadingBaseTest` and some other test cases. This prevents a memory leak. A better solution would be to rework Blender's initialisation & teardown structure, but that's outside the scope of this fix. No functional changes to Blender.
2021-11-15Fix T91992: Incorrect clip strip image sizeRichard Antalik
When proxy size lower than 100% is used, clip strips are rendered with incorrect image size. This is because if proxies aren't enabled in movieclip, it automatically falls back on rendering original media. Sequencer doesn't have knowledge about this and since 9c99292a16df it assumes that image is proxy, because it explicitly requested this size. Check movieclip flag to see if proxies are enabled. Reviewed By: sergey Differential Revision: https://developer.blender.org/D13080
2021-11-15Fix T89260: Eevee crashes with custom node sockets.Jeroen Bakker
Cause of this issue is that Custom Node Sockets info type was initialized as SOCK_FLOAT when registering. Areas within the core that would ignore custom socket types by checking its type would use the socket as being a float type. When custom node sockets have a property called default_value blender tries to store it as an internal default value what failed in debug builds. This patch will set the socket type to SOCK_CUSTOM when registering a custom socket type and allow, but skip storage of custom default values. In this case the default values should already be stored as custom properies. Reviewed By: campbellbarton, JacquesLucke Maniphest Tasks: T89260 Differential Revision: https://developer.blender.org/D13174
2021-11-12Assets: Store Action sub-type in asset metadataSybren A. Stüvel
Blender 3.0 will only support single-frame Actions in the pose library. The goal of this patch is to lay the groundwork for making it possible for the Asset Browser to reject/hide "animation snippet" Action assets. Determining whether an Action has one or more frames (i.e. whether it has a single pose or animation) requires inspecting the Action itself, and thus loading the data-block itself. This would make it impossible to quickly determine from the asset browser. To solve this, the Action is inspected before saving, and a `"is_single_frame"` boolean (well, 0/1 integer) IDProperty is added. Reviewed by: Severin Differential Revision: https://developer.blender.org/D13202
2021-11-12Fix T91444: Edge Loop Preview fails with two Mirror ModifiersCampbell Barton
The mirror modifiers merge option caused unnecessary re-ordering to the vertex array with original vertices merging into their copies. While this wasn't an error, it meant creating a 1:1 mapping from input vertices to their final output wasn't reliable (when looping over vertices first to last) as is done in BKE_editmesh_vert_coords_when_deformed. As merging in either direction is supported, keep the source meshes vertices in-order since it allows the vertex coordinates to be extracted.
2021-11-12Cleanup: use term sequence_strip instead of vse_stripCampbell Barton
2021-11-11Fix: wrong field inferencing with unavailable socketsJacques Lucke
2021-11-11Fix: Prevent use of uninitialized memory when creating Bezier splineMartijn Versteegh
When Constructing bezier splines from dna, the positions of the left/right handles were set directly in the internal vectors, by requesting a reference to them. The problem is that BezierSpline::handle_positions_left() calls ensure_auto_handles() before returning the reference. That function does some calculations on uninitialized memory if the positions array is not yet filled. Differential Revision: https://developer.blender.org/D13107
2021-11-11Cleanup: spelling in commentsCampbell Barton
2021-11-10Fix T91518: crash when recalculating looptris after clearing geometry.Jeroen Bakker
When clearing geometry the runtime mutexes of a mesh were freed. This resulted in crashes afterwards. The clear geometry is an RNA function so would only effect when using from scripts. This patch separates init/freeing of the mutexes from other code so they can be used when needed. Reviewed By: mont29 Maniphest Tasks: T91518 Differential Revision: https://developer.blender.org/D13142
2021-11-09Fix T92908: print warning when instance recursion limit is reachedJacques Lucke
Currently we have a fixed instance recursion limit. While we want to lift this limitation at some point, that is out of scope for a bug fix. For now just print a warning to make it easier to detect the issue. Differential Revision: https://developer.blender.org/D13162
2021-11-09Fix T91923: Save/Apply as Shape Key ignores shape keysCampbell Barton
Support virtual modifiers when using applying the modifier as a shape.
2021-11-09Fix T92934: crash rendering with wrong image pathJacques Lucke
These null checks were missing in rB0c3b215e7d5456878b155d13440864f49ad1f230. Differential Revision: https://developer.blender.org/D13157
2021-11-08Fix T92481: Memory leak with subdivision surface modifierCampbell Barton
Interpolation vertex data on loose edges was writing into already allocated data. Resolve this by skipping vertex end-points for custom-data interpolation which has already been copied from the source mesh. Reviewed By: sergey Ref D13082
2021-11-05Fix T92815: Incorrect handling of evaluated meshes from curvesHans Goudey
Evaluated meshes from curves are presented to render engines as separate instance objects now, just like evaluated meshes from other object types like point clouds and volumes. For that reason, cycles should not consider curve objects as geometry (previously it did, meaning it retrieved a second mesh from the curve object as well as the temporary evaluated mesh geometry). Further, avoid adding a curve object's evaluated mesh as data_eval, since that is special behavior for meshes that is arbitrary. Adding an evaluated mesh there but not an evalauted pointcloud is arbitrary, for example. Retrieve the evaluated mesh in from the geometry set in BKE_object_get_evaluated_mesh now, to support that change. This gets us closer to a place where all of an object's evaluated data is stored in geometry_set_eval, and we just have helper functions to access specific geometry components. Differential Revision: https://developer.blender.org/D13118
2021-11-05Fix part of T89313: Attribute search crash during animation playbackHans Goudey
During animation playback, data-blocks are reallocated, so storing pointers to the resulting data is not okay. Instead, the data should be retrieved from the context. This works when the applied search item is the "dummy" item added for non-matches. However, it still crashes for every other item, because the memory is owned by the modifier value log, which has been freed by the time the exec function runs. The next part of the solution is to allow uiSearchItems to own memory for the search items.
2021-11-05Fix T92848: Crash when joining curves with spline domain attributesHans Goudey
The point domain attributes (stored on splines) are sorted so they have a consistent order on all splines after the join. However, spline domain attributes were included in the new order, which didn't work because the length of the attribute lists didn't match. The simple fix is to only include point domain attributes in the new order vector.
2021-11-05Fix: Viewport stats wrong for Geometry Nodes instancesErik
In some cases when geometry is created in Geometry Nodes the viewport stats will show 0 because runtime data is not filled. This patch sets the runtime data on instances. Differential Revision: https://developer.blender.org/D12738
2021-11-05Fix T92850: Curve to mesh incorrect for single point profilesHans Goudey
For single point splines that weren't at the origin, the results were incorrect. Now take into account the tilt, radius, etc. just like the general case.