Commit Graph

147674 Commits

Author SHA1 Message Date
Campbell Barton
a65569f367 Merge branch 'blender-v4.4-release' 2025-03-12 21:55:59 +11:00
Campbell Barton
6702645e8d AUTHORS: add 37 new authors 2025-03-12 21:52:39 +11:00
Sybren A. Stüvel
6def7c3276 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-12 11:47:31 +01:00
Sybren A. Stüvel
9c1845dbf2 Fix #135775: Bake to an empty Action using bake_action_objects throws error
Fix a few small mistakes in the action baking code:

- Assigning an action slot should only happen after the action itself has
  been assigned.
- `_ensure_channelbag_exists()` didn't actually ensure the channelbag
  always exists; now it also creates the layer & strip if necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/135853
2025-03-12 11:46:34 +01:00
Brecht Van Lommel
71a4f1ab96 Merge branch 'blender-v4.4-release' 2025-03-12 11:40:08 +01:00
Brecht Van Lommel
73ea95a56a Fix #135644: HIP-RT crash with host memory fallback
Avoid manipulating the host pointer in device memory, this fails when host
mapped memory gets used and the pointers gets re-allocated.

Pull Request: https://projects.blender.org/blender/blender/pulls/135724
2025-03-12 11:38:07 +01:00
Brecht Van Lommel
0ff2635131 Fix #135644: Cycles HIP-RT crash when running out of memory
Tightehn up checks for failed allocations, early out on errors.

Pull Request: https://projects.blender.org/blender/blender/pulls/135724
2025-03-12 11:37:59 +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
49e70c8781 Tests: Update for sequencer soft light changes
The hash was previously updated for this, but the commit was not merged
into the blender-test-data main branch.
2025-03-11 21:59:31 +01:00
Brecht Van Lommel
b1559b3ff4 Cycles: Adaptive subdivision patches without inner grid
Means low res patches can have 2 instead of 4 triangles.

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:36 +01:00
Brecht Van Lommel
de821416c7 Cycles: Adaptive subdivision dicing and splitting improvements
* Share vertices between patches instead of using stitch map
* Switch to OpenSubdiv compatible counter-clockwise indexing
* Simplify patch edge reverse direction logic
* Add more comments to splitting and dicing

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:33 +01:00
Brecht Van Lommel
e84b377eae Refactor: Simplify subd patch code
* Remove unused linear patch normals
* Renaming for consistency and clarity
* Shuffle order of function definitions

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:20 +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
82751ca10c Cycles: Adaptive subdivision motion blur support
* Smooth interpolation of vertex coordinates and normals of motion steps
* Fix issues with Blender sync and object device update

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:14 +01:00
Brecht Van Lommel
62201eb372 Cycles: Adaptive subdivision smooth UV interpolation
Using OpenSubdiv FVar interpolation.

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:10 +01:00
Brecht Van Lommel
07b60c189b Cycles: Perform attribute subdivision on the host side
* Add SubdAttributeInterpolation class for linear attribute interpolation.
* Dicing computes ptex UV and face ID for interpolation.
* Simplify mesh storage of subd primitive counts
* Remove kernel code for subd attribute interpolation
* Remove patch table packing and upload

The old optimization adds a fair amount of complexity to the kernel, affecting
performance even when not using the feature. It's also not that useful as it
does not work for UVs that needs special interpolation. With this simpler code
it should be easier to make it feature complete.

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:07 +01:00
Brecht Van Lommel
afd139f07e Refactor: Split OsdMesh off from OsdData
Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:05 +01:00
Brecht Van Lommel
7685b9016a Cycles: Use fixed instead of adaptive subdivision max isolation level
Same as what Blender does by default.

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:03 +01:00
Brecht Van Lommel
e9a20b8ce8 Refactor: Better handling of OpenSubdiv namespace
Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:58:01 +01:00
Brecht Van Lommel
189efd8eeb Refactor: Move more subdivision code into subd/
No logic or functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:57:59 +01:00
Brecht Van Lommel
6ec541ca4e Refactor: Cycles: Remove face normal attribute
It's already computed on demand in the kernel, no need to have it host side.

Pull Request: https://projects.blender.org/blender/blender/pulls/135681
2025-03-11 20:57:51 +01:00
Brecht Van Lommel
da49d2be4f Merge branch 'blender-v4.4-release' 2025-03-11 19:57:37 +01:00
Brecht Van Lommel
221dd26604 Cleanup: Cycles + lite build compiler warnings 2025-03-11 19:56:04 +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
820d550170 Utils: Update git author map 2025-03-11 17:58:33 +01:00
Thomas Dinges
d8e4789244 Merge branch 'blender-v4.4-release' 2025-03-11 17:11:00 +01:00
Thomas Dinges
8ef60f7cc8 Release: Update freedesktop file for 4.4 2025-03-11 17:10:29 +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
Jonas Holzman
27117e0ffc Fix: macOS: Wrong QuickLook aspect ratio for screenshot previews of blend files
This patch fixes a visual issue where the QuickLook previews/thumbnails
of blend file (introduced in PR #107072) would have a distorted square
aspect ratio instead of their original aspect ratio. Fixed by using the
original image aspect ratio scaled to honor the QLFileThumbnailRequest's
maximumSize as per the official documentation[1].

[1]: https://developer.apple.com/documentation/quicklookthumbnailing/qlthumbnailreply/init(contextsize:currentcontextdrawing:)?language=objc

Pull Request: https://projects.blender.org/blender/blender/pulls/135691
2025-03-11 16:09:42 +01:00
Julian Eisel
83924ff663 Fix: UI: Quick tooltip label overridden by custom tooltip function
Using `UI_but_func_tooltip_custom_set()` to create a custom tooltip
would completely disable the quicker label tooltip, even when explicitly
set using `UI_but_func_tooltip_label_set()`. Instead the quick label
should show first, and then the full tooltip once the usual tooltip
timer is reached.
2025-03-11 15:56:35 +01:00
Philipp Oeser
d34962555f Merge branch 'blender-v4.4-release' 2025-03-11 15:23:58 +01:00
Philipp Oeser
45949cffe2 Fix #127352: Image Editor mask Frame Selected wrong on non-square image
Was not taking image size/aspect into account.
Luckily, we have `BKE_mask_coord_to_image` which can do exactly that, so
use it.

NOTE: probably oversight in 96d9801423

Pull Request: https://projects.blender.org/blender/blender/pulls/135790
2025-03-11 15:23:41 +01:00
Habib Gahbiche
1230ed9627 Fix: invalid cryptomatte output image when input is not connected
**How to reproduce:**
1. Add Cryptomatte Node
2. Enable 'Object' render passes
3. Connect Cryptomatte to output (composite or viewer node)
4. Optional: set matte ID
5. (Do not connect input image)
6. Render
7. Observe invalid output image (or assert in debug build)
(see also PR for an example blend file)

Only CPU is affected. The solution follows the behavior of the GPU backend, where the input color of the single value input image is multiplied with the matte result to produce a non constant output.

Pull Request: https://projects.blender.org/blender/blender/pulls/135786
2025-03-11 15:22:55 +01:00
Sybren A. Stüvel
b986b6d76d Cleanup: add explanation why key insert does not flush animation
Add an explanation to the keyframe insertion function
`animrig::insert_keyframes()` as to why it does not use
`ID_RECALC_ANIMATION`:

Animation flushing would be quite annoying in the following case:

- Key Cube's loc/rot/scale.
- Go to another frame.
- Translate, rotate, and scale the cube.
- Hover over the loc/rot/scale properties and one by one press 'I' to
  insert a key there.

If `ID_RECALC_ANIMATION` were used, keying the location would immediately
cause a flush of the animation data, popping the rotation and scale back
to their animated values.

No functional changes.
2025-03-11 14:52:56 +01:00
Sebastian Parborg
09ba1aabbd Refactor: Make the event queue only use runtime data.
Also make it more clear that some of the functions are internal
functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/135181
2025-03-11 14:39:19 +01:00
Sebastian Parborg
ec29eb6580 Refactor: Make it more obvious that wm_event_add is not a static function
By renaming it to WM_ follow the other public functions.
2025-03-11 14:39:18 +01:00
Sebastian Parborg
73b7edbe09 Refactor: Move the notifier event queue to use runtime data.
Also make it a bit more obvious when some functions are for internal use
and not.
2025-03-11 14:39:18 +01:00
Habib Gahbiche
9fd67803dc Fix: invalid cryptomatte output image when input is not connected
**How to reproduce:**
1. Add Cryptomatte Node
2. Enable 'Object' render passes
3. Connect Cryptomatte to output (composite or viewer node)
4. Optional: set matte ID
5. (Do not connect input image)
6. Render
7. Observe invalid output image (or assert in debug build)
(see also PR for an example blend file)

Only CPU is affected. The solution follows the behavior of the GPU backend, where the input color of the single value input image is multiplied with the matte result to produce a non constant output.

Pull Request: https://projects.blender.org/blender/blender/pulls/135786
2025-03-11 14:05:04 +01:00
Julian Eisel
19982a01df Merge branch 'blender-v4.4-release' 2025-03-11 12:49:55 +01:00
Julian Eisel
830342bf8e Fix #134264: Cannot undo asset catalog changes to before initial save
When saving a file, move the catalog service from the runtime asset library into the new on-disk
asset library. This makes all catalog data like the undo history and deleted catalogs be preserved.
The fact that a new asset library type gets allocated is an implementation detail that shouldn't
affect behavior.

Once the service is moved, an undo push is added (so this state can be restored to), and if the new
.blend file location can be associated with a catalog definition file, its catalogs are merged in.

Includes unit tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/135589
2025-03-11 12:49:02 +01:00
Clément Foucault
f7e4fbc636 DRW: Add different mutex for GPUShader critical section
This removes the use of `system_gpu_context_mutex`
which was making render command submission threadsafe.

The only issue is the concurent usage of GPUShader objects.
To fix this, we only guard the submission section which
are the only parts that uses the GPUShaders.

Removing this critical section all together requires some changes
in the GPUShader. See #135406

Rel #134690

Pull Request: https://projects.blender.org/blender/blender/pulls/135595
2025-03-11 12:06:11 +01:00
Falk David
c02449ebea Merge branch 'blender-v4.4-release' 2025-03-11 11:50:23 +01:00