Commit Graph

150077 Commits

Author SHA1 Message Date
Brecht Van Lommel
9e44514b46 Fix: Hydra incorrect assmes camera object is always a camera 2025-02-28 17:37:35 +01:00
Philipp Oeser
a95753b36a Merge branch 'blender-v4.4-release' 2025-02-28 17:31:29 +01:00
Philipp Oeser
65288e4130 Attempt to fix build error
introduced in 9855c11d2c
2025-02-28 17:30:11 +01:00
Clément Foucault
6e5b7f6375 Refactor: DRW: Make DRWManager more C++ oriented
This wrap some functions as class methods
and rename members to reduce confusion with
the old class meaning.

Rename the old DRWManager to DRWContext.

Also wrap access to DST inside a function
to allow to change it to thread local in a
following PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/135268
2025-02-28 17:26:07 +01:00
Bastien Montagne
00f406c34c Refactor: BLI: Re-implement BLI_string_split_name_number in C++.
Allows to use this code from C++ code/data, without duplicating strings
to char arrays. C-compatible API is kept as a wrapper around the new
implementation.

No behavioral change is expected from this commit.

Part of !135199.
2025-02-28 17:21:59 +01:00
Philipp Oeser
b0d63ff8e1 Merge branch 'blender-v4.4-release' 2025-02-28 17:14:34 +01:00
Philipp Oeser
412cefe9bb Fix: Broken "File -> External Data -> Pack Linked Libraries"
The operator refused to pack libraries with absolute paths (wasnt the
case in its original implementation 16411da41e, but was added in
129fb516f4 -- for the reason of preventing "bad things happen on
unpacking" without an explanation of what these exactly are). It did so
by cancelling as soon as **one** library with ab absolute path was
found.

Now with the introduction of essential assets, we have those absolute
path linkages more or less "by default"  as soon as e.g. a brush is
used, so the operator is more or less unusable now. NOTE: these absolute
essential asset library paths seem to be converted to relative on save?
Upon reload, these are then gone... (might be another hint for an
alternative fix, see below)

By "bad things happen on unpacking" I would assume the scenario of
folders being created in unwanted locations (e.g. when moving from one
OS to another), but the same thing is also true for packing **files**
instead of libraries (there, absolute paths are allowed, and unpacking
in original locations can equally fail or create folder structures that
are "unexpected"). NOTE: for files though we have the choice of
unpacking to a relative folder (which wouldnt really be possible since
libraries can be nested and we would have to correct paths all over the
place). NOTE: the chance of creating "unwanted" folder structures with
relative paths might be slimmer, but if you have a lot of "upwards"
parent folders, relative can easily "break" as well.

Possible ways to resolve this:

### [1] skip libraries identified as essentials assets (still cancel on all other absolute paths)
Can check a library path to be contained in `EssentialsAssetLibrary`
`essentials_directory_path`. This would be the safest imo since it is a no-behavior change.

### [2] lift the limitation of absolute paths alltogether
Like mentioned above, things could break with "relative" almost as
easily as with "absolute", there might even be scenarios where
"absolute" is wanted. It is a more behavior-changing fix that we might
explore more after 4.4 is out.

### [3] skip absolute libraries (but continue with non-absolute libraries)
This does change behavior as well (it does not cancel as soon as **one**
library with ab absolute path was found anymore, but the worst case
scenario is that you end up with an "incomplete" file if you really
mixed absolute and realtive lib linking).

This PR implements [1] for now, [2] or [3] can follow for 4.5.

Fixes #134665

Pull Request: https://projects.blender.org/blender/blender/pulls/134839
2025-02-28 17:14:14 +01:00
Philipp Oeser
9855c11d2c Fix #135217: ColorManage Settings RNA paths incomplete/wrong
`ColorManagedDisplaySettings`, `ColorManagedViewSettings`,
`ColorManagedInputColorspaceSettings` were affected since these are used
from multiple places (Scene, File output nodes, ..).

Similar to how we are getting the path for `ImageFormatSettings` (which
pretty much has the distinction logic already), we can do so for the
ColorManage Settings as well (piggbacking on the already correct path to
the `ImageFormatSettings`.

With this, we can also remove these "known failures" from the test
introduced in 4032b853c3.

Pull Request: https://projects.blender.org/blender/blender/pulls/135238
2025-02-28 17:13:43 +01:00
Sybren A. Stüvel
559d7575a6 Cleanup: remove mention of once-planned 'Animation' data-block
Remove the mention of the 'Animation' data-block in a comment, as that
never was actually implemented.

No functional changes.
2025-02-28 17:12:39 +01:00
Julien Duroure
2614a43c92 glTF: New option to export Vertex Color with a given name 2025-02-28 15:49:57 +01:00
Bastien Montagne
f6ad99c648 Merge branch 'blender-v4.4-release' 2025-02-28 15:48:13 +01:00
Damien Picard
910895dcf3 I18n: Disambiguate "To"
Depending on context, "To" can have different translations. Add
"Modifier" context to one of them.

Reported by Alexandr Fatih.

Pull Request: https://projects.blender.org/blender/blender/pulls/135173
2025-02-28 15:46:33 +01:00
Damien Picard
1fc5f9d408 I18n: Disambiguate "Home"
"Home" in the context of the navigation key, as opposed to the home
directory in the file browser.

Reported by Satoshi Yamasaki.
2025-02-28 15:46:33 +01:00
Damien Picard
e76d997b44 I18n: Disambiguate "Clip"
Volumes' "Sequence Mode" recently got the "Sequence" context in
2b3f0d0110. The intention was to disambiguate the "Extend" enum item,
but this caused another item, "Clip" to also get this context. That
one already existed and referred to a sequencer clip.

Use the more specific "Volume" context instead.

Reported by Gabriel Gazzán.
2025-02-28 15:46:33 +01:00
Damien Picard
7f2fef78c3 I18n: Translate "Action" name when created with action.new operator
Actions get the default name "Action" when created through
action.new(). This is user data that can be translated.

Reported by Gabriel Gazzán.
2025-02-28 15:46:33 +01:00
Damien Picard
cd7334473a I18n: Translate quick effect data
Quick effects create various physics setups by adding objects,
materials, modifiers, and data layers. This data can now be
translated.
2025-02-28 15:46:33 +01:00
Damien Picard
5fc2d5b308 I18n: Fix Node Wrangler merge menus
Commit 8ff8fc4859 changed the context for the modes in Merge Nodes
and Change Nodes operators to Nodetree. The enum items were thus
extracted using this context, but the UI Menus were not updated to
reflect this change and a few items were no longer translated.

This commit fixes the issue by using the same translation context for
the menus' drawing.
2025-02-28 15:46:33 +01:00
Bastien Montagne
e5d1cf96fd Merge branch 'blender-v4.4-release' 2025-02-28 15:45:36 +01:00
Andrej730
25922344e5 RNA: WM API: fileselect_add - document filter_glob operator property usage
Pull Request: https://projects.blender.org/blender/blender/pulls/135288
2025-02-28 15:44:45 +01:00
Omar Emara
e2d886a104 Compositor: Implement link validation
This patch implements link validation for compositor node trees. All
links are valid in the compositor, since there is implicit conversion
between all supported types. This is needed for link gather search
operations.
2025-02-28 16:34:38 +02:00
Miguel Pozo
028263d9e5 Draw: Use StaticShaders for GPU subdivision
Make subdivision shaders compilation thread-safe.
(Continuation of #134812)

Pull Request: https://projects.blender.org/blender/blender/pulls/135265
2025-02-28 15:27:13 +01:00
Aras Pranckevicius
5f667fa2bc Cleanup: Replace IMB_processor_apply_threaded_scanlines with parallel loops
Code can become quite a bit smaller without intermediate structs

Pull Request: https://projects.blender.org/blender/blender/pulls/135299
2025-02-28 14:43:05 +01:00
Jacques Lucke
a55dbea0e7 Fix #135190: wrong file path filter for properties
This was caused by e05ef4c838. It wasn't obvious that just adding
the `filter_glob` would affect behavior elsewhere. Now there is a check
to see if the glob is non-empty.
2025-02-28 13:33:24 +01:00
Brecht Van Lommel
3cf21ceaf4 Merge branch 'blender-v4.4-release' 2025-02-28 13:28:20 +01:00
Brecht Van Lommel
8f00d8b0c8 Fix: Cycles hardware RT is only supported if all multi devices have it
Pull Request: https://projects.blender.org/blender/blender/pulls/135179
2025-02-28 13:21:33 +01:00
Brecht Van Lommel
8ce58f2973 Cycles: Disable HIP-RT and MNEE on RDNA1 generation GPUs
These have bugs in with the latest HIP-RT and HIP SDK, so just disable them
as we do not expect a fix in time, and rolling back would re-introduce other
bugs. As RDNA1 does not have hardware raytracing, it is also less important
to use HIP-RT.

Note that only RDNA2+ is officially supported by HIP, so these GPUs working
at all is somewhat lucky.

Fix #134979
Fix #134978
Fix #134975

Pull Request: https://projects.blender.org/blender/blender/pulls/135179
2025-02-28 13:21:14 +01:00
Aras Pranckevicius
058fc8910c ImBuf: speedup/cleanup IMB_display_buffer_acquire
Replace (only two remaining) usages of C-style IMB_processor_apply_threaded
with just threading::parallel_for which is much easier to use in C++ without
intermediate structs.

IMB_display_buffer_acquire got faster as a result -- parallel for has lower
overhead compared to the task pool approach that the previous
implementation was using.  While at it, noticed that
IMB_display_buffer_acquire was clearing just-allocated memory, immediately
before overwriting it. So that is now gone too.

IMB_display_buffer_acquire time during playback of 4K resolution float
content in VSE (Ryzen 5950X, Windows): 10.7ms -> 7.7ms

Pull Request: https://projects.blender.org/blender/blender/pulls/135269
2025-02-28 12:51:37 +01:00
Campbell Barton
86c0190924 GHOST/Wayland: set the size of custom cursors based on the DPI
HI-DPI screens now select larger custom cursors on Wayland,
previously small cursors would be scaled up.

This only works well when all outputs have the same scaling
as custom-cursors don't support sending multiple sized cursors
to GHOST at once, see code-comments for details.
2025-02-28 22:36:03 +11:00
Harley Acheson
fcf57e2024 UI: add larger mouse cursors
On Windows and Mac we use platform-specific mouse cursors that work at
multiple sizes. But Linux uses cursors that are defined in our source
code and are 16x16 pixels. This commit adds 24x24 and 32x32 versions of
all these cursors, using them will be committed separately.

Ref: !134894
2025-02-28 22:36:03 +11:00
Aras Pranckevicius
a33730dc0d ImBuf: multi-thread IMB_alpha_under_color
IMB_alpha_under_color_[byte/float] functions are used when preparing
the rendered image for image/movie output with RGB channels (i.e. no
transparency). They were single threaded before, multi-thread them.

Time taken by them on 4K resolution image (mix of various transparency
values in source), on Ryzen 5950X/Windows:
- IMB_alpha_under_color_byte: 10.1ms -> 1.9ms
- IMB_alpha_under_color_float: 14.6ms -> 8.8ms (smaller speedup since
  it becomes memory bandwidth limited)

Pull Request: https://projects.blender.org/blender/blender/pulls/135258
2025-02-28 12:18:45 +01:00
Julian Eisel
80d6ad3e9d Fix: UI: Text shortening function off by one character
Noticed while working on #134814 that `BLF_width_to_rstrlen()` would
give one character too much to put into the available space, resulting
in a visual overflow or clipped text when BLF clipping is enabled.

I think the issue was hidden by the code from 9c09998530, which would
remove further characters until the string actually fits. I'm proposing
to disable that code for now, hoping that this properly fixes the issue.

`BLF_width_to_rstrlen()`/`blf_font_width_to_rstrlen()` are supposed to
find the largest part from the end of a string that fits into a given
width. It would iterate the string from the back until a character
doesn't fit into the width anymore. However, it would return the
index of that character, the one that doesn't fit anymore, instead of
the last character known to fit.

Pull Request: https://projects.blender.org/blender/blender/pulls/135239
2025-02-28 11:58:52 +01:00
Sergey Sharybin
d853d994ae Merge branch 'blender-v4.4-release' 2025-02-28 10:42:54 +01:00
Sergey Sharybin
b9c727e255 Fix #135200: Linking linking artifacts with light trees
Ensure that the light tree flattening code does not try to
share node in cases when we need to modify its bit trail.

Pull Request: https://projects.blender.org/blender/blender/pulls/135249
2025-02-28 10:42:29 +01:00
Sergey Sharybin
21420711b0 Merge branch 'blender-v4.4-release' 2025-02-28 10:33:56 +01:00
Sergey Sharybin
c4e9cc18c5 OpenEXR: Change DWA compression mapping
OpenEXR DWA compression in Blender is derived from a more user-friendly
quality slider which has an intuitive range 0 .. 100.

Initially the mapping was done so that the visually lossless JPEG
quality of 97 was mapped to the default DWA compression 45. A point was
made that we should make it so default quality is mapped to the default
compression, following the intent of DWA for rendering and compositing
the main target.

This change adjusts the mapping so that quality of 90 is mapped to DWA
compression 45.

This change relies on the library update to fully utilize the DWA
compression #135037.

This change leads to the difference in the way proxies of EXR images
are generated:

```
                    DWA compression        Size (bytes)
Before the change   750                    175,208,243
After the change    225                     77,838,827
```

It is worth noting that the DWA compression seemed to be ignored in
the 4.4 branch before this change (this is what the original report is
about, a bit indirectly).

This is measured on the Fabrik Eingang footage converted to EXR. The
absolute value is ptobably not that important, it just shows the
reduction in size. This also leads to a lower quality of the proxy
image, but it is not worse than an actual JPEG proxy: the quality is
set to rather low 50 for the strip proxies.

Ref #134802

Pull Request: https://projects.blender.org/blender/blender/pulls/135103
2025-02-28 10:33:36 +01:00
Pratik Borhade
0ecf139426 Merge branch 'blender-v4.4-release' 2025-02-28 14:53:39 +05:30
Pratik Borhade
277df9ce1f Fix #134711: Frame selected shortcut not showing in menu
`IDProperty` of keyitem and operator in UI were not matching in
`wm_keymap_item_find_in_keymap()`. Now fixed by removing explicit
property value from UI menu

Pull Request: https://projects.blender.org/blender/blender/pulls/134724
2025-02-28 10:22:27 +01:00
Jeroen Bakker
e866137cc8 Fix: Compiling shaders without opensubdiv
When blender is compiled with `WITH_OPENSUBDIV=Off` Blender just works
fine. However when compiling all the static shaders the OpenSubDiv
shaders are also compiled and fail as they rely on OpenSubDiv.

This PR fixes this by only adding the shaders when OpenSubDiv is
available.

This issue could be reproduced using the `--debug-gpu-compile-shaders`
option or running GPU test cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/135285
2025-02-28 09:58:08 +01:00
Pratik Borhade
5b17522b70 Merge branch 'blender-v4.4-release' 2025-02-28 14:08:57 +05:30
Pratik Borhade
b69b201e20 Cleanup: Rename LayerTreeNode variable
Function is used by both layers and groups after e51fff61c5.
Keep the name more general.

Pull Request: https://projects.blender.org/blender/blender/pulls/135286
2025-02-28 09:37:00 +01:00
Lukas Tönne
d6e8323190 Merge branch 'blender-v4.4-release' 2025-02-28 09:06:23 +01:00
Lukas Tönne
4437782e00 Fix #135126: Mantaflow crashes when resizing a liquid domain
The `with_smoke` case is handled correctly and checks for reallocation,
but the liquid case was ignored for unknown reasons.

The `with_smoke` distinction was added years ago (c7596cd820)
but for some reason the `with_liquid` case was ignored for reallocation.

Pull Request: https://projects.blender.org/blender/blender/pulls/135247
2025-02-28 09:03:29 +01:00
Campbell Barton
8a78a6dc61 Merge branch 'blender-v4.4-release' 2025-02-28 17:09:51 +11:00
Campbell Barton
bba5b88b29 Fix #135245: Crash passing a dict for OperatorProperties to RNA funcs
The code-path for coercing a dictionary to operator/gizmo properties
was being used RNA functions where it's not supported.

Raise a type exception instead of crashing.
2025-02-28 16:59:53 +11:00
Jesse Yurkovich
6704647c66 Cleanup: IO: Use blender containers for AbstractHierarchyIterator
Use Blender Containers in the AbstractHierarchyIterator system. A future
bug fix in the area is looking like it will require another map so it
seems like a good time to replace the old containers before that lands.

The conversion is complicated due to how the prior code leveraged
`operator[]` to both add and update entries; it was never clear which
operation was being performed. This leads to a somewhat confusing mix
of `add_new`, `add`, and `lookup_or_add` calls. The calls in place now
are what was required based on our existing tests.

Additionally, pointer stability guarantees were a little bit different,
affecting the usage of the `graph_children` function the most.

Pull Request: https://projects.blender.org/blender/blender/pulls/134698
2025-02-28 05:58:46 +01:00
Campbell Barton
21e7a48f2f Merge branch 'blender-v4.4-release' 2025-02-28 13:21:14 +11:00
Padraig-O-Cinneide
f928987216 Fix #130890: Toggle the offset option after snap fails
Regression in [0] caused changing snap options to fail on redo.

Resolve by ensuring the depsgraph is evaluated.

Ref: !135279

[0]: 1c0f374ec3
2025-02-28 13:17:28 +11:00
Jesse Yurkovich
ea5ed269ae Merge branch 'blender-v4.4-release' 2025-02-27 16:48:42 -08:00
Jesse Yurkovich
1833d79231 Fix: USD: Don't attempt to export the special custom_normal attribute
Suppress exporting this attribute as there's no conversion to USD that
supports its data type (2d, 16-bit int) and because mesh normals (from
the `corner_normals` API) are already exported. This causes a rather
annoying UI Warning notification that the attribute isn't convertible
during export.

Pull Request: https://projects.blender.org/blender/blender/pulls/135271
2025-02-28 01:47:37 +01:00
Campbell Barton
322abbd311 Fix file-selector operators performing an undo push on failure
Operators are only expected to perform an undo push when finished.
2025-02-28 11:45:11 +11:00