Commit Graph

151172 Commits

Author SHA1 Message Date
Sean Kim
14bf22ffb5 Merge branch 'blender-v4.5-release' 2025-06-23 08:58:52 -07:00
Sean Kim
ffcbe6205b BLI: Add assert for indexed_data_equal
Typically, we use this function to determine whether or not a subset of
data that has been collected with `gather` needs to be then persisted
into a larger array with `scatter`. As such, it makes sense to assert on
equality of the indices and smaller array size.

Pull Request: https://projects.blender.org/blender/blender/pulls/140752
2025-06-23 17:57:59 +02:00
Philipp Oeser
c3ac501fa0 Merge branch 'blender-v4.5-release' 2025-06-23 17:52:46 +02:00
Philipp Oeser
5790ff3b6a Fix #140801: Particle Weight Overlay Broken
Was not showing weights on the lines (but the points instead).
Points were supposed to show selection though, not weights.

This is now corrected.

Pull Request: https://projects.blender.org/blender/blender/pulls/140862
2025-06-23 17:52:31 +02:00
Philipp Oeser
32d8860316 Merge branch 'blender-v4.5-release' 2025-06-23 17:52:04 +02:00
Clément Foucault
0e6dee37fa Fix: DRW: Assert caused by empty strand buf
Vertex buffers need to be at least 1 vertex in size.
2025-06-23 17:39:06 +02:00
Habib Gahbiche
5f00f9e08a Fix #140381: Crash after creating a node group and undo
We need to ensure that the compositor preview depsgraph gets updated
properly after undo, now that the compositing node tree is not embedded
in the scene anymore.

A test case will be committed separately in #140595

Pull Request: https://projects.blender.org/blender/blender/pulls/140596
2025-06-23 16:18:55 +02:00
Bastien Montagne
13068b2e9c RNA: Add 'self as RNA' flag for RNA functions.
This allows such functions' callbacks to receive the 'self' data as a
PointerRNA, instead of a pointer of the relevant DNA type.

This commit also adds some validation of flags when defining them for
a FunctionRNA.

Part of !135807.
2025-06-23 16:08:52 +02:00
Sebastian Parborg
ef3e30c8fe Merge branch 'blender-v4.5-release' 2025-06-23 15:21:02 +02:00
Brecht Van Lommel
a7bcea76d7 Fix #139769: ACES 2.0 configuration fails with shader errors
This code was initially only for OpenColorIO 2.3, and then later removed in
the refactor. But it appears to still be needed for 2.4 and configs like this.

Pull Request: https://projects.blender.org/blender/blender/pulls/140824
2025-06-23 15:13:59 +02:00
Sebastian Parborg
f42b470902 Build: Update linux libs 2025-06-23 15:05:28 +02:00
Sebastian Parborg
e9bb088f77 Build: Update linux libraries 2025-06-23 15:05:28 +02:00
Sebastian Parborg
c8ba4415c9 Build: Update linux libraries 2025-06-23 15:04:06 +02:00
илья _
a59a70edf4 Curves: Support cyclic curves in Proportional Editing
Small patch to pass the fact of cyclic curve into the search algorithm to
propagate editing weight on connected part via bridge on a curve ends.

Pull Request: https://projects.blender.org/blender/blender/pulls/139700
2025-06-23 15:00:16 +02:00
Julian Eisel
0c25411fd9 Merge branch 'blender-v4.5-release' 2025-06-23 14:41:31 +02:00
Julian Eisel
e852533ddd Fix #140781: Crash on "Adjust Pose asset" from Asset Browser
See:
https://projects.blender.org/blender/blender/issues/140781#issuecomment-1608861.
2025-06-23 14:39:41 +02:00
Omar Emara
0e304c813c Refactor: Use Float2 images internally if possible
Previously, Float2 images were internally stored as either Float3 or
Float4 images due to limitations in the implementation, which no longer
exists. So this patch refactors the compositor code to store Float2
images in actual Float2 containers, which gives better performance and
memory savings.

Some algorithms were adjusted to operate on Float2 instead of Float3 as
was previously the case.

Pull Request: https://projects.blender.org/blender/blender/pulls/140855
2025-06-23 14:34:37 +02:00
Sergey Sharybin
08151e623f Merge branch 'blender-v4.5-release' 2025-06-23 14:03:37 +02:00
Sergey Sharybin
7519586ec0 Fix #140693: Crash on enabling override in file output color settings
The code around view transform selection accidentally got too coupled
to the scene. However, the file output settings do not have scene, so
the enumerator getter was crashing.

Caused by 7ceb4495c5.

This patch brings the code closer to the Blender 4.4 behavior by
maintaining a global from view name to an ID.

There is still a bug in the code which displays views from the active
scene's display settings in the override panel. This is because the
itemf() callback is hardcoded to use the display settings from the
active scene (via bContext). However, this issue exists since the
initial commit of the color management override option.

Pull Request: https://projects.blender.org/blender/blender/pulls/140729
2025-06-23 14:02:59 +02:00
Julian Eisel
1045a1b910 Cleanup: Simplify context asset query logic 2025-06-23 13:51:45 +02:00
Julian Eisel
3bc41b4175 Fix: File browser "asset" context query not ensuring file is asset
The "asset" context query would just always return the active file (if any),
without ensuring that it's actually an asset. Mistake in 3f9c943243.
2025-06-23 13:51:29 +02:00
Jacques Lucke
c8997d821e Refactor: Nodes: add InferenceValue utility class for socket usage inferencing
This removes the need to deal with void pointers and explicit casts in many
places. Also it simplifies possibly extending what kind of values can be stored
for each socket in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/140844
2025-06-23 12:54:33 +02:00
Jacques Lucke
f0c7e52ff2 Core: extract blendfile_header.py as common utility for parsing .blend files
This new file can parse the file header (first few bytes) as well as the block
headers.

Right now, this is used by two places:
* `blendfile.py` which is used by `blend2json.py`
* `blend_render_info.py`

This new module is shipped with Blender because it's needed for
`blend_render_info.py` which is shipped with Blender too. This makes using it in
`blendfile.py` (which is not shipped with Blender) a bit more annoying. However,
this is already not ideal, because e.g. `blend2json` also has to add to
`sys.path` already to be able to import `blendfile.py`.

This new file could also be used by blender-asset-tracer (BAT).

The new `BlendFileHeader` and `BlockHeader` types may be subclassed by code
using it, because it wants to store additional derived data (`blendfile.py` and
BAT need this).

New tests have been added that check that the file and block header is parsed
correctly for different kinds of .blend files.

Pull Request: https://projects.blender.org/blender/blender/pulls/140341
2025-06-23 12:53:55 +02:00
Clément Foucault
a5399af388 Fix: EEVEE: Wrong versionning
The versionning was not inside `do_versions_after_linking_`
which made files created before 4.2 not switch back to
`BLENDER_EEVEE`.

# Conflicts:
#	source/blender/blenloader/intern/versioning_500.cc
2025-06-23 12:05:40 +02:00
Bastien Montagne
7082142fb5 Merge branch 'blender-v4.5-release' 2025-06-23 10:59:15 +02:00
Bastien Montagne
26cda0e1e9 I18N: Updated UI translations from git/weblate repository (8176c1461). 2025-06-23 10:58:43 +02:00
Jacques Lucke
ea618c2027 Refactor: Nodes: improve socket value variant construction
Previously, there was the issue that `SocketValueVariant` had a constructor that
took a forwarding reference as parameter. This was problematic, because this
could potentially hide copy/move constructors which is not intentional. This
patch makes sure that these special constructors are not overridden and adds two
static utility functions to make sure it's still straight forward to construct
the `SocketValueVariant` on a single line.

Clangd also warned about this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/140842
2025-06-23 10:08:43 +02:00
Jeroen Bakker
41e93e3d9b Merge branch 'blender-v4.5-release' 2025-06-23 07:58:03 +02:00
Jeroen Bakker
3a4c4c88fa Fix #139882: Vulkan/USD: Crash on AMD GPUs
When USD sends work to the GPU (dispatch) incorrect datatype conversions
can send incorrect vulkan commands. This happens on AMD GPUs. This PR
will patch USD to limit the max allowed limit. A better solution would
be to only use uint32_t in this function, but there is no `GfVec3u` data
type and I didn't want to do to many changes.

![image.png](/attachments/642bd3d5-c6b6-4e1a-be1c-be847e6893bd)

**TODO**

- [x] Validate with @ZedDB that this compiles and solves all the issues
- [x] Add other platform maintainers as reviewers. This is a Windows + Linux issue.
- [ ] Rebuild the USD library including this patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/140102
2025-06-23 07:55:17 +02:00
Guillermo Venegas
cc5ba71114 Refactor: UI: Add uiLayout fixed_size, red_alert, root_panel, search_weight and width methods
This replaces API for accessing the uiLayout fixed_size,
red_alert, root_panel, search_weight and width properties
with methods, following uiLayout refactors and the
Python API naming

Pull Request: https://projects.blender.org/blender/blender/pulls/140673
2025-06-23 06:55:01 +02:00
Richard Antalik
e5ddffd5d1 Merge branch 'blender-v4.5-release' 2025-06-23 01:02:30 +02:00
Richard Antalik
6b8970d728 Fix: VSE: Using redo panel causes operator to fail
When movie strip is added and redo panel is tweaked, operator failed to
re-execute.

Caused by c4eab49b9. This added `sequencer_generic_invoke_xy__internal`
call in operator exec function, but did not specify `SEQPROP_NOPATHS`
argument, which caused `directory` and `filepath` properties to be
overwritten.

This PR adds clarification for `SEQPROP_NOPATHS` use case, because it
isn't immediately obvious what this is doing.

Pull Request: https://projects.blender.org/blender/blender/pulls/140736
2025-06-23 01:01:01 +02:00
Jonas Holzman
c8aa20f8b3 Cleanup: Remove titlebar text color from decoration style settings
When the colored titlebar decoration style was implemented in
PR #123982, both the titlebar background and foreground were exposed
to the OS backends to be used when styling the Blender window titlebar.

In practice, both backends that implement this decoration style (Win32
and macOS/Cocoa) only use the background color, and they either rely on
the OS to automatically set the text color or use the color HSV value
component to switch between the OS dark/white color.

While it was thought to still keep this value around for a potential
future backend implementation, the color settings parsed to obtain the
titlebar color (`TH_BUTBACK_TEXT_HI`, which wasn't properly suited for
this feature to begin with) has been replaced by `TH_TEXT` in #140726,
which ends up being too bright to be used as titlebar text for most
themes/use cases.

As such, this PR removes this unused titlebar decoration style setting.
Future backends that wishes the implement the colored titlebar
decoration style should either use an existing OS/DE text color or use
a set white/dark text color, similarly to what the Cocoa backend does.

Pull Request: https://projects.blender.org/blender/blender/pulls/140823
2025-06-22 22:17:02 +02:00
Brecht Van Lommel
34f97c8f6f Fix: Error about missing BLENDER_EEVEE_NEXT when opening old files
There was still old after-linking versioning code that changed EEVEE to
EEVEE_NEXT, running after the code to change from EEVEE_NEXT to EEXEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/140803
2025-06-22 15:43:59 +02:00
Bastien Montagne
8f4f94aabc Tests: Fix file removal failure from Python in unittests.
Caused by changes in da4eda148b. Did not realized we have a few
duplicate blend-file names in `tests/files`, these ended up stepping on
each other's toes at random during testing.

Now ensure that the generated temporary 'save & reload' blend-file names
are unique, by adding a hash of the whole file path.
2025-06-22 15:41:19 +02:00
YimingWu
51f4e964f7 Fix #140376: Modeling: Better message for showing mesh data transfer
Previously in 308292b5d7 an error message
was added to notify that some selected objects are not valid for mesh
data transfer, that message didn't take account that src==dst is also a
case where the transfer is skipped, that doesn't mean the object is
invalid. So update the logic for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/140463
2025-06-22 14:05:17 +02:00
Campbell Barton
776dbe942c Cleanup: spelling (make check_spelling_*) 2025-06-22 11:34:32 +00:00
Campbell Barton
5e1a048294 Cleanup: resolve undeclared function warning 2025-06-22 21:26:36 +10:00
Pratik Borhade
2f4d071b89 Cleanup: Remove unused menu code
`VIEW3D_PT_collections` is used for drawing collection list in viewport
side panel. The code from the `view3d_buttons_register` is redundant and
can be removed.
Noticed during !140653

Pull Request: https://projects.blender.org/blender/blender/pulls/140702
2025-06-22 13:16:46 +02:00
Sybren A. Stüvel
5fdcddbc4f Merge remote-tracking branch 'origin/blender-v4.5-release' 2025-06-22 11:55:46 +02:00
Sybren A. Stüvel
de22f32656 Fix #140700: Blender 4.5 Crashes When Performing Loop Cut
Correct an oversight in df6d345bb4: without proportional editing, all
the transform data is "selected" by definition. This means that the
assumption "the selected data is sorted first in the array" is
trivially true, without calling any sorting function. So instead of
using the sorted index map in these cases, just fall back to regular
iteration.

To make the code handle this nicely, I made two "foreach" functions.
The first one transparently uses the sorted index map when available,
and performs regular iteration otherwise. The second function only
visits the selected items.

This makes the usage of these functions clearer, and the fact that
selected items are expected to be sorted first (either trivially or
explicitly) can be documented in a central place.

Pull Request: https://projects.blender.org/blender/blender/pulls/140720
2025-06-22 11:54:17 +02:00
Aaron Carlisle
98d11bf445 Cleanup: Use "Custom Normals" in code comments
Follows up on f0675f05a7 and corrects the terminology in some code comments.
2025-06-21 19:42:04 -04:00
Aaron Carlisle
f0675f05a7 UI: Make Custom Normal naming consistent
This changes the naming of "Custom Split Normals" or "Split Normals" to be "Custom Normals"

This addresses #134744, only UI naming has been adjusted.
Internal/External APIs are left unchanged.

Pull Request: https://projects.blender.org/blender/blender/pulls/140440
2025-06-22 01:28:02 +02:00
Sean Kim
17f5c826bb Fix: Incorrect UnifiedPaintSettings compatibility writing
Mistake in 582c7d94b8.

The `ToolSetting` struct needs to be written after changing the
in-memory value.

Pull Request: https://projects.blender.org/blender/blender/pulls/140775
2025-06-22 00:03:16 +02:00
Sean Kim
3d507c4afe Merge branch 'blender-v4.5-release' 2025-06-21 15:02:38 -07:00
Sean Kim
99d4e7e330 Fix: Incorrect file version for brush forward compatibility code
Mistake in 6a03e8249d

Pull Request: https://projects.blender.org/blender/blender/pulls/140777
2025-06-22 00:02:03 +02:00
Bastien Montagne
da4eda148b Tests: Add basic save & reload to the 'versioning' tests.
This should allow us to catch significantly more 'sneaky' issues with
writefile and versioning codes in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/140735
2025-06-21 14:06:43 +02:00
Campbell Barton
827fc096ae Merge branch 'blender-v4.5-release' 2025-06-21 16:51:08 +10:00
Campbell Barton
5280ebc289 NDOF: all spaces now follow the navigation mode preference
Restore expected behavior of the NDOF, especially in the context of
non-3D editors. It addresses the following issues:

- Object mode, 3D viewport:
  With "Lock Horizon" off, the rotation axes will invert unexpectedly,
  making the camera behave similar to a "Fly mode".

- Fly mode, 2D editors:
  Changing a navigation mode to "Fly" makes no effect.
  Applies to UV and Nodes editors, Camera Preview etc.

Related to #140165

This includes some minor API changes back-ported from `main`
since the PR was created for `main`.

Co-authored-by: Patryk-Skowronski <patryk_skowronski@3dconnexion.com>

Ref !140537
2025-06-21 16:38:51 +10:00
Sean Kim
a59ee6b2d0 Cleanup: Replace init/free functions for MultiresReshapeSmoothContext
Pull Request: https://projects.blender.org/blender/blender/pulls/140513
2025-06-21 02:42:36 +02:00