Commit Graph

114889 Commits

Author SHA1 Message Date
Hans Goudey
f379acb2bf Cleanup: Draw: Use enum class for mesh extract type 2024-11-12 11:57:24 -05:00
Richard Antalik
c1bf38fc34 Merge branch 'blender-v4.3-release' 2024-11-12 17:47:28 +01:00
Clément Foucault
6de277d732 Fix: Overlay Next: Incorrect display of facing overlay on transparent textures in solid mode
Based on #128166 with prepass logic fix.
2024-11-12 17:32:03 +01:00
Richard Antalik
ebe209b8ec Fix #126461: Scene sound does not play
Caused by removing scene sound from "main scene" when other strip using
the same scene is not rendering sequencer strips.

Only remove sound when all strips using particular scene are not
rendering sequencer strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/129768
2024-11-12 17:28:20 +01:00
Falk David
d63ead748b Merge branch 'blender-v4.3-release' 2024-11-12 17:27:34 +01:00
Falk David
5ecec47280 Fix #130176: GPv3: Fill tool doesn't write to fill_opacity.
The fill tool didn't write to the `fill_opacity` attribute leading
to non-filled strokes in some cases.

This makes sure that the attribute is created with full opacities.

Pull Request: https://projects.blender.org/blender/blender/pulls/130177
2024-11-12 17:26:47 +01:00
Falk David
2cc33ceaa6 Merge branch 'blender-v4.3-release' 2024-11-12 17:20:57 +01:00
Casey Bianco-Davis
155c21d774 Fix: GPv3: Primitive Tool: Control point misalignments when object or layer is moved.
The problem was that the control point positions where not accounting
for the grease pencil objects transform nor the layer transformation.

Pull Request: https://projects.blender.org/blender/blender/pulls/130005
2024-11-12 17:19:43 +01:00
Bastien Montagne
b325142d17 Merge branch 'blender-v4.3-release' 2024-11-12 16:55:40 +01:00
Bastien Montagne
0b3a7cbe69 Cleanup: Move BKE_image.h and related headers to C++.
NOTE: This also required some changes to Cycles code itself, who is now
directly including `BKE_image.hh` instead of declaring a few prototypes
of these functions in its `blender/utils.h` header (due to C++ functions
names mangling, this was not working anymore).

Pull Request: https://projects.blender.org/blender/blender/pulls/130174
2024-11-12 16:53:54 +01:00
Thomas Dinges
ea72c6468e Merge branch 'blender-v4.3-release' 2024-11-12 16:53:17 +01:00
Laurynas Duburas
f9d89a0dfb Fix: Prevent bezier handle attribute creation on transform
Prevents Bezier handle attribute creation on transform for
`CurvesGeometry` instances without Bezier curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/130165
2024-11-12 16:51:54 +01:00
Jason Fielder
4fc2e1c842 Fix #129661: Wait for GPU to complete to avoid use-after-free issues.
In some cases the MTLContext was being destroyed before all GPU work was completed causing the (outstanding) command buffer completion event handler to update a command buffer that had already been freed. This behaviour was introduced by [this](https://projects.blender.org/blender/blender/commit/6da42e9c951b) change which updated the event handler to track the number of outstanding command buffers per context as well as system-wide.

Reproduced the issue with ASAN enabled and confirmed that waiting for the GPU to complete fixes the issue.

Also contains a minor fix for unitiiliased values in MTLAttachments identified by ASAN.

Authored by Apple: James McCarthy"

Co-authored-by: James McCarthy <jamesmccarthy@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/129686
2024-11-12 16:48:43 +01:00
Falk David
1c9f186e35 Merge branch 'blender-v4.3-release' 2024-11-12 16:18:32 +01:00
Falk David
0a27b3d6ba Fix: GPv3: Fill tool doesn't have a paint cursor
Reverts part of 0872e898bc.
In 4.2, the fill tool had a small paint cursor that could
be turned off using the "Display Cursor" setting.

This makes it so that the cursor for the fill tool behaves
the same as in 4.2.
2024-11-12 16:16:42 +01:00
Clément Foucault
c99d4f15e1 Merge branch 'blender-v4.3-release' 2024-11-12 15:34:27 +01:00
Clément Foucault
e3a960ef2e Fix #129889: EEVEE: Lightprobe Volume bake is non-deterministic
Turns out the sampling module was not initialized when
computing lighting which resulted in undefined shadow location.
In some cases even producing NaN position which would make the
shadow disappear.

Basically, anything returned by `sampling_rng_nD_get` was returning
garbage, and on some occasion, it could be a negative number and
produce NaN if passed into `sample_disk` or any `sqrt`.

ASAN did not catch it because the uninitialized data load
was done on the GPU.

I ran the render tests and, minor difference aside, they all match.

#### Follow Up:
This raises the concern that we have no assertion for correctly
using some modules. At the very least, we should have some
mechanism to catch uninitialized buffer. Investigating this
was a pain au chocolat.

Pull Request: https://projects.blender.org/blender/blender/pulls/130150
2024-11-12 15:29:17 +01:00
Iliya Katueshenock
8bc9e48f14 Cleanup: Geometry Nodes: use general an attribute copy function GP-Instances conversion
This is replacement of a too specific function to copy attributes from a grease pencil to instances.
With #127026 there is no more reason to have such a specific implementation so general `copy` is used now.

Pull Request: https://projects.blender.org/blender/blender/pulls/127027
2024-11-12 15:28:45 +01:00
Omar Emara
bfc79906fc Compositor: Implement Corner Pin for new CPU compositor
Reference #125968.
2024-11-12 16:27:29 +02:00
Omar Emara
aff8a8878f Fix: Zero division in Corner Pin node
Points at infinity in the Corner Pin node causes zero division, so
early exit with a zero.
2024-11-12 16:27:29 +02:00
Clément Foucault
df07e91dff Fix: Overlay: Assert when using selection
Caused by copying texture content to a texture
with different format.
2024-11-12 15:25:55 +01:00
Falk David
bbcece38ba Merge branch 'blender-v4.3-release' 2024-11-12 15:12:51 +01:00
Falk David
43fde8c39c Fix: #130045: Crash in length modifier with 2 point curves
The length modifier was not handling 2 point curves correctly.

This change does two things:
1) Fix the crash by copying the original indices for 2 point curves into `dst_to_src_point`.
2) Fallback to `extend_curves_straight` for extending 2 point curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/130122
2024-11-12 15:11:59 +01:00
Falk David
c8211b23c7 Refactor: Add CurvesGeometry::is_empty() function
Previously, some places used `curves.points_num() == 0` some other
places `curves.curves_num() == 0` to check if the geometry is empty.

Rather than having these two ways, add an `is_empty()` function
that replaces all these different checks.

Also update the curves geometry tests to use this function.

Pull Request: https://projects.blender.org/blender/blender/pulls/130168
2024-11-12 14:46:24 +01:00
Falk David
0a51b9a357 Merge branch 'blender-v4.3-release' 2024-11-12 14:45:19 +01:00
Pratik Borhade
22d94df4cf Fix: GPv3: "Only In Multiframe" overlay not working
There were some issues in the code that sets up the draw calls.
The `only_lines` option needs to consider multi frame editing.

Resolves #129873.

Pull Request: https://projects.blender.org/blender/blender/pulls/129944
2024-11-12 14:44:31 +01:00
Clément Foucault
642933ffe6 Metal: Guard advanced vertex format against newer osx version
Fixes a build error on older macos.
2024-11-12 13:06:15 +01:00
Clément Foucault
b17af94e2e EEVEE: Use packed type for codegen structs
This reduces register pressure on mac.

Mr Elephant 17.9s > 17.2s (4% speedup)

Extracted from #116728

Pull Request: https://projects.blender.org/blender/blender/pulls/129605
2024-11-12 12:58:58 +01:00
Omar Emara
3f2f3cb08d Merge branch 'blender-v4.3-release' 2024-11-12 13:54:31 +02:00
Omar Emara
a0cfb0b142 Fix #130134: Double Edge Mask uses too much memory
The Double Edge Mask node uses too much memory when it is not connected
to anything in the Full-Frame compositor. That's because it tries to
allocate a buffer of size 131072x131072, which is due to the cumulation
of multiple issues.

1. The Full-Frame compositor evaluates nodes that are not connected to
   the output.
2. The constant folder assigns a bounds of +-65536 to its output memory
   buffers as a maximum possible value.
3. Then the MemoryBuffer::inflate method doesn't know about the constant
   folder special value, so it tries to allocate a buffer of that size.

The safest fix for now is to clear the output and return early if all
inputs are single value.

The problem is that this issue might happen for other nodes that also
satisfy the 3 issues above, that is, uses inflate and can be constant
folded. I manually checked for such nodes and there are no nodes that
satisfy all three, so hopefully this is isolated to the Double Edge Mask
node.

Pull Request: https://projects.blender.org/blender/blender/pulls/130163
2024-11-12 12:53:23 +01:00
Omar Emara
d787922df9 Compositor: Implement Plane Deform for new CPU compositor
Reference #125968.
2024-11-12 13:48:26 +02:00
Omar Emara
741c7d8a8a Compositor: Implement EWA filtering for new CPU compositor
Reference #125968.
2024-11-12 13:46:01 +02:00
Omar Emara
9d82daefdd Fix: Zero division in Plane Deform node
Points at infinity in the Plane Deform node causes zero division, so
early exist since they needn't be accumulated.
2024-11-12 13:44:01 +02:00
Pratik Borhade
bf7cd4f975 Merge branch 'blender-v4.3-release' 2024-11-12 16:40:27 +05:30
Pratik Borhade
4e907829d3 Fix #128099: Outliner isolate collection tweaks linked data
Mistake in e494a44024
Even though collection/object PointerRNA argument is same in most cases,
use `layer_or_collection_prop` in if() before assigning value to
collection property (`base_or_object_prop`argument value is  null in function
call from `_isolate_flag()`).

Pull Request: https://projects.blender.org/blender/blender/pulls/129250
2024-11-12 12:07:59 +01:00
Falk David
0e37d6fd3d Merge branch 'blender-v4.3-release' 2024-11-12 11:57:45 +01:00
Falk David
32c76ee768 Fix: GPv3: Unused parameter in remove_from_vertex_group
Caused by 5585d29d30.
Forgot to remove the parameter.
2024-11-12 11:56:59 +01:00
Pratik Borhade
5585d29d30 Fix: GPv3: Vertex group functions edit all keyframes
Instead of looping through all drawings in the vertex group kernel
function, loop through all/visible drawings in the operators and
pass a single drawing to `remove_from_vertex_group`.

Continuing !129789.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/129890
2024-11-12 10:44:59 +01:00
Campbell Barton
4306e746a5 Fix #129630: Inconsistent marker selection
- Modifications for marker selection to use the same behavior as
  key selection in the dopesheet.
- Animation editors now mask out events for the timeline (when there are markers).
- Resolve logical conflicts with the Dope sheet keymap.
- Add Shift Drag & Ctrl Drag for box select & de-select.

Pull Request: https://projects.blender.org/blender/blender/pulls/129841
2024-11-12 10:37:51 +01:00
Falk David
f28bbfc702 Merge branch 'blender-v4.3-release' 2024-11-12 10:22:32 +01:00
Sybren A. Stüvel
ae5717905b Fix #130090: Grease Pencil object in NLA cause Blender to crash
Add some missing `nullptr` and `ale->type` checks to ensure the
assmptions the rest of the code makes holds.

The direct cause of this issue is likely
822907a68d. The root cause is the hard to
predict behaviour of the animation filtering system combined with a lot
of pointer casts without testing whether the data is actually of the
expected type.

Pull Request: https://projects.blender.org/blender/blender/pulls/130148
2024-11-12 10:19:27 +01:00
Omar Emara
b98185a035 Fix: Anti-Alias node produces wrong value when unlinked
The Anti-Alias node produces wrong values when unlinked due to a switch
case that mistakenly fall-through.
2024-11-12 07:49:51 +02:00
Colin Basnett
aa0ffb04f9 Fix: Outliner not immediately updated when parent bone property changed
This fixes an issue where the outliner would not be immediately
updated after changing the parent of a bone. The issue was simply
that the outliner was not being flagged to update in the callback
function.

Pull Request: https://projects.blender.org/blender/blender/pulls/129933
2024-11-12 04:57:37 +01:00
Pratik Borhade
1d14390f99 Fix #129297: Gizmo missing for unlocked layer when autolock inactive is on
`set_active_node` call from `grease_pencil_copy_data` resets inactive
layer again as locked before executing the drawing code. Since property
is only operated on layers, it is possible to remove the code from
`set_active_node()` and only have it in `set_active_layer()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/129465
2024-11-12 09:09:28 +05:30
Sean Kim
406f259920 Merge branch 'blender-v4.3-release' 2024-11-11 11:05:59 -08:00
Sean Kim
009fb327ee Fix #130101: Boundary brush radius uses incorrect initial value
Introduced in 99c55bdbfb

Pull Request: https://projects.blender.org/blender/blender/pulls/130154
2024-11-11 20:02:36 +01:00
Hans Goudey
7d68a4ca14 Refactor: Sculpt: Shape key deformation consistency & deduplication
Make use of the struct and patterns from 005e02d008 to make
the view places that deform shape keys more similar. While they each are
slightly different for valid reasons, with this change they follow the
same structure and use the same helper struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/129901
2024-11-11 19:35:24 +01:00
Hans Goudey
312052112a Cleanup: Remove references to legacy Grease Pencil type
See #123468.

Pull Request: https://projects.blender.org/blender/blender/pulls/130151
2024-11-11 19:11:03 +01:00
Falk David
4bf63b69f0 Merge branch 'blender-v4.3-release' 2024-11-11 18:43:57 +01:00
Jacques Lucke
3f3f8d315d Fix: don't show Geometry Nodes modifier gizmos for unselected objects
It's unexpected that the gizmos show for unselected objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/130144
2024-11-11 18:42:53 +01:00