Commit Graph

146536 Commits

Author SHA1 Message Date
Sergey Sharybin
5cd758368a Fix #134992: HIP-RT fails building BVH if Blender path contains space
Quite obscure issue, seemingly caused by the fact that HIP-RT is
passing a large (about 20 MB) global array to a different library
(HIP driver, via hipModuleLoadData). Having global variables of
such size seems to be always problematic as they can not be stored
on stack and, possibly, extra mapping is involved here. It is not
clear whether it is a quirk of the HIP driver, or Linux, or, maybe,
something completely different.

It is possible to work-around the problem by making a temporary
copy of data on heap memory and pass it to the hipModuleLoadData().
This is how other areas are dealing with modules in Blender.

This change contains patch against HIP-RT and the new HIP-RT
library compiled with the patch. It seems to fix the problem
reported in the report.

This change does not resolve OIDN on HIP GPU which seems to have
the same issue. However, it is not a recent regression and the
bug with OIDN GPU denoising can be reproduced using Blender 4.3.

Pull Request: https://projects.blender.org/blender/blender/pulls/135403
2025-03-04 09:35:54 +01:00
Philipp Oeser
7fcb565776 Fix #135330: Incorrect pasted flipped armature keyframes
Caused by 6d832ee5b3

The bone names were flipped correctly, however, we were missing the
actual FCurve BezTriple flipping.
This was caused by passing the wrong FCurve into
`do_curve_mirror_flippping` -- this function is checking for existence
of the FCurve in the `KeyframeCopyBuffer`, so we gotta pass
`fcurve_in_copy_buffer` (instead of the new fcu).

Pull Request: https://projects.blender.org/blender/blender/pulls/135381
2025-03-04 09:35:42 +01:00
Philipp Oeser
64c15823f7 Fix #135355: ops.render.opengl() in the console wont return {'FINISHED'}
Caused by 40ac21e5a5 [does not remember/resore the previous ScrArea &
ARegion anymore].
Without this, the operator reporting might get confused by using the
wrong area/region, so added back

NOTE: I tried to just notify `NC_SPACE | ND_SPACE_INFO_REPORT` in
`screen_opengl_render_end` (same as in `wm_operator_finished` >
`wm_operator_register`), but to no avail...

Think this is quite good pratice to leave us with the original area/
region anyways though.

Thx @brecht for improvements (restoring in `screen_opengl_render_init`
already, also taking care of restoring in some early out cases)

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/135394
2025-03-04 09:35:27 +01:00
Philipp Oeser
3589c5489a Fix: Cursor snapping does not work for Curves bezier handles
For this to work, we have to take into account handles in TransVert as
well.

Behavior is the same as in legacy curves (meaning that if the control
point itself is selected, the handles are ignores).

Part of #133448 (same thing for grease pencil, which I plan to also make
part of TransVert, but better solve for Curves first, so we can share
code here).

Pull Request: https://projects.blender.org/blender/blender/pulls/134945
2025-03-04 09:35:12 +01:00
Omar Emara
a50144e55c Fix #134914: Backdrop remain after loading new file
The compositor backdrop is still visible even after a new completely
different file is loaded. This is because compositor contexts cache
things like the backdrop, and contexts are stored on interactive
compositor renders, which are not freed until Blender is closed. To fix
this, we cleanup the interactive compositor renders that were created
upon file load.

Pull Request: https://projects.blender.org/blender/blender/pulls/135390
2025-03-04 08:33:17 +01:00
Jeroen Bakker
192d328f16 Vulkan: Enable vk loader logging
Enable VK loader debug messages when running blender_debug_gpu_*
scripts.

Allows easier debugging for users not familiar with using terminal.
It won't log anything when using OpenGL.

Vulkan loading logging can be big (1000 lines) but gives a lot of insight
how vulkan and related applications are configured on the user system
Sadly it does contains actual paths but think it is OK as the user is still
responsible for uploading it in the tracker.

An example of a log has been attached.

See #135327.

Pull Request: https://projects.blender.org/blender/blender/pulls/135399
2025-03-04 07:28:49 +01:00
Alaska
c30c19ad64 Fix #135391: Python type error reporting that addon is for newer version of Blender
This commits fixes a type error issue when reporting that a addon was
designed for a version of Blender newer than the current one.

Thanks to @Rakete for the fix.

Ref: !135392
2025-03-04 12:02:09 +11:00
Campbell Barton
72d89eee87 Fix use of the pixelsize for the size of rounded area bounds
Use the scale-factor instead of the pixelsize.

Without this, changing the line-width can double or half the size of
rounded corners.

Ref !135383
2025-03-04 10:10:09 +11:00
Brecht Van Lommel
1689c3ed0b Fix #135354: View render animation from Python no longer shows progress
To match old behavior, keep showing the time cursor in case a blocking
animation render is used from a Python script.
2025-03-03 19:29:54 +01:00
Clément Foucault
446ad3ba13 Fix #135246: Overlay: Loose wire disapears when line antialias is off
This was caused by the normals not being available (default to
`vec3(0)`) which produced `NaN`s down the line after the
unsafe normalize. Changing to `safe_normalize` fixes the issue.
2025-03-03 18:58:14 +01:00
Aleš Jelovčan
7206ad7dc4 Fix #135395: Use new Grease Pencil object type for status bar stats
Status bar stats did not display any data for Grease Pencil, because
the check still used the legacy Grease Pencil type.

Pull Request: https://projects.blender.org/blender/blender/pulls/135397
2025-03-03 17:46:16 +01:00
Clément Foucault
3653fe9524 Fix #135191: Overlay: Edit Mesh: Face selection Z-fighting with edit cage
The offset was not applied inside the vertex shader for
the edit Face selection overlay. Making the offset apply
to this shader fixes the issue.
2025-03-03 16:21:00 +01:00
Sebastian Parborg
6a3642cb1f Fix #135193: Correctly clamp the current frame when starting playback
The old code didn't properly communicate that it changed the current
frame leading to de-syncs in state between the frame shown and the audio
etc.
2025-03-03 15:21:47 +01:00
Sybren A. Stüvel
6f80d722c6 Fix #135163: Grease Pencil layer visibility animation doesn't work in NLA
Add a new function `bke::animdata::prop_is_animated()` that returns
whether an RNA path + array index is animated by anything. This covers
the assigned Action, NLA Action strips, and drivers.

This function is now used in the determination whether the visibility
of a GreasePencil layer is animated.

The easiest way to implement this with the existing F-Curve-visiting
logic was to call `adt_apply_all_fcurves_cb()`. However, that function
did not allow the callback function to signal "stop looping, I found
what was I was looking for", so I extended it to do just that. I don't
expect the extra conditions to significantly slow down the other uses,
as the branch predictor will very likely optimise for the "returning
true" case for those calls that simply visit everything.

Pull Request: https://projects.blender.org/blender/blender/pulls/135317
2025-03-03 14:24:07 +01:00
Falk David
c24b540400 Fix #135313: Grease Pencil: Layer adjustments get applied repeatedly during playback
The issue was that during playback, the evaluated Grease Pencil ID
is not being copied again for re-evaluation. This meant that the
adjustments get re-applied over and over again.

Ideally, we would restore the drawing pointers before modifiying them
again, but this is a bit trickier to implement.

To fix this issue for now, we do the layer adjustments during object
data evaluation. Using the geometry set for modifier evaluation
means that we copy the data and apply the adjustments for every
object.

In the future this can be optimized to only happen once per
Grease Pencil ID (in `BKE_grease_pencil_eval_geometry`).

Pull Request: https://projects.blender.org/blender/blender/pulls/135387
2025-03-03 14:09:06 +01:00
Alaska
60e4b0e5d0 Release tools: Refactor bug fixes per release script to be easier to expand
If a user wants to expand the "bug fixes per release" script with
new classifications, it requires them searching for and expanding a few
lists spread through out the code.

This annoying for anyone not familiar with the code, so refactor these
lists out to the "Constants" section to make it easier to see and
expands.
2025-03-04 01:52:59 +13:00
Miguel Pozo
f2c7e60a8c Fix #135357: Overlay-Next: Reference images briefly disappear when entering orthographic view
depth_bias_winmat_ is computed after sync.
2025-03-03 13:46:13 +01:00
Bastien Montagne
008826cf2b I18N: Updated UI translations from git/weblate repository (c8d9807f023). 2025-03-03 11:03:24 +01:00
Habib Gahbiche
b0fbd9154e Fix: 2D cage gizmo rotation part not being highlighted
The transform gizmo in the sequence editor does not show highlights properly for rotation, when hovering over it or while dragging it.

This patch has no further side effects on operators that use the 2d cage gizmo without rotation such as the crop gizmo and the viewer (transform) gizmo in the compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/135065
2025-03-03 10:46:20 +01:00
Harley Acheson
1a72a0f22c Fix #135295: Always Restore Previous Editor with set_or_cycle
ED_area_newspace correctly changes an area's space when the type and
subtype are set beforehand. But SCREEN_OT_space_type_set_or_cycle, when
changing to a new editor rather than cycling, needs newspace to ignore
the set subtype and use the last-used saved in the space. This
situation cannot be tested for in newspace. Instead have the operator
pass -1 as subtype to signal this intended behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/135367
2025-03-02 21:38:02 +01:00
Julien Duroure
5ddff2562b Fix: glTF Exporter: Another sanity check about slot 2025-03-02 08:02:56 +01:00
Julien Duroure
bb2f74e8ce Fix: glTF Exporter: Avoid crash when action has no slot assigned 2025-03-02 07:59:42 +01:00
Campbell Barton
2be7586bce Fix the line-width controlling UI element scale & drag threshold
The line-width is used to calculate the `U.pixelsize` which should only
be used to control the size of lines & points.

Update doc-strings to mention the intended use, remove unused defines.
2025-03-02 15:46:22 +11:00
Pratik Borhade
725617c7a0 Fix #135185: Delete pose asset crash
This is due to accessing member of nullptr Asset. After deleting the
action id from asset library, `CTX_wm_asset` won't return value because
force reset for files was tagged (`FL_FORCE_RESET_MAIN_FILES`).
Instead of updating library from active asset, use library reference to
clear then read/draw the updated asset library

Pull Request: https://projects.blender.org/blender/blender/pulls/135219
2025-03-01 14:56:24 +01:00
Alaska
b3b80deac1 Fix #135294: Improve missing VR support error message on macOS
This commit improves the error message explaining why VR isn't
supported on the macOS platform.

Pull Request: https://projects.blender.org/blender/blender/pulls/135302
2025-03-01 02:00:57 +01:00
John Kiril Swenson
f874d46589 Fix: UI: Transform Feedback for Invalid Trackball
Patch #132957 added helpful UI feedback when attempting to rotate or
scale an object whose transforms are set to "only affect locations."
But it neglected to check for invalid trackpad rotations that are
affected the same way. This patch renames the original `HLP_ERROR` to
`HLP_ERROR_DASH` to distinguish it from a `HLP_ERROR` transform cursor
with no dashed line present, which matches trackball's normal state.

Pull Request: https://projects.blender.org/blender/blender/pulls/134653
2025-02-28 21:14:36 +01:00
Harley Acheson
ead7a881a5 Fix: Constrain Docking Hint to Window Bounds
While joining and docking areas there is hint shown near the mouse that
describes the potential operation. But it is cut off if your mouse is
at the extreme right or bottom edge of the window. This PR just clamps
the position so it is always visible.

Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Pull Request: https://projects.blender.org/blender/blender/pulls/135211
2025-02-28 19:04:22 +01:00
Sahar A. Kashi
99a487a07c Fix: Cycles HIP-RT curve motion blur and motion pass
Various fixes in the HIP-RT BVH building related on making sure
curves motion blur is supported and is working correctly, as well
as properly handle motion pass configuration when path tracing is
to ignore motion blur (and instead write vector pass).

This PR contains #134797 with fixes needed to fully finish it:
moving commits from that PR here made it easier to ensure all
moving parts are tested without mental overhead.

Fixes #134510

Co-authored-by: Sahar A. Kashi  <sahar.alipourkashi@amd.com>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/135125
2025-02-28 19:02:03 +01:00
Gracjan Jeżewski
901353ce4c Fix: Hydra camera missing depth of field parameters
Add the missing F-Stop and Focus Distance.

Pull Request: https://projects.blender.org/blender/blender/pulls/134896
2025-02-28 17:37:35 +01:00
Brecht Van Lommel
9e44514b46 Fix: Hydra incorrect assmes camera object is always a camera 2025-02-28 17:37:35 +01:00
Philipp Oeser
65288e4130 Attempt to fix build error
introduced in 9855c11d2c
2025-02-28 17:30:11 +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
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
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
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
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
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
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
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
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
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
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