Commit Graph

151938 Commits

Author SHA1 Message Date
Brecht Van Lommel
73fe848e07 Fix: Cycles log levels conflict with macros on some platforms
In particular DEBUG, but prefix all of them to be sure.

Pull Request: https://projects.blender.org/blender/blender/pulls/141749
2025-07-10 19:44:14 +02:00
Hans Goudey
2b86b32fc3 Fix: Avoid tagging geometry with uninitialized attribute on add
Mistake in 325ceabb09

Pull Request: https://projects.blender.org/blender/blender/pulls/141747
2025-07-10 19:05:00 +02:00
Harley Acheson
1d83c555fd Core: Clog Needs MINMAX define for Win32
Windows.h, otherwise we can get errors about the use of std::min
and std:max because of a conflict with macro definitions of "min"
and "max" in Windows.h. The reason for this being needed now and
not earlier is because of changes to an updated windows SDK
installed by a recent security update.

Pull Request: https://projects.blender.org/blender/blender/pulls/141696
2025-07-10 18:15:54 +02:00
Harley Acheson
f0d1af3836 Revert 0ea03b5137: Remove Fading of Editor Border Highlights
This implementation is fatally flawed in a couple ways, the most
important of which is related to multiple windows on separate monitors.
Basically the refresh would cause recreation of action zones when they
are not expected to change, resulting in complaint #141521. This also
causes too many refreshes of gizmos. I don't currently have any ideas
on a better way of doing this so we'll have to do without for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/141743
2025-07-10 18:02:53 +02:00
Miguel Pozo
b5ca00a403 Merge branch 'blender-v4.5-release' 2025-07-10 18:00:04 +02:00
Miguel Pozo
44faabdedd Fix 141742: Crash on startup due to failed shader compilation
Vulkan only.
Regression caused by 58a81f5c3a.
2025-07-10 17:59:07 +02:00
Xavier Hallade
94e9203713 Fix previous 4.5 merge 2025-07-10 17:47:03 +02:00
Xavier Hallade
48f89ff1c3 Merge branch 'blender-v4.5-release' 2025-07-10 17:43:30 +02:00
Michael Jones
7ec0adf033 Fix: Cycles MetalRT motion blur crash in some scenes with static objects
Crash encountered during top-level BVH setup of an Agent 327 asset. Object had no keyframes so `decomp` was empty. Use the object's transform instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/141740
2025-07-10 17:42:49 +02:00
Sergey Sharybin
93be12fde0 ImBuf: Linearize float buffers from FFmpeg
Blender expects float buffers to be in scene linear space, which was
violated bu the 1012bit movie reading code. While such image buffers
can be displayed correctly, performing operations in various areas
of Blender might lead to unexpected results.

The non-linear colorspace for ImBuf is expected to be "internal-only"
to a specific area, like VSE.

This is only done for Image and MovieClip data-blocks, sequencer still
reads movie files in their original colorspace as it helps performance and
sequencer can not be referenced from places where linear colorspace
for float buffer is really important.

Pull Request: https://projects.blender.org/blender/blender/pulls/141603
2025-07-10 17:39:00 +02:00
Xavier Hallade
05f27f594e Fix #141661: Crash when selecting oneAPI in preferences with legacy drivers
On systems with multiple Intel GPUs with a mix of recent and old
unsupported drivers (such as 101.3302), the Level-Zero stack may have
troubles initializing, leading to a crash while enumerating devices.

Luckily this condition actually leads to an exception we can catch,
as implemented here in this commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/141674
2025-07-10 17:36:00 +02:00
Sybren A. Stüvel
e8fde9f642 Merge remote-tracking branch 'origin/blender-v4.5-release' 2025-07-10 17:10:24 +02:00
Sybren A. Stüvel
c8dcbc32c4 Fix #141626: Refcount error when (un)assigning custom bone shapes
Fix the ID user count when changing `posebone.custom_shape`.

The code uses `reinterpret_cast<ID *>(pchan->custom)` instead of
`&pchan->custom->id`, as the former is `nullptr`-safe.

Pull Request: https://projects.blender.org/blender/blender/pulls/141726
2025-07-10 17:01:25 +02:00
Miguel Pozo
41746ddd3f Merge branch 'blender-v4.5-release' 2025-07-10 16:59:50 +02:00
Miguel Pozo
58a81f5c3a Fix #141725: EEVEE View Layers Functionality Broken
The ENUM_OPERATORS macro was outdated.
Update it an move it next to the enum declaration.
2025-07-10 16:58:34 +02:00
Brecht Van Lommel
b0d7e6d15f Fix: EEVEE glass BSDF broken after recent thin film addition
Caused by cf92af3ac4.
2025-07-10 16:55:06 +02:00
sake
ba51cebbdd Fix: #141639: Renaming Boolean Operation Solver From Fast to Float
Some parts of the UI (e.g., the boolean node) had renamed the 'fast'
solver to be the 'float' solver, since with the advent of the manifold
solver, it is no longer really right to characterize the float one
as the (sole) fast one.  This commit finishes the job.
It does have the effect of changing the string needed within the
Python API to select the float solver, so this is a (minor)
API-breaking change.
2025-07-10 10:44:44 -04:00
Hans Goudey
042b273da5 Cleanup: Use attribute API to access UV map for baking
Just removes one more usage of CustomData

Pull Request: https://projects.blender.org/blender/blender/pulls/141636
2025-07-10 16:17:06 +02:00
Hans Goudey
fc253de467 Cleanup: Use attribute API for Multires unsubdivide index mapping 2025-07-10 16:17:05 +02:00
Hans Goudey
6304609cd8 Cleanup: Simplify vertex group data access in data transfer modifier 2025-07-10 16:17:05 +02:00
Hans Goudey
cec05ab440 Cleanup: Use mesh helper functions to access vertex group data 2025-07-10 16:17:05 +02:00
Hans Goudey
c21a98d76a Cleanup: Use references for CustomData arguments in data transfer 2025-07-10 16:17:05 +02:00
Hans Goudey
325ceabb09 Fix #141721: Adding curve attributes doesn't invalidate caches
In this report, adding the "resolution" attribute didn't clear the
evaluated positions cache. In some cases capturing an attribute on
the mesh might just add the mesh rather than using an attribute
writer.
2025-07-10 10:02:25 -04:00
Brecht Van Lommel
69862114a6 Fix: Preview render memory leak with new system ID properties
Could be reproduced by going to material properties and changing the
Principled BSDF base color.

Pull Request: https://projects.blender.org/blender/blender/pulls/141679
2025-07-10 15:31:36 +02:00
Nathan Vegdahl
69433a181e Fix #141024: Normalize active vertex group properly
When manually setting a group's vertex weight, auto-normalization would
fail in some circumstances, such as when all other groups are locked.

The root cause of this issue was our approach for ensuring that the
weight specified by the user remained as-is when possible during
normalization. Rather than "when possible", it erroneously *always*
ensured the weight stayed as-is even when that made normalization
impossible. It came down to this:

1. Normalization is done as a post process, with no knowledge of what
   changes were just made to the weights.
2. In order to (try to) make up for that and ensure that the just-set
   weight remains as the user specified, the active group was
   temporarily locked during normalization, which could prevent
   normalization in some cases.

This PR fixes the issue by introducing a new internal-only concept of
"soft locked" vertex groups to the normalization functions, intended to
be used in exactly these cases where there are weights that have just
been set and we want to avoid altering them when possible. Soft-locked
groups are left untouched whenever normalization is achievable without
touching them, but are still modified if normalization can't be achieved
otherwise.

This has been implemented by introducing a new bool array alongside the
"locked" bool array in the core normalization functions.  Although all
uses in this PR only ever specify a single group as "soft locked", using
a bool array will make it easy to use this concept in other weight
painting tools in the future, which may modify more than one group at
once.

Pull Request: https://projects.blender.org/blender/blender/pulls/141045
2025-07-10 14:51:50 +02:00
Nathan Vegdahl
caddde1eb7 Refactor: Clean up and modernize core vertex weight normalize functions
- Add code documentation.
- Use Span and references rather than pointers everywhere.
- Move all core normalization logic into
  `BKE_defvert_normalize_lock_map()`, and have the other variants call
  that. This keeps all the logic in one place, which will help make
  future changes easier since they only need to be made in one place.
- Add unit tests for `BKE_defvert_normalize_lock_map()`.
- Refactor `vgroup_normalize_all()` to be clearer and avoid an
  unnecessary `goto`.
- Make both `vgroup_normalize_all()` and `paint_weight_gradient_exec()`
  only call into a single core vertex normalization function, rather
  than branching into one of many.

No functional change intended.
2025-07-10 14:51:49 +02:00
Bastien Montagne
4ce93a4b4e Merge branch 'blender-v4.5-release' 2025-07-10 14:48:13 +02:00
Bastien Montagne
f7c24c290e Fix #141415: crash when pasting node group node in some cases.
Refactor from e5a921ad9b did not account for the fact that some
`poll_instance` functions may require valid ID pointers in the checked
node. This is the case e.g. of the node group node, as it also checks
all of the nodes inside the referenced nodegroup.

This commit also fixes a logical mistake in the polling check, that
would systematically prevent pasting of nodes with no `poll_instance`
callback.

Pull Request: https://projects.blender.org/blender/blender/pulls/141729
2025-07-10 14:44:42 +02:00
Campbell Barton
aa9eb3dfcb Merge branch 'blender-v4.5-release' 2025-07-10 22:29:24 +10:00
Campbell Barton
8c77f96446 Fix: crash passing in --gpu-backend without an argument 2025-07-10 22:27:04 +10:00
Bastien Montagne
6131168e12 Merge branch 'blender-v4.5-release' 2025-07-10 14:14:48 +02:00
Bastien Montagne
a7d7b808f0 Cleanup: Remove (unused) ubsan.supp file.
Committed by mistake with previous commit.
2025-07-10 14:14:05 +02:00
Bastien Montagne
67f9b5645a Merge branch 'blender-v4.5-release' 2025-07-10 14:13:39 +02:00
Bastien Montagne
1238cef46d LeakSanitizer: Exclude another error from Python (resize_compact). 2025-07-10 14:12:08 +02:00
Campbell Barton
ad29066d9c Merge branch 'blender-v4.5-release' 2025-07-10 21:10:20 +10:00
Campbell Barton
ca0929e103 Merge branch 'blender-v4.5-release' 2025-07-10 21:10:15 +10:00
Campbell Barton
841b3e9d81 Fix: avoid divide by zero in the "Stretch To" constraint
A zero scaled axis resulted in the matrix containing NAN values.
Use `safe_divide` to avoid this.

Ref !141654
2025-07-10 21:05:52 +10:00
Pratik Borhade
f4dbe20940 Fix: Grease Pencil: Assert duplicating layer with attributes
When duplicating a layer with layer attribute, caught an assert hit
at `attribute_to_writer()` due to size mismatch between attribute
domain (layers count) and attribute length.
Now fixed by moving `add_node()` prior to `foreach_attribute()`. This way,
extra node already added to runtime data and layer count is updated
inside `ensure_nodes_cache` with the next layers() call

Noticed it during review of !141090

Pull Request: https://projects.blender.org/blender/blender/pulls/141722
2025-07-10 12:13:30 +02:00
Aras Pranckevicius
f6e2afb82a Fix #141715: VSE video proxies lose video rotation
ffmpeg_copy_display_matrix needs to be done after avcodec_parameters_from_context
call, since that one (re)initializes all the parameters.

Pull Request: https://projects.blender.org/blender/blender/pulls/141716
2025-07-10 11:42:24 +02:00
Sergey Sharybin
3f6861f8f3 Merge branch 'blender-v4.5-release' 2025-07-10 11:37:27 +02:00
Sergey Sharybin
413d8e5406 Fix #141651: VSE: The Channel setting does not work independently in multiple areas
Make display channel part of the key for the final cache.

The prefetch uses display channel of 0, which is the default. It might
need to be adjusted, but it is unclear whether it was behaving different
prior to the 9e4c26574a.

Pull Request: https://projects.blender.org/blender/blender/pulls/141670
2025-07-10 11:35:39 +02:00
YimingWu
cead28561f Merge branch 'blender-v4.5-release' 2025-07-10 17:04:18 +08:00
YimingWu
69da277dcb Fix #141693: Grease Pencil: Restore jitter behaviour
The line to get `jitter_settings_` was accidentally removed by
cac2806ee2. This patch adds that back so
strokes will still have the correct jitter settings when drawing.

Pull Request: https://projects.blender.org/blender/blender/pulls/141707
2025-07-10 11:03:07 +02:00
Bastien Montagne
db8846c225 Merge branch 'blender-v4.5-release' 2025-07-10 10:47:49 +02:00
Bastien Montagne
26b8846d94 LeakSanitizer: Suppress errors in OpenEXR library.
This library generates a single recurrent leak report currently, likely
a badly handled global?

```
=================================================================
==192885==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 31 byte(s) in 1 object(s) allocated from:
    #0 0x7f8a5c9cf307 in operator new(unsigned long) (/lib64/libasan.so.6+0xb6307)
    #1 0x7f8a5b03a0ea in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) (/home/blender/git/blender-vexp/install_sanitizer/lib/libOpenEXR.so.32+0xef0ea)
SUMMARY: AddressSanitizer: 31 byte(s) leaked in 1 allocation(s).
======================================================================
```
2025-07-10 10:46:59 +02:00
Mohamed Hassan
148eb703e1 Compositor: Integrate Sun Beams node into Glare node
This patch integrate the Sun Beams node into the Glare node as a new
mode. This is done because the Sun Beams node is mostly useless on its
own because it does no thresholding or addition, making it very hard to
use. On the other hand, the Glare node already does thresholding and
addition, so Sun Beams fits perfectly in it.

Pull Request: https://projects.blender.org/blender/blender/pulls/141424
2025-07-10 10:43:05 +02:00
Campbell Barton
ec4556ee98 Merge branch 'blender-v4.5-release' 2025-07-10 18:15:38 +10:00
Campbell Barton
7d4dc48c17 Merge branch 'blender-v4.5-release' 2025-07-10 18:15:34 +10:00
Campbell Barton
9f666b3ca8 Fix #139982: Subdivide curves doesn't interpolate curve tilt
Correct bezier curve interpolation & support tilt for bezier & nurbs
curves.
2025-07-10 18:07:51 +10:00
Aras Pranckevicius
077bd15387 Fix #141652: python exception when adding VSE Fade
Keep invalidate_cache('COMPOSITE') working, and map that to invalidation
of final frame & intra-frame caches of the strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/141714
2025-07-10 09:51:53 +02:00