Commit Graph

153227 Commits

Author SHA1 Message Date
Aras Pranckevicius
47925fcb69 Cleanup: VSE scopes drawing number typo
"-.0f" was a typo in VSE preview area drawing, was meant to be 1.0f
(introduced in 18110744a2)
2025-08-22 16:27:03 +03:00
Miguel Pozo
f8d61f0735 Fix #144932 : BLI_assert failed: DRW_lock_start(), at 'locked'
Avoid trying to bind the same context twice.

Pull Request: https://projects.blender.org/blender/blender/pulls/144939
2025-08-22 15:22:13 +02:00
Campbell Barton
f28850144d Fix: resolve memory leak in previous fix for #144958
Instead of matching regions, free all popups using
UI_popup_handlers_remove_all which also calls the remove callback
that frees the uiPopupBlockHandle.
2025-08-22 22:23:01 +10:00
Campbell Barton
311231a31c Fix #144958: Crash changing screens with a menu open
Deleting or changing the screen with a popup (error report in this case)
wasn't removing the popup, it would attempt to display using it's
region which had been freed when changing the screen.
2025-08-22 10:45:00 +00:00
Campbell Barton
ffbd078c55 Fix: failure to append with an unsaved blend file
Regression in [0] an unsaved file would be an empty string which could
be equal to "libname" causing them to be considered equal, resulting
in an error thatthe file was linking in itself.

Resolve by only performing this check on saved files.

fa29d28d73
2025-08-22 20:11:24 +10:00
Pratik Borhade
ae690c1a51 Outliner: Allow right mouse select
Changing select button to right click doesn't reflect in outliner
keymap. Use `params.context_menu_event`, `params.select_mouse` so that
with Right mouse preference, RMB will be used for selection and `W` for
context menu
Resolves #144860

Pull Request: https://projects.blender.org/blender/blender/pulls/144905
2025-08-22 11:54:27 +02:00
Campbell Barton
4c35ef7a7f Cleanup: rename function for removing handlers, use typed area argument 2025-08-22 19:40:29 +10:00
Jeroen Bakker
0ea1feabd9 Vulkan: HDR support for Windows
This PR adds HDR support for Windows for `VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT`
on `VK_FORMAT_R16G16B16A16_SFLOAT` swapchains .

For nonlinear surface formats (sRGB and extended sRGB) the back buffer is blit into the swapchain,
When VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT is used as surface format a compute shader
is used to flip and invert the gamma.

SDR white level is updated from a few window event changes, but actually
none of them immediately respond to SDR white level changes in the system.
That requires using the WinRT API, which we don't do so far.

Current limitations:
- Intel GPU support
- Dual GPU support

In the future we may add controls inside Blender for absolute HDR nits,
across different platforms. But this makes behavior closer to macOS.

See !144565 for details

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/144717
2025-08-22 10:11:55 +02:00
Jeroen Bakker
366eba1d04 Fix: EEVEE: Memory leak when drawing Volume objects
Pool of VolumeInfo was never reset. Detected when stress testing
the vulkan backend using tree_creature.blend where the world
volume was converted to a volume object.

Pull Request: https://projects.blender.org/blender/blender/pulls/144967
2025-08-22 09:49:56 +02:00
Campbell Barton
addc9db67d Fix #144916: Transform crash pressing tab disabling axis constraint
When disabling cursor constraint NumInput::idx_max was set to -1.
This looks to be the behavior since 2.4x, however more recently
the modulo of `idx_max + 1` was used to cycle the axis when pressing
tab (crashing when `idx_max` is -1).

Resolve by setting `NumInput::idx_max` to the number of axes since
this is the state when transform is initialized.
2025-08-22 07:37:30 +00:00
Jeroen Bakker
451b0f2a87 Refactor: Vulkan move queue ownership to device
Pull Request: https://projects.blender.org/blender/blender/pulls/144934
2025-08-22 08:46:46 +02:00
Campbell Barton
e964f078b5 PyDoc: correct use of back ticks for literal text 2025-08-22 15:10:29 +10:00
Campbell Barton
78c9d16919 PyDoc: correct types, consistent formatting for doc-strings in C++
Correct some types, ensure multi-line docs end with a newline,
sentences end with a full stop.
2025-08-22 14:05:28 +10:00
Andrej730
e41fdebf3a PyDoc: UILayout.introspect(), add missing return value type
Ref !143353
2025-08-22 03:42:34 +00:00
Campbell Barton
db3db2876f Cleanup: quiet compiler warning 2025-08-22 13:42:28 +10:00
Sebastian Parborg
a126ddc5d6 VSE: Clear cache when toggling meta strips
This makes sure that the cache we have is not outdated as going in and
out of meta strips effectily hides/unhides strips from the timeline.

Pull Request: https://projects.blender.org/blender/blender/pulls/144800
2025-08-21 19:36:37 +02:00
Sebastian Parborg
db0486c5e8 Revert "Fix #141768: VSE: Tabbing in/out of metastrips does not update strip cache"
This reverts commit 08ec4602a2.
2025-08-21 19:36:36 +02:00
Sybren A. Stüvel
50876d9b26 Fix #143697: UI freezes with lots of Action slots (in the Outliner)
Only create an outliner tree element for all Action slots in specific
modes of the outliner. The "object-hierarchical" modes (Scene, View
Layer) show the Action underneath each user of that Action; in these
cases, only the assigned slot is shown now.

Previously all slots would be shown, in all modes of the Outliner. This
meant quadratic complexity, as each Action is included in the tree for
each of its users, and then each of those tree items would show all
slots. This means the number of tree items for the slots was multiplied
by the number of users.

Pull Request: https://projects.blender.org/blender/blender/pulls/144864
2025-08-21 18:16:59 +02:00
Sean Kim
eea22743c1 Weight Paint: Change default 'Zero Weights' setting to 'Active'
This commit changes the default setting from 'None' to 'Active' so that
the difference between a very small weight value and a value of 0 is
more obvious.

Pull Request: https://projects.blender.org/blender/blender/pulls/144699
2025-08-21 17:07:10 +02:00
Hans Goudey
7430915bb4 Fix: Assert in curves sculpt mode
Mistake in 072d251b8e
2025-08-21 10:30:11 -04:00
Philipp Oeser
07365bad87 Fix #129065: Linked material can be modified from the Properties Editor
In the Node Editor itself, you cannot edit a linked Nodetree (add nodes,
drag from a socket etc., so basically no actions allowed).
In the Properties Editor (Material tab) however, where we display the
Nodetree differently (via `uiTemplateNodeView`) and while editing
properties themselves was already disabled, you could still edit node
**links** (thus **adding** nodes to the tree).
This would all be lost on file reload though, so better prevent this.

To resolve, just disable the socket / NodeLink button when looking at a
linked Nodetree.

NOTE: the "not in a linked nodetree" disabled hint is not showing yet,
something I intend to fix in an upcoming PR (it is also not showing this
for properties generally in the node editor).

Pull Request: https://projects.blender.org/blender/blender/pulls/144930
2025-08-21 16:15:16 +02:00
Miguel Pozo
13bbf3ba44 Depsgraph: Expose helper functions for manual dupli iteration
Refactor some internal DEG_iterator code into public functions.
This shouldn't cause any functional change, but it's required for
#140378.

Pull Request: https://projects.blender.org/blender/blender/pulls/140674
2025-08-21 15:47:29 +02:00
Brecht Van Lommel
7d7562e849 Color Management: Support for saving wide gamut images
* Bundled ICC profiles for display spaces supported by Blender, and
  embed them in the image file when saving.
* Verified to work for PNG, TIFF, JPEG and WebP, but not all file
  formats support this.
* No ICC profile is written for sRGB currently. It would be a matter
  of adding an icc file, however this may be a breaking change for
some use cases.
* Fix save as render of EXR files not properly changing the image
  colorspace to match.

Uses CC0 licensed ICC files from the Compact ICC Profiles project.

This does not include support for saving HDR images. While there exist
ICC profiles for PQ, they are not well supported and the preferred method
for HDR is to write CICP tags. However OpenImageIO support for this is
still under development.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:25:21 +02:00
Brecht Van Lommel
d55ec77e0f Git: Use LFS for binary ICC files 2025-08-21 15:25:19 +02:00
Brecht Van Lommel
1f9f1d0b6e Color Management: Improve wide gamut color buttons and pickers
These should at least show the correct colors and gamut now, following the
color picking space in the OpenColorIO config.

However the ACES config use sRGB as the color_picking role, which means
that the color picker only shows a limited a gamut. There is apparently is
not agreement on the interpretation of this role, so we might have to stop
using it.

Additionally, if you set the color_picking role to something like ACEScg +
sRGB transfer function, the widgets do show all the colors in the gamut,
however the gamut is probably too large to be practical for most uses. So
we need some UI solution for this regardless.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:25:15 +02:00
Brecht Van Lommel
13e1c222ee Color Management: Add some heuristics to match display and view names
To improve compatibility when switching between Blender and ACES 2.0 config,
and when there is no exact matching view name when switching displays.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:25:13 +02:00
Brecht Van Lommel
c826b0630d Color Management: Group SDR and HDR displays in menu
This helps users discover that they should use Rec.2100 PQ for HDR.

And drop redundant "- Display" suffix from ACES config, makes the menu look
more clean.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:25:09 +02:00
Brecht Van Lommel
b0d52c528b Color Management: Remove "High Dynamic Range" setting
This was a temporary solution until we had proper HDR displays.

* Auto detect from the display + view transform if they are HDR, and
  enable it automatically. This is based on encoding hdr-video in the config.
* If a HDR transform is selected and there is no HDR display support, an
  info message will be shown in the color management panel.
* It is now possible to view HDR images in the image editor, without
  needing to use "View as Render".
* There is no versioning to switch to a HDR display, because that also
  affects image saving. So users will have to manually select the
  "Rec.2100 PQ" display to see HDR colors again.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:25:06 +02:00
Brecht Van Lommel
62485a760f Color Management: Wide gamut display
* Change meaning of display device to be the device that we are trying
  to emulate, not the monitor configuration.
* The display transform is now:
 * User specified view and display transform
 * Clamp to 0 to limit colors to gamut
 * Inverse untonemapped display transform
 * Convert to extended sRGB
* When using the display space in the color management API, it now needs to
  be specified if it's for drawing (with emulation) or file output or color
  inspection (without).

Like HDR, this only works on macOS and Linux + Wayland + Vulkan currently.
Support for Windows/Vulkan is under development in #144717.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:25:01 +02:00
Brecht Van Lommel
ff52b7eef4 Color Management: Base color space interpretation on interop ID
For display and image saving, we need to know certain properties of displays
and view transforms that OpenColorIO does not explicitly provide. In the
upcoming OpenColorIO 2.5 there will be an interop ID for color spaces that
adds more information. This moves towards that design, with heuristics for
configs that don't have the interop IDs.

* Try to use the first colorspace alias as the interop ID. This is used in
  some existing configs, and now the Blender config as well.
* Improve ACES 2.0 config compatibility by interpreting some aliases like
  srgb_display as interop IDs.
* Detect is_srgb and is_wide_gamut through display colorspace interop ID.
  These are now per view rather than per display.
* Detect is_extended where we can't clamp to 0..1 through interop ID.

* Detect untonemapped view as config wide default view transform for converting
  between reference and display space, if "Standard" or "Un-tone-mapped" can
  not be found.
* Detect which display and view transform combination is HDR by checking for
  "hdr-video" encoding on the display colorspace in the OpenColorIO config.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:24:56 +02:00
Brecht Van Lommel
55de973b07 Color Management: Add Rec.2100-PQ display and ACES 2.0 view transforms
These are built into OpenColorIO, and will start working well with the upcoming
wide gamut display changes.

The ACES 2.0 view transform provides an alternative to AgX and Filmic, with
similar purpose. It is also useful for those working in an ACES pipeline when
the full ACES OpenColorIO config is not needed.

Rec.2100-PQ display is a HDR display, and will be what you select when wanting
to see HDR (and wide gamut) colors, and export them to HDR video.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:24:52 +02:00
Brecht Van Lommel
235fdc6356 Color Management: Fix wrong use of display color space
* PROP_COLOR_GAMMA is sRGB, not display space
* Hex colors are always sRGB
* Image byte buffers are in byte_buffer.colorspace

Fixes for sequencer text, image painting, render stamp and tooltips.
The default display space is sRGB, so this change will not be noticed
in most files.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/144565
2025-08-21 15:24:40 +02:00
W_Cloud
24308a9f21 Nodes: Inherit color tag when grouping a single node
The `Ctrl + G` make group operator now inherits the color_tag
from the selected node when only one node is selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/144861
2025-08-21 14:50:19 +02:00
Campbell Barton
fc7141f582 Fix #142137: Dynamic paint crashes when evaluating poses
DEG_add_collision_relations was only adding relationships for objects in
the brush collection, however dynamic paint also updates parent objects
and armature poses which weren't accounted for. Failing to include these
relations meant the evaluating the depsgraph could evaluate a pose
object from multiple threads at once - causing a crash.

Resolve by sharing logic between DEG_add_collision_relations &
BKE_object_modifier_update_subframe so depsgraph relationships match
objects the dynamic-paint modifier updates as part of its evaluation.

Ref !144844
2025-08-21 22:13:18 +10:00
Campbell Barton
cc553739d8 Cleanup: various minor changes BKE_object_modifier_update_subframe
- Rename `parent_recursion` to `parent_recursion_limit`.
- Use a define for the recursion default.
- Use const arguments.
2025-08-21 22:13:18 +10:00
Sybren A. Stüvel
f5ba4dbfe6 Python: Fix parameter name in error message from bpy.data.file_path_map()
When `bpy.data.file_path_map(subset=X)` is called, where `X` has the
wrong type, it now correctly shows `subset` as the erroneous parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/144914
2025-08-21 14:11:26 +02:00
Sybren A. Stüvel
a7cf8963da Cleanup: better documentation for the Bone struct
Improve the documentation for the Bone coordinate spaces and these struct fields:

- `head` & `tail`
- `bone_mat`
- `arm_head` / `arm_tail`
- `dist`

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/143729
2025-08-21 14:10:25 +02:00
Jeroen Bakker
bca70c85e7 Cleanup: struct initializers 2025-08-21 12:27:19 +02:00
Jeroen Bakker
5767da3b49 Fix #144758: Python: Inversed unicode comparison in GPUFramebuffer
Regression introduced by d9f38fca5f

Pull Request: https://projects.blender.org/blender/blender/pulls/144908
2025-08-21 11:52:24 +02:00
Pratik Borhade
e196384a68 Fix #144840: Crash unlinking object from outliner unused data mode
When unlinking object from unused data display mode, crash occurred due
to dangling pointer (`id->lib->runtime`) of parent tree element. Here
parent is "Objects" tree element which is not an actual ID. Similar to
other unlink callback, add an extra check to ensure we're unlinking from
valid ID/tree element.

Pull Request: https://projects.blender.org/blender/blender/pulls/144853
2025-08-21 11:40:38 +02:00
Clément Foucault
5681d41ca5 Fix: GPU: Wrong default size for compute local group size
The doc string was updated by 16430b10f1
but the default were not changed.
2025-08-21 11:32:43 +02:00
Campbell Barton
ca754bc3b2 Help text: tweak for better extraction for the user manual & man page
Use single quotes which are converted to literal text.
2025-08-21 18:19:39 +10:00
Weizhen Huang
28dcb7b04f Cleanup: Quiet compiler warning 2025-08-21 10:16:41 +02:00
Campbell Barton
08eea6b9d4 Help text: group all debug options together 2025-08-21 17:28:15 +10:00
Jeroen Bakker
3b295618f8 Fix #144614: Vulkan: Disable optimization for large shaders
This is a workaround for an issue in SPIRV-Optimizer. When optimizing
large shaders the optimizer can crash. This can be fixed by altering the
maximum object ids and performing a compact ids in the end. However this
part of the API is not accessible via ShaderC.

To work around the issue shader optimizations are being disabled for
large shaders. The issue has been reported upstream.

Pull Request: https://projects.blender.org/blender/blender/pulls/144774
2025-08-21 09:14:56 +02:00
Campbell Barton
b1cd0ff91e Cleanup: add missing headers to source lists 2025-08-21 17:09:18 +10:00
Campbell Barton
66ed599c33 Cleanup: remove Python scripts & directory from CMake source file lists 2025-08-21 17:09:18 +10:00
Jorn Visser
0f8eb1b944 Fix: Vulkan: Submission runner crash on start
In `init_submission_pool`, the submission runner was started before
initializing the queues it uses, leading to a race condition that could
result in a crash.

Pull Request: https://projects.blender.org/blender/blender/pulls/144795
2025-08-21 09:06:23 +02:00
Omar Emara
3d7c8d022e Refactor: Nodes: Generalize node tree subtypes
This patch generalizes node tree subtypes to be usable for node trees
other than Geometry Nodes. In particular, this:

- Renames SpaceNode.geometry_nodes_type to node_tree_sub_type, which now
  store a tree type-specific enum.
- Renames SpaceNode.geometry_nodes_tool_tree to selected_node_group,
  which now stores any context-less tree of any type.

This breaks the python API due to renaming.

Pull Request: https://projects.blender.org/blender/blender/pulls/144544
2025-08-21 09:04:13 +02:00
Jeroen Bakker
40f8a36fd5 Fix #144542: Crash Workbench DoF
Attaching mipviews directly on a framebuffer results in a driver crash.
Letting the backend handle the mipviews works around the issue.

This fixes the crash, but seems to point to an issue when attaching
mipviews directly. It also ensured that the shader bound mipviews
cannot be destroyed when new mipviews are ensured.

Pull Request: https://projects.blender.org/blender/blender/pulls/144796
2025-08-21 08:44:21 +02:00