Commit Graph

153445 Commits

Author SHA1 Message Date
Falk David
fefeb939a2 Fix: Outliner: Not using sequencer scene in various places
The outliner was not using the correct sequencer scene
for some places including:
* strip selection & selection sync
* strip hiding & unhiding

Found while looking into #145206.

Pull Request: https://projects.blender.org/blender/blender/pulls/145250
2025-08-29 12:49:58 +02:00
Sergey Sharybin
03003365cc Cycles: Switch to HIP SDK 6.4.2 on Windows
This also reverts 367d5b7eabd53229fb7e79465b4761e65e531741,
as the math flags workaround is no longer needed.

Fix #139796
Fix #138646
Fix #139071
Fix #139070

Ref #140278

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/145311
2025-08-29 12:49:11 +02:00
YimingWu
af700685e7 Fix #145259: Grease Pencil: Bail when no frame is selected for SVG export
Previously `SVGExporter::export_scene` can work on a empty `frames`
index mask, causing crash. Now it will exit early when no frames are
selected, and it will show a warning to the user.

Pull Request: https://projects.blender.org/blender/blender/pulls/145286
2025-08-29 12:03:29 +02:00
Falk David
1fe5096101 Fix #145206: Outliner not using the sequencer scene to show strips
The outliner was still using the active scene to show the sequencer
strips in the VSE mode.

This adds the workspace to the `TreeSourceData` so that
the `TreeDisplaySequencer` can read the sequencer
scene.

Note that more places need to be fixed to make this mode
work correctly again.

Pull Request: https://projects.blender.org/blender/blender/pulls/145247
2025-08-29 10:38:11 +02:00
Campbell Barton
38b13f7aa8 Fix: uninitialized memory use in RNA slice assignment
Resolve run-time error caught by UBSAN & script_pyapi_prop_array test.
2025-08-29 07:27:40 +00:00
Jeroen Bakker
8d40ecbf85 Cleanup: GPUFramebuffer variable names
The internal wrap/unwrap functions used vert as variable names. Should
be framebuffer.
2025-08-29 08:59:01 +02:00
Campbell Barton
9e72f27717 Cleanup: unused variable warnings 2025-08-29 14:40:48 +10:00
Campbell Barton
95990fdfe3 Cleanup: typo in VFontToCurveIter struct member 2025-08-29 13:45:59 +10:00
Campbell Barton
6d92bf00a6 Cleanup: use float2 for some 3D text logic 2025-08-29 03:40:33 +00:00
Campbell Barton
6c7513b9ac Cleanup: spelling (make check_spelling_*) 2025-08-29 11:27:33 +10:00
Campbell Barton
39ab4fe0ee Cleanup: remove duplicate import 2025-08-29 11:24:54 +10:00
Sean Kim
d124f95311 Refactor: Deduplicate Paint BVH source of truth for position cache access
This commit refactors the relevant code to extract the
logic of determining which cache to use into a centralized location to
avoid missing updates happening in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/143580
2025-08-29 00:22:36 +02:00
Sean Kim
47362112a6 Fix #145305: Crash on loading file from 1.7x
Introduced in 7f3aa617ce

Pull Request: https://projects.blender.org/blender/blender/pulls/145369
2025-08-28 23:24:17 +02:00
Sean Kim
f074e3529d Cleanup: Remove unused 'DispOp' enum
Pull Request: https://projects.blender.org/blender/blender/pulls/145289
2025-08-28 22:47:06 +02:00
Hans Goudey
b60835e2b4 UI: Remove node socket icons from attribute and grid type enums
Added in 8d6c717e34

These enums are unrelated to nodes. The fact that nodes reuse the
enum property items is an implementation detail that shouldn't leak.
Currently it causes the type dropdown in the "Add Attribute" operator
to be full of node socket icons.

At a data level it is also not clear that these should have node socket
colors, even in geometry nodes. Arguably it's important to distinguish
between attribute types and socket types, especially since some
attribute types cannot be explicitly passed around by node links.

For now, revert the parts of that commit that added node socket icons
in areas unrelated to the node editor. If we're going to do that it needs
proper consensus and a more complete design.
2025-08-28 15:33:24 -04:00
Jesse Yurkovich
96e7242678 Cycles: Tesselate adaptive subdivision meshes in parallel
Meshes that require adaptive subdivision are currently tesselated one at
a time. Change this part of device update to be done in parallel.

To remove the possibility of the status message going backwards, a mutex
was required to keep that portion of the loop atomic.

Results for the loop in question: On one particular scene with over 300
meshes requiring tesselation, the update time drops from ~16 seconds to
~3 seconds. The attached synthetic test drops from ~9 seconds down to ~1
second.

Pull Request: https://projects.blender.org/blender/blender/pulls/145220
2025-08-28 20:22:14 +02:00
Jesse Yurkovich
6b2463c2b6 Cleanup: Formatting 2025-08-28 11:20:56 -07:00
Hans Goudey
c01d4a4ee6 Refactor: Deduplicate position transform utilities
The pattern of transforming many position vectors at once is quite
common, both with separate source and result arrays, and when modifying
an array in place. In some cases at least we used a separate function
with a consistent name across files, but there were also many duplicate
parallel transform implementations.

This commit adds these utilities to the BLI_math_matrix.hh API and uses
them where many positions from contiguous arrays are transformed at
once. While there might be a more ideal location for these utilities,
it's consistent with 3936d7a93e, and certainly better
than duplicating them.

This also reduces binary size of my build by 15 KB.

Pull Request: https://projects.blender.org/blender/blender/pulls/145352
2025-08-28 19:27:17 +02:00
Hans Goudey
fbaf6d42f0 Grease Pencil: Avoid repeated attribute lookup in origin set operator
Don't look up the position attribute for every single point.
2025-08-28 19:27:16 +02:00
Hans Goudey
d74c033a9d Cleanup: Remove else after return in grease_pencil_io.cc 2025-08-28 19:27:16 +02:00
Nika Kutsniashvili
ea47231a7b UI: Make selected track color in Movie Clip Editor themeable
Selected tracks in the Movie Clip Editor's Dope Sheet used hard-coded color.
Added a new theme property for them, and previously hard-coded color is now just a default.

Pull Request: https://projects.blender.org/blender/blender/pulls/144265
2025-08-28 19:12:11 +02:00
Bastien Montagne
fa61e3b9b8 Clenaup/Fix: Missing handling of ObHook::parent Object pointer.
While handling this pointer is technically not needed in `foreach_id`
code (and likely never will be), better not rely on such undocumented
implicit specifics, and instead properly handle it there, with comments
and asserts explaining why it should not be actually executed in current
code.

Pull Request: https://projects.blender.org/blender/blender/pulls/145345
2025-08-28 18:05:54 +02:00
YimingWu
02737c7b93 LineArt: Allow curves objects to be loaded into calculation
When line art is first developed, curves objects does not exist yet, now
it is added to line art so it will be read and take part in feature line
generation and occlusion tests.

This patch also adds "Line Art" panel for curves object, just like other
objects supported by line art.

Pull Request: https://projects.blender.org/blender/blender/pulls/145296
2025-08-28 17:28:47 +02:00
Harley Acheson
9e0ef26686 Fix #145186: Allow opening non-existing blend from command line
The PR restores the old behavior (after the changes in #139128) so that
specifying a path to a non-existing blend file will load Blender with
default blend default and with that name assigned. Paths to non-blend
files will load blender but then give the new warning message.

Pull Request: https://projects.blender.org/blender/blender/pulls/145274
2025-08-28 16:48:45 +02:00
Jacques Lucke
20956c69fa Fix: Nodes: crash when opening files with closure and bundle nodes saved in 4.5
This adds support for opening "invalid" files containing closure/bundle nodes that have
first been saved with 5.0, then resaved with 4.5. Note that loading them in 4.5 only works
after #145337.

Pull Request: https://projects.blender.org/blender/blender/pulls/145333
2025-08-28 16:31:33 +02:00
Omar Emara
5cabc57af0 Compositor: Optimize nodes with Boolean and Menu inputs
This patch optimizes nodes with Boolean and Menu inputs for GPU
execution. This is done by using constant links instead of uniforms for
those inputs. This will cause shader recompilation, but is okay since
those inputs rarely change.

Pull Request: https://projects.blender.org/blender/blender/pulls/145329
2025-08-28 16:00:58 +02:00
Omar Emara
fdf95b53fa Compositor: Add Convolve node
This patch adds a simple Convolve node to the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/144619
2025-08-28 15:58:39 +02:00
Campbell Barton
90a55a3e0b Fix: walk/fly causing RegionView3D::viewquat not to be normalized
Prevent this issue reported by: #125586 from happening in new files.
2025-08-28 23:22:27 +10:00
Campbell Barton
9774ebfe30 Cleanup: remove unnecessary nested block from walk/fly logic 2025-08-28 23:22:27 +10:00
Jeroen Bakker
a97ef00787 Fix #145314: Vulkan: Disable HDR on incapable drivers
This PR disables HDR when driver doesn't support
`VK_EXT_swapchain_colorspace`. It could be that Windows detect support
(DirectX) and allow users to enable HDR. But that it isn't supported by
the Vulkan part of the driver.

In case of Windows there might be an issue with using SRGB non
linear on F16 swapchains where somewhere an additional transform is
being performed. After adding support for other color spaces we should
remove the support of this swapchain configuration.

Pull Request: https://projects.blender.org/blender/blender/pulls/145325
2025-08-28 15:18:38 +02:00
Philipp Oeser
81c259d49b Fix #145300: Value node displayed value has an offset to the right
Caused by d7fa455e66

Due to an earlier experiment to get right alignment, above commit left a
space in the text (this was later solved by using
`UI_ITEM_R_SPLIT_EMPTY_NAME`, but... for this one node, the name was not
actually empty then...)

Pull Request: https://projects.blender.org/blender/blender/pulls/145303
2025-08-28 15:11:21 +02:00
Jacques Lucke
20b2ec5cdf Fix #145103: incorrect socket usage for built-in menu sockets
The socket usage of built-in menu sockets did not take into account if any of the
outputs of the node were actually used.

Pull Request: https://projects.blender.org/blender/blender/pulls/145162
2025-08-28 14:28:14 +02:00
Falk David
fff8834213 Fix #145297: Grease Pencil crash when joining objects
The function was using the `BKE_id_material_len_p` with the ID
of the object rather than the object data ID, which is what the
function expects.

Instead make sure to use `BKE_object_material_len_p` to get
the right number of material slots.

Additionally use the correct slot in `BKE_object_material_get`
which is the index of the material + 1.

Pull Request: https://projects.blender.org/blender/blender/pulls/145323
2025-08-28 14:25:05 +02:00
Jacques Lucke
2e4d2ad5ab Refactor: BLI: reduce code size for virtual arrays
Previously, `VArrayImpl` had a `materialize` and `materialize_to_uninitialized`
function. Now both are merged into one with an additional `bool
dst_is_uninitialized` parameter.  The same is done for the
`materialize_compressed` method as all as `GVArrayImpl`.

While this kind of merging is typically not ideal, it reduces the binary size by
~200kb while being basically free performance wise. The cost of this predictable
boolean check is expected to be negligible even if only very few indices are
materialized. Additionally, in most cases, this parameter does not even have to
be checked, because for trivial types it does not matter if the destination
array is already initialized or not when overwriting it.

It saves this much memory, because there are quite a few implementations being
generated with e.g. `VArray::from_func` and a lot of code was duplicated for
each instantiation.

This changes only the actual `(G)VArrayImpl`, but not the `VArray` and `GVArray`
API which is typically used to work with virtual arrays.

Pull Request: https://projects.blender.org/blender/blender/pulls/145144
2025-08-28 14:24:25 +02:00
Pasang Bomjan
0056784996 Nodes: Node Wrangler: Make Lazy Connect without menu to only consider visible sockets.
When using `Lazy Connect`, the operator currently also considers sockets that are hidden.
This causes unintentional socket connections and requires to use the operator with the
menus for manually picking sockets which is slower and defeats the purpose.

Videos in PR.

This PR fixes that by not considering the hidden sockets.

Pull Request: https://projects.blender.org/blender/blender/pulls/145316
2025-08-28 12:52:31 +02:00
Clément Foucault
998655f4d9 Cleanup: Metal: Remove unused struct
This is no longer necessary since we do not use geometry shader
workarounds.
2025-08-28 12:08:42 +02:00
Clément Foucault
8c7ba3579f GPU: Batch: Remove unused instance attributes
This has been completely replaced by SSBOs overtime.

This reduces API size and avoid untested/legacy path
in drivers that are known to break (see #134509).

Pull Request: https://projects.blender.org/blender/blender/pulls/145242
2025-08-28 12:07:41 +02:00
Julian Eisel
450f428434 Fix #143699: Pose library asset shelf does not apply poses
This was quite involved to get to work. Basic idea is to make
`bl_activate_operator` work for the pose library asset shelf, and
introducing a `bl_drag_operator` for blending poses.

- Make pose asset operators take an asset reference, which is how
  `bl_activate_operator` usually gets the asset to operate on. This way
  poses references can be assigned to a shortcut, identified by asset
  library and relative asset path within the library. Falls back to
  getting the asset from context.
- Trigger `bl_activate_operator` on every click, instead of only when
  an un-active item becomes active. Needed so poses can be re-applied
  as before.
- Fix button context not passed to the `bl_activate_operator` when
  force-activating, e.g. on right-click events.
- Allow registering a `bl_drag_operator` in the asset shelf definition.
  Executed when dragging an asset in the shelf.
- When dragging an asset, highlight it as active, without calling the
  `bl_activate_operator`. This is important feedback to the user.
- Activate/select view items on click instead of drag, so dragging is
  possible.
- Let pose applying operators handle the Ctrl key to apply poses
  flipped. There's no simple way to attach such alternative behaviors
  to `bl_activate_operator`/`bl_drag_operator`
- Remove keymap items that were there for the previous "hacky" solution
  to apply & blend poses.

Pull Request: https://projects.blender.org/blender/blender/pulls/144023
2025-08-28 12:04:31 +02:00
Brecht Van Lommel
5d72498154 Color Management: Improve gamma 2.2 vs piecewise sRGB handling for HDR
See the code comments for detailed explanation. But overall we use particular
combinations of sRGB and gamma 2.2 encode/decode to match SDR applications
while still ensuring HDR values are passed on linearly.

This means the user interface and SDR content will display different in
Windows HDR mode off and on, but that is consistent with other applications.

Split use_hdr variable into use_hdr_buffer about the graphics buffer,
and use_hdr_display about the chosen display in Blender.

Ref #145022

Pull Request: https://projects.blender.org/blender/blender/pulls/145025
2025-08-28 11:35:10 +02:00
Brecht Van Lommel
52f1d0a0e1 Color Management: Optimization for display transforms
Clamp in linear colorspace for some known transfer functions and gamuts,
so that OpenColorIO can cancel out transfer functions. This eliminates for
example PQ encode and decode transforms in the GPU shader.

This does not eliminate all unnecessary operations though. In particular,
many view transforms already explicitly or implicitly clamp to the same
or a smaller gamut, making our clamping unnecessary. But there seems to be
no generic way to detect this.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/145025
2025-08-28 11:35:10 +02:00
Brecht Van Lommel
b5ade69400 Color Management: Consider all aliases for interop ID
It looked at the first one to be careful, but seems to work fine with all
of them too and recognizes more spaces that we need.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/145025
2025-08-28 11:35:10 +02:00
Brecht Van Lommel
b5769044d4 Refactor: Color Management: Determine gamut and transfer function for views
Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/145025
2025-08-28 11:35:10 +02:00
Sahar A. Kashi
14bd7a531f Cycles: Remove ROCm 5 code path and add ROCm 7 runtime to search list
This pull request removes ROCm 5 code path and adds ROCm 7 runtime to
library search list.

ROCm 5 runtime is no longer shipped with AMD drivers, and ROCm 5 compiler
is no longer compatible with newer driver versions.

It also adds ROCm 7 runtime to the list of runtime libraries to look for.
Starting later this year, ROCm 7 runtime will be bundled with the driver
installer, and all future runtime fixes and improvements will target ROCm 7.

Once ROCm 7 runtime is rolled out, ROCm 6 compiler will continue to work
with it for about a year as a transitional measure. Beyond that, compatibility
is not guaranteed.

Pull Request: https://projects.blender.org/blender/blender/pulls/145279
2025-08-28 11:35:01 +02:00
Sergey Sharybin
1d88e19c32 Fix #145185: Crash while solving camera motion
The crash happens in specific cases when doing euclidean resection
in cases when first 3 3D estimates are correlated. While it is a bit
cryptic on user level, what it could mean is:

  - Either there are overlapping markers
  - Or the optical system is highly out of calibration.

Either of these cases is not the primary goal to support with camera
solvers in Libmv for the time being, so while this change avoids the
crash there is possibility to make algorithm more robustly handle the
tracking data and potentially give better result.

Such correlation via some intermediate steps leads to the algorithm
attempting to perform SVD decomposition of a matrix with NaN values
in it.

The exact reason of the crash is not super clear as it happens deep
in the JacobiSVD decomposition code in Eigen and caused by invalid
index somewhere. It might be a bug in Eigen which doesn't do range
checking, hoping that the math does not fail in cases like NaN and
inf.

Pull Request: https://projects.blender.org/blender/blender/pulls/145301
2025-08-28 11:15:31 +02:00
Brecht Van Lommel
20a19c7aa4 Vulkan: Tweaks to improve HDR display on Windows
* Improve accuracy of warning when HDR display is not supported, taking into
  account HDR mode on/off on Windows.
* When HDR mode is disabled on Windows, don't create a HDR swapchain. This
  saves memory, and avoids a color difference on NVIDIA. That's because NVIDIA
  is the only GPU we've tested that allows a HDR swapchain when HDR mode is
  off, and we don't currently know the expected transforms for that case.
* Recreate swapchain when HDR mode on/off switch is detected.
* Update HDR info when window gains focus.

Note this means there is no wide gamut when Windows HDR is off, but it was
already not working. For that we may need to add support for something like
10bit VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT, or whatever is commonly
available outside of HDR mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/144959
2025-08-28 11:03:24 +02:00
Weizhen Huang
f77881a795 Fix #144918: World volume with zero density not rendering correctly
OneAPI has some problem with `exp(-0 * FLT_MAX)`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144979
2025-08-28 10:41:33 +02:00
Weizhen Huang
3bbce15497 Fix: Cycles: Some volume octree nodes randomly disappearing
The function `recursive_build()` can change the `shared_ptr` by making
it an internal node. If `root_` is modified, it could happen that when
the children are accessing `root_->bbox.min` that memory is already
freed.

Storing `bbox_min` separately seems to fix the issue. No error is seen
after running the tests repeatedly for 2000 times.

Pull Request: https://projects.blender.org/blender/blender/pulls/145239
2025-08-28 10:40:37 +02:00
Campbell Barton
58f0fd6a6b Fix: support loading blend files with text from v1.70 (#2)
Resolve another issue loading text form old files.
The Curve::len_char32 isn't always set, detect this and initialize
it from the string.
2025-08-28 18:20:09 +10:00
Philipp Oeser
cd358096d4 Cleanup: rename pose_edit_bone_duplicate > post_edit_bone_duplicate
This goes together with pre_edit_bone_duplicate(), so the existing name
is misleading.
(this change came with c2371028e0 , probably just a typo there)

Pull Request: https://projects.blender.org/blender/blender/pulls/145226
2025-08-28 10:13:57 +02:00
Jeroen Bakker
31fa6b62f9 Fix: Vulkan: Incorrect framebuffer size
When a file is loaded with a minimized window the VKFramebuffer can
contain incorrect texture/data that result in a crash when maximizing the
window.

Pull Request: https://projects.blender.org/blender/blender/pulls/145171
2025-08-28 09:38:39 +02:00