Commit Graph

150077 Commits

Author SHA1 Message Date
Weizhen Huang
4a4270d73c Merge branch 'blender-v4.2-release' 2024-07-08 16:19:41 +02:00
Michael Jones
5a29be3c75 Cycles: Fix #116243, #122022 - MetalRT live viewport stability issues
This PR fixes live viewport stability issues on Mac when MetalRT is enabled.

There were two sources of instability:

1) `MTLAccelerationStructure` instances were not being correctly retained meaning that use-after-free crashes could occur following a geometry sync.
2) `MTLIntersectionFunctionTable` objects could be unsafely shared between multiple `MetalDeviceQueue` instances (in this case, `setBuffer` being the unsafe mutation)

The solution to 2 involves creating a new `MetalDispatchPipeline` type which is strictly used by only 1 `MetalDeviceQueue` instance.

Pull Request: https://projects.blender.org/blender/blender/pulls/124055
2024-07-08 16:18:34 +02:00
Weizhen Huang
204b99dd3f Fix #124241: Light-linked objects render incorrectly in volumes
the object in volume stack should be used instead of `isect.object`.

NOTE: this solution does not work for overlapping volumes. But since
light linking of overlapping volumes did not work before, it should be
fine to implement this partial solution. We read the bottom of the stack
instead of the top to avoid looping through the entire stack.

Pull Request: https://projects.blender.org/blender/blender/pulls/124341
2024-07-08 16:17:39 +02:00
Michael Jones
3c38bff667 Cycles: Fix MetalRT motion blur setup buffer overrun
This PR fixes a buffer overrun crash in the MetalRT backend. When non-traceable objects are in the scene, 'num_motion_transforms' is undercounting and the downstream buffer writes (i.e.`motion_transforms[motion_transform_index++]`) are overrunning.

Pull Request: https://projects.blender.org/blender/blender/pulls/124351
2024-07-08 16:17:19 +02:00
Philipp Oeser
782b9a80fe Merge branch 'blender-v4.2-release' 2024-07-08 16:04:28 +02:00
Philipp Oeser
93585602a1 Fix #100164: Alembic import: Ensure mesh normals are normalized
Similar to !124267 and !124261

This normal data is eventually passed into `BKE_mesh_set_custom_normals`
and through to `mesh_normals_corner_custom_set` which expects normals to
actually be normalized per its documentation.

Not doing so would yield meshes with incorrect "sharp" data for affected
edges.

Thx @OmarEmaraDev for the initial patch

Pull Request: https://projects.blender.org/blender/blender/pulls/124336
2024-07-08 16:03:52 +02:00
Philipp Oeser
90c03bd040 Merge branch 'blender-v4.2-release' 2024-07-08 15:59:40 +02:00
Michael Jones
ea3c376b4d Cycles: Avoid spam Metal pipeline creation during viewport animation
This PR adds a tag to prevent `kernel_data.integrator.seed` being baked into Metal pipelines as a specialisation constant when full kernel specialisation is enabled. This stops new pipelines from being continually compiled when animation is playing in live viewport mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/124349
2024-07-08 15:53:35 +02:00
Miguel Pozo
6c8e14bb30 Merge branch 'blender-v4.2-release' 2024-07-08 15:25:12 +02:00
Miguel Pozo
a7e24222cf EEVEE: Show compilation subprocesses information
Inform the user when EEVEE is compiling materials and parallel
compilation is disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/124249
2024-07-08 15:23:58 +02:00
Hans Goudey
47dada536d Merge branch 'blender-v4.2-release' 2024-07-08 09:23:49 -04:00
Hans Goudey
80a0c4237a Fix #121696: Use after free with static asset caches when opening new file
The cause of the crash was that asset libraries are freed, but the filtered
trees used for things like node tool menus weren't marked dirty, so we
continued to use the freed asset data. On a design level this is quite
concerning because it means the lifetimes of the asset tree caches and
the asset system's asset libraries are connected tenuously.

Eventually there should be a better solution, but I found the simplest
fix for now is just to add a notifier when opening a new file that causes
the asset tree caches to be tagged dirty.

Pull Request: https://projects.blender.org/blender/blender/pulls/124254
2024-07-08 15:10:42 +02:00
Lukas Tönne
996520960b Merge branch 'blender-v4.2-release' 2024-07-08 15:05:42 +02:00
Lukas Tönne
d14478c747 Fix #124310: Add override flag to prevent infinite recursion
The `enum_definition` property was changed by #121234 and now returns
the node itself. This creates an infinite recursion in the override
system that must be avoided by adding this flag.

Pull Request: https://projects.blender.org/blender/blender/pulls/124347
2024-07-08 15:04:49 +02:00
Lukas Stockner
26b6c2b94d Fix #124211: FCurve generates NaNs with Vector handles
The issue here was that the left handle of the first point was calculated
incorrectly (set to the position of the point itself), which caused a
NaN when attempting to normalize a zero vector when computing extrapolation
vectors.

Pull Request: https://projects.blender.org/blender/blender/pulls/124239
2024-07-08 15:01:18 +02:00
Sergey Sharybin
2925e84e15 Merge branch 'blender-v4.2-release' 2024-07-08 14:38:33 +02:00
Alaska
a0869d2ca6 Shader: Update Principled BSDF node description
Update the description to mention the node is now based on the OpenPBR
model rather than the Disney Principled Model. This has been the
case since Blender 4.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/124209
2024-07-08 14:38:07 +02:00
Campbell Barton
c859ae0f93 Merge branch 'blender-v4.2-release' 2024-07-08 22:36:19 +10:00
Campbell Barton
6ed97d7bd6 Merge branch 'blender-v4.2-release' 2024-07-08 22:36:16 +10:00
Campbell Barton
df162e5f1b Merge branch 'blender-v4.2-release' 2024-07-08 22:36:13 +10:00
Campbell Barton
67bb5b25b1 Cleanup: add printf function attributes, quiet GCC warnings 2024-07-08 22:32:53 +10:00
Campbell Barton
5eef5454fa Fix #124250: enabling add-ons from command line broken
Excluding add-ons caused an `_bpy_internal.addons` not to install.
2024-07-08 22:27:47 +10:00
Jeroen Bakker
6471b715b2 Vulkan: Remove performance warning about depth clearing
When clearing depth attachment the write depth state should be enabled.
When this isn't the case a clear texture is being performed. Before
the render graph this used to be a performance issue as the rendering
would be suspended.

The render graph currently reorders these texture clears before of
the rendering context and therefore isn't seen as a performance issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/124340
2024-07-08 14:00:40 +02:00
Falk David
065219b6fa Fix: GPv3: Draw Tool creates wrong curve type
The draw tool was creating catmull-rom curves because the
curve type attribute was being reset to the default (0) which
happens to be the catmull-rom type.

The fix makes sure to skip over the `curve_type` attribute when
initializing the other attributes to their default.
2024-07-08 13:59:01 +02:00
Bastien Montagne
5270d72426 Fix (unreported) yet another MEM_new/MEM_freeN mismatch... 2024-07-08 13:54:15 +02:00
Bastien Montagne
9f90594db7 UI: Support non-C-allocated data for buttons and blocks func_argN data.
This change allows to pass optional freeing and copy callbacks to
functions setting the `func_argN` member of the `uiBut` and `uiBlock`
structs. These callbacks are used to free or duplicate the data stored
in these void pointers.

Defaults are set respectively to `MEM_freeN` and `MEM_dupallocN`, to
match previous hard-coded behavior.

Utils template functions are added to easily generate callbacks to
types that are managed with the `MEM_new`/`MEM_delete` C++-style
allocation, as long as they provide a copy constructor.

Note that this change should be considered as a temporary, transitional
solution. A more robust and future-proof solution is to move towards
more usage of `std::function` for these callbacks, which can then own
and manage their custom data themselves.
2024-07-08 13:54:15 +02:00
Damien Picard
9a0b5ac0c6 I18n: Translate sequencer channel and metastrip names
Both the metastrips and sequencer channels are user-editable data, so
translation of their names uses DATA_().

Issues reported by Gabriel Gazzàn.

Pull Request: https://projects.blender.org/blender/blender/pulls/124314
2024-07-08 13:00:09 +02:00
Damien Picard
e9de6b5e7a I18n: More translation fixes for Rigify
Allow translation of a few missing messages in the Rigify add-on. In
particular, the most important "Generate Rig" button!

Some issues reported by Gabriel Gazzàn.
2024-07-08 13:00:08 +02:00
Jeroen Bakker
180a257eef Cleanup: Vulkan: Use stamp in stead of version
Pull Request: https://projects.blender.org/blender/blender/pulls/124339
2024-07-08 12:56:21 +02:00
Casey Bianco-Davis
18b5f510d4 Fix #122536: GPv3: Render cyclic stroke with 2 point break next fills.
The issue was that parts of the code considered cyclic strokes with less than 3
points to also have a fill.

Pull Request: https://projects.blender.org/blender/blender/pulls/124266
2024-07-08 12:48:45 +02:00
Jeroen Bakker
08d365b810 Vulkan: Cleanup barrier state
Try to reduce the barrier state so we can be more flexible when adding
support for sub resource tracking.

Pull Request: https://projects.blender.org/blender/blender/pulls/124237
2024-07-08 12:28:11 +02:00
Bastien Montagne
4195e9e1a7 MEM_guarded: Improve error reporting usefulness.
The main change from this commit is the usage of ASAN poisoning (if
available) to trigger an ASAN report on the erroring memory block.

The main benefit is the report of the allocation backtrace of that
faulty memory block.

Pull Request: https://projects.blender.org/blender/blender/pulls/124231
2024-07-08 12:10:37 +02:00
Campbell Barton
cdb61375fe Merge branch 'blender-v4.2-release' 2024-07-08 18:27:52 +10:00
Campbell Barton
386d6f098a AUTHORS: correct invalid de-duplication 2024-07-08 18:20:53 +10:00
Campbell Barton
e52783033d Merge branch 'blender-v4.2-release' 2024-07-08 15:31:44 +10:00
Campbell Barton
9bbf269fe3 Extensions: suppress all pylint warnings & handle add-on errors
- Suppress pylint warnings via comments or be minor changes.
- Any errors disabling add-ons before upgrading or uninstalling are now
  reported to the operators.
- Disable cyclic import warning is it's impractical to resolve.
- Enable useless-suppression warning.
2024-07-08 15:29:27 +10:00
YimingWu
0fbb83ef85 Fix #124296: Lower case name in Multistroke modifier
Just a typo in Grease Pencil Multistroke modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/124327
2024-07-08 06:09:50 +02:00
Campbell Barton
817efe4aef Merge branch 'blender-v4.2-release' 2024-07-08 13:33:34 +10:00
Campbell Barton
05feac04fa Extensions: minor changes to error handling & uninstalling
- Any change that cases validate to fail reports a fatal_error.
- If removing a package fails, attempt to the remove cache.
2024-07-08 13:27:58 +10:00
Campbell Barton
bae1d3311f Merge branch 'blender-v4.2-release' 2024-07-08 13:05:49 +10:00
Campbell Barton
ac6e216b26 Merge branch 'blender-v4.2-release' 2024-07-08 13:05:45 +10:00
Campbell Barton
74f8ac15f5 Extensions: "build --split-platform" now includes it's own wheels
The `[build.generated]` section now includes a filtered list of wheels
to simplify checking existing wheels on the server.

Also disallow quotes & control characters in wheel paths because they
already shouldn't be used and doing so would cause escaping issues in
the generated TOML.

Implements #124242.
2024-07-08 12:50:43 +10:00
Campbell Barton
f3630777f6 Extensions: show add-on errors in the add-ons panel
Restore the UI from 4.1. Also correct an error when extensions are
disabled.
2024-07-08 11:36:52 +10:00
Jesse Yurkovich
74c282f532 Merge branch 'blender-v4.2-release' 2024-07-07 12:28:30 -07:00
Jesse Yurkovich
f49780b888 Fix #120590: USD: Ensure mesh normals are actually normalized
This normal data is eventually passed into `BKE_mesh_set_custom_normals`
and through to `mesh_normals_corner_custom_set` which expects normals to
actually be normalized per its documentation.

Not doing so would yield meshes with incorrect "sharp" data for affected
edges.

Pull Request: https://projects.blender.org/blender/blender/pulls/124267
2024-07-07 21:27:01 +02:00
Julian Eisel
7ef0c37bef Fix MEM_new/MEM_freeN mistach
Calling `MEM_freeN` on data allocated with `MEM_new` is bad, since it will not
call a destructor matching the one invoked as part of `MEM_new`.

Would crash with the guarded allocator, which detects such mismatches now.
2024-07-07 19:08:13 +02:00
Jacques Lucke
d58f1f614e Merge branch 'blender-v4.2-release' 2024-07-07 11:17:41 +02:00
Jacques Lucke
bdb444bc2b Fix #124290: frames disappear when an invalid link exists 2024-07-07 11:16:50 +02:00
Campbell Barton
a515da841b Merge branch 'blender-v4.2-release' 2024-07-07 17:51:42 +10:00
Campbell Barton
5877efbec3 Extensions: add missing checks for errors in IO, JSON & TOML data
Exceptions need be caught and forwarded so they show it in Blender's
interface. While most common errors where accounted for, various IO
errors & malformed JSON/TOML could cause internal operations to fail
with unhandled exceptions.
2024-07-07 17:43:33 +10:00