Commit Graph

120055 Commits

Author SHA1 Message Date
Jeroen Bakker
e1d2eee02b Cleanup: Vulkan: Remove unused variable 2025-03-13 13:31:13 +01:00
Julian Eisel
1ca05d3940 UI: Fix double padding in file browser drawing
Paddings were applied a bit oddly, resulting in a double padding for the
drawing. Each "tile" (the space to draw the file in) already had a padding
applied (`FileLayout.tile_border_x`), we'd apply another one to it. This second
padding should only be used for spacing of individual items *inside* the tile.

Code makes more sense too now, there are fewer arbitrary/eyeballed numbers to
make things "look good".

Pull Request: https://projects.blender.org/blender/blender/pulls/135915
2025-03-13 13:14:53 +01:00
Sybren A. Stüvel
ac4f22cec4 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-13 12:53:59 +01:00
Sybren A. Stüvel
30ba81f805 Fix #135894: Assigned Action can mute NLA strip when reusing the same Action
Fix an issue when the NLA is used in conjunction with a directly-
assigned Action.

When the directly-assigned Action is also used in an NLA strip, that
strip would not be evaluated any more. This was even the case when
different slots were used, which entirely muted the strip when there
was no slot directly assigned. Now the "this has been handled already"
logic considers the action and the slot.

Pull Request: https://projects.blender.org/blender/blender/pulls/135911
2025-03-13 12:50:47 +01:00
Sybren A. Stüvel
565377b8f1 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-13 11:27:13 +01:00
Sybren A. Stüvel
1d20304442 Fix #135894: after "Merge Animation" animation does not play properly
The "Merge Animation" operator now properly tags the affected Actions
with `ID_RECALC_ANIMATION_NO_FLUSH` so that new 'evaluated copies' are
created. Because this was missing, the animation evaluation code didn't
see the moved channelbags yet, which caused animation playback to be
broken.

Pull Request: https://projects.blender.org/blender/blender/pulls/135906
2025-03-13 11:26:42 +01:00
Omar Emara
9f254ef08c Refactor: Compositor: Use BKE conversion for images
This patch refactors the conversion code for images to use BKE
conversion rules. This reduces boilerplate and makes it easier to add
new types.
2025-03-13 12:17:35 +02:00
Jeroen Bakker
1ea1f4c92c Refactor: GHOST/Vulkan: Wrap handles in a struct
Vulkan handles are currently only requested once. In the future OpenXR
also needs acces to these handles and additional handles will be needed
when introducing copy queues and async compute.

This PR will collect the handles in a struct to ensure we don't need to
alter the GHOST interface for every change.

Pull Request: https://projects.blender.org/blender/blender/pulls/135905
2025-03-13 11:06:20 +01:00
Omar Emara
8f2f0520da Cleanup: Unused declaration
Removes a now unused declaration from the previous commit.
2025-03-13 11:49:46 +02:00
Omar Emara
cbd01d2a6f Refactor: Compositor: Reduce boilerplate in conversion code
This patch refactors GPU implicit conversion code by generating the name
of the shaders on the fly using fmt. This reduces boilerplate and makes
it easier to add new types.
2025-03-13 11:38:12 +02:00
Campbell Barton
ff8baa6791 Cleanup: pass BMUVOffsets by const reference 2025-03-13 17:06:32 +11:00
Campbell Barton
78c3f6a1ee Cleanup: adjust order of terms for BMesh UV map function calls
Order more generic terms first for better ordering, more useful
completion.
2025-03-13 15:23:46 +11:00
Campbell Barton
6ec1bc669e UV: correct checks for no-selection
There is no need to check "Sync Selection" as the check for no selected
vertices is also valid when sync-selection is disabled.
2025-03-13 14:57:10 +11:00
Campbell Barton
571bab615c UV: skip adding UV data layers when sync-select is used
When sync select is enabled, the data layers aren't accessed
so there is no need to add them.

Also skip adding a "pin" layer when clearing pinned UV's.
2025-03-13 14:40:56 +11:00
Campbell Barton
4a8e50e5de UI: show an error when rip is attempted with sync select
This was failing with an unhelpful error.
2025-03-13 13:50:16 +11:00
Campbell Barton
13b4da2568 Docs: update bmesh_class.hh header
- Minor corrections & clarifications.
- Use doxygen docs.
2025-03-13 13:41:19 +11:00
Campbell Barton
6ef7dae8ef Cleanup: spelling in comments (make check_spelling_*) 2025-03-13 13:41:17 +11:00
Harley Acheson
9dbd20b369 UI: Hide NLA Scrollbars When Very Short
With commit f40cd831fd we are hiding scrollbars when timeline and many
other editors are sized to be very short. This PR just does the same
for NLE.

Pull Request: https://projects.blender.org/blender/blender/pulls/135834
2025-03-13 01:27:12 +01:00
Pratik Borhade
a0fdbf0fd2 UI: Include obdata in material properties context path
Context path in the header of material properties tab always indicates
material is on object. Include object.data in context path when material
is on mesh for example.

Pull Request: https://projects.blender.org/blender/blender/pulls/134968
2025-03-12 23:09:58 +01:00
Hans Goudey
5f6e94ca58 Grease Pencil: Avoid GPU API overhead when extracting index buffers
Similar changes done elsewhere (#116901), replace usage of the GPU API's
`GPU_indexbuf_add_generic_vert` function by simply writing the index
data that we need. This avoids a function call and min/max tests for
every index added.

Pull Request: https://projects.blender.org/blender/blender/pulls/135404
2025-03-12 21:55:18 +01:00
Hans Goudey
2cf5838b87 Grease Pencil: Slightly optimize IndexMask usage in draw extraction
Instead of computing an index mask for all curves, then returning an
intersection with the visible curves, just use the visible curves as
a universe for the original calculation. Also add another early out
for when there are no NURBS curves.
2025-03-12 21:55:18 +01:00
Hans Goudey
32e96f1ff7 Grease Pencil: Avoid overhead counting visible points for drawing
Currently the drawing data extraction code uses the offset indices API
quite inefficiently, copying the size of every selected every curve, then
accumulating those sizes. Instead just use the existing API function that
counts the size of all selected curves. Also for the weight overlay, avoid
doing the same calculation twice.
2025-03-12 21:55:18 +01:00
Bastien Montagne
ef1d5432cb RNA: LibraryWeakReference: make path and ID name editable.
There is no real reason to keep these read-only, they are not exposed in
the UI anyway, and being able to edit them can become necessary in a
pipeline mamangement context.
2025-03-12 17:50:50 +01:00
Bastien Montagne
4c4e3142df Cleanup: makesrna: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.

This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.

MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.

NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.

Pull Request: https://projects.blender.org/blender/blender/pulls/135870
2025-03-12 17:19:06 +01:00
Omar Emara
b37afc86d1 Refactor: Compositor: Replace proxy results with data sharing
This patch refactors the result class to replace proxy results with the
possibility of doing data sharing through a shared heap allocated data
reference count. This is more robust and simpler since proxy results no
longer need to be handled as a special case in a lot of the results
code. Additionally, it allows stronger const correctness since inputs to
operations can now be const.

This is somewhat similar to implicit sharing used in other parts of
Blender, so we can look into using that in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/135778
2025-03-12 16:42:26 +01:00
Bastien Montagne
f36f9bdb87 Fix (unreported) MOD_surface: raw calloc on non-trivial data.
It seems that this was 'fine', as non-trivial data in `BVHTreeFromMesh`
appear to be 'safe' when simply zero-initialized instead of being
properly constructed.

Note that this 'calloced' data was already 'MEM_deleted', this is
currently considered as a valid use-case unfortunately, otherwise the
issue would have been detected earlier.

Directly use 'copy' `MEM_new` code instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/135862
2025-03-12 15:43:34 +01:00
Bastien Montagne
58d34984d2 Cleanup: modifiers: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.

This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.

MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.

NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.
2025-03-12 15:43:33 +01:00
Brecht Van Lommel
3ff3c2bf21 Merge branch 'blender-v4.4-release' 2025-03-12 15:33:26 +01:00
Hans Goudey
e3df02999b Fix: Build error without FFMPEG 2025-03-12 15:32:36 +01:00
Brecht Van Lommel
a80f4ceb24 Fix #135837: Crash cancelling render with stamp burn into image
The image buffer might not exist if cancelling happens early enough.

Pull Request: https://projects.blender.org/blender/blender/pulls/135861
2025-03-12 15:31:29 +01:00
Hans Goudey
e92f869cf4 Fix: Build error without FFMPEG 2025-03-12 10:05:48 -04:00
Brecht Van Lommel
dc488b99a5 Merge branch 'blender-v4.4-release' 2025-03-12 13:39:50 +01:00
Brecht Van Lommel
92f2027f62 Fix #135806: Wrong error message on render to directory without permission
Make MOV_write_begin always report an error on failure, and remove the
generic one from the caller.

Regression from 974efe7d23.

Pull Request: https://projects.blender.org/blender/blender/pulls/135859
2025-03-12 13:39:00 +01:00
Thomas Dinges
9f66476430 Release: Blender 4.4 goes to RC 2025-03-12 12:30:03 +01:00
Campbell Barton
848cf35495 Cleanup: avoid the "toggle" case being handled twice in UV select all
Harmless but unnecessary.
2025-03-12 22:23:34 +11:00
Bastien Montagne
78969aaff8 Cleanup: nodes: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.

This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.

MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.

NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.

Pull Request: https://projects.blender.org/blender/blender/pulls/135855
2025-03-12 12:15:33 +01:00
Bastien Montagne
bb89c89e7f Cleanup: python: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.

This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.

MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.

NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.

Pull Request: https://projects.blender.org/blender/blender/pulls/135852
2025-03-12 11:21:53 +01:00
Bastien Montagne
9f697c7cc6 Cleanup: render: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.

This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.

MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.

NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.

Pull Request: https://projects.blender.org/blender/blender/pulls/135813
2025-03-12 10:31:06 +01:00
Jesse Yurkovich
f3b1c9b2cd Merge branch 'blender-v4.4-release' 2025-03-11 23:29:04 -07:00
Andrej730
b2fe81a17f Fix: small typo in Alembic Mesh Sequence Cache glob check
Mistake in ea54cbe

Pull Request: https://projects.blender.org/blender/blender/pulls/135287
2025-03-12 07:28:23 +01:00
John Kiril Swenson
7356e72e1b VSE: Snap to Frame Range, Snap by Default
This patch adds the ability to snap to the frame range bounds in the VSE
timeline, on by default. End frame snap location is offset by 1 to
ensure the snap point aligns with the visible end frame boundary
(otherwise e.g. right handle of strip would be one frame short).

Timeline and preview snapping is also turned on by default using the
same versioning block.

Pull Request: https://projects.blender.org/blender/blender/pulls/135753
2025-03-12 03:36:32 +01:00
Brecht Van Lommel
42846caca1 Cycles: Adaptive subdivision support for modifier options
* Use creases
* Boundary interpolation
* UV interpolation

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:17 +01:00
Brecht Van Lommel
da49d2be4f Merge branch 'blender-v4.4-release' 2025-03-11 19:57:37 +01:00
Brecht Van Lommel
1ba20699e9 Fix #135751: Small EXR files fail to load
There is a bug in OpenEXR bug where it requests at least 4096 bytes even
if the file is smaller than that. Work around it by padding with zeros.

This was fixed upstream in commit 97f857131e6b4c43ab after the 3.3.2
release, but not in any official release yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/135796
2025-03-11 19:55:28 +01:00
Falk David
a92b68939a Geometry Nodes: Add "Scale" input to "Curve to Mesh" node
This replaces the implicit use of the `radius` attribute on the input
curves with an input field `Scale` that gets evaluated on the point
domain of the input curves to scale the profile.

It wasn't super intuitive that the `radius` would actually act as
a scale of the profile. E.g. if the radius of the input curve was
`1 meter` the resulting profile was unscaled (scaled by 1), but
wouldn't necessarily have a size of `1 meter` (only if the profile
also had a size of 1m)! If imperial units were used, `3.28084 ft`
would correspond to a scale of 1.

This change makes this behavior a lot more clear and potentially
removes the need for the assumption that the default curve radius
is `1.0f` (Ideally, the default curve radius should be `0.01f`).

While we did consider making the `Scale` input use the `radius`
field implicitly by default, we decided against it, because it again
"hides" the dependency on the radius and the fact that the radius
is used as a scale. Letting the user make this decision seems better.

Pull Request: https://projects.blender.org/blender/blender/pulls/134187
2025-03-11 19:06:47 +01:00
Hans Goudey
d2af128245 Cleanup: Use StringRef for volume grid name access
Previously `.data()` was used incorrectly in some cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/135808
2025-03-11 18:52:23 +01:00
Thomas Dinges
d8e4789244 Merge branch 'blender-v4.4-release' 2025-03-11 17:11:00 +01:00
Christoph Lendenfeld
e7410abaca Fix #135666: Renaming a slot used by multiple IDs breaks animation on certain channels
The issue was that the `FCURVE_DISABLED` flag is set when an
RNA path cannot be resolved, and that skips evaluation.
However in the specific case, that is actually something expected as
the property only exists on one ID and not the other.

Pull Request: https://projects.blender.org/blender/blender/pulls/135782
2025-03-11 16:40:23 +01:00
Julian Eisel
5ba668135a Assets: Display file name and path in asset tooltips
Part of #134755 / #134766.

Add the blend file name and directory path to the tooltip of assets in
custom asset libraries (as configured in the Preferences), for the asset
browser and asset shelf. This information is often important when
dealing with production assets. In the asset shelf it wasn't available
at all.

Based on feedback from the Blender Studio.
2025-03-11 16:21:36 +01:00
Jonas Holzman
76fdbd899d Merge branch 'blender-v4.4-release' 2025-03-11 16:10:44 +01:00