Commit Graph

138381 Commits

Author SHA1 Message Date
Richard Antalik dd6ef37be9 Fix #140885: Crash when deleting strip in python
This PR combines 9d3b2b51a7, 30dbb7820d, 64198971ea and baf9691959 in main branch and fixes
conflicts.

Co-authored-by: Aras Pranckevicius <aras@nesnausk.org>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/141236
2025-07-10 09:24:17 +02:00
Philipp Oeser 70591f3d47 Fix #136372: Outliner hierarchy modification not auto keying
When recursively modifying a property via the Outliner while holding Shift,
only the property that was actually clicked got keyed.

With this fix, the clicked property gets keyed twice. Once with the added call,
and once in the ui button code. This shouldn't be a performance concern though.

Pull Request: https://projects.blender.org/blender/blender/pulls/140131

Co-authored-by: Christoph Lendenfeld <chris.lenden@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141671
2025-07-09 14:42:48 +02:00
Xavier Hallade 495f4ee1e5 4.2LTS: Fix #141171: oneAPI: Rendering artifacts in barbershop scene
max_shaders was not updated when Embree was disabled.

Backported from: 7691e6520b213e3b685cf1d6130ad0d0de0c7cf6

Pull Request: https://projects.blender.org/blender/blender/pulls/141230
2025-07-09 14:36:45 +02:00
Brecht Van Lommel 45d60bd1c7 Fix #139828: Proportional edit connected only fails with some topology
For an initial single selected edge, adjacent edges were not always added
to the queue if there is no face to propagate the distance across.

Pull Request: https://projects.blender.org/blender/blender/pulls/139889
2025-06-19 15:04:47 +02:00
Brecht Van Lommel ffd2e201e9 Fix #139918: Color management assert displaying render
This buffer can not just be scene linear, but data too.

Pull Request: https://projects.blender.org/blender/blender/pulls/140141
2025-06-19 15:04:47 +02:00
Brecht Van Lommel f44887dae8 Fix: Invalid snprintf into the same string in recent bugfix
Mistake in 5b1126da664318689f
2025-06-19 15:04:47 +02:00
Brecht Van Lommel a0fe1e3ac5 Fix #140375: Image editor save overwrites movie file
Create a good default name for saving individual frames of a movie file loaded
as an image datablock, instead of the movie file name.

Changes ImBuf to store the frame separate from the filepath, to implement this.
Seems more clear for ImBuf.filepath to be an actual filepath anyway.

Thanks to Jesse and Aras for investigating this bug.

Pull Request: https://projects.blender.org/blender/blender/pulls/140471
2025-06-19 15:04:47 +02:00
David Murmann 9eb16ef8c5 Fix #138509: Cycles: Point clouds do not render properly when using spatial splits
The bounds growth should take the radius of the points into account.

This affect BVH2, so GPU rendering without hardware ray-tracing.

Pull Request: https://projects.blender.org/blender/blender/pulls/139604
2025-06-19 15:04:47 +02:00
Brecht Van Lommel 0ee5dbe3d1 Release: Bump to 4.2.12 candidate 2025-06-19 15:04:47 +02:00
Philipp Oeser 327de76288 Release: Bump to 4.2.11 release 2025-06-16 13:48:06 +02:00
Bastien Montagne faf59777f3 Improve Blender resilience to blendfile DNA data corruption.
This commit improves DNA parsing resilience to data corruption in two ways:
* Detect and abort on failure to allocate requested amount of memory.
* Detect multiple usages of the same `type_index` by different struct
  definitions.

The second part fixes the `dna_genfile.cc:1918:40.blend` case reported
in #137870.

Ported from blender/blender@456a07c5e6 (Pull Request:
https://projects.blender.org/blender/blender/pulls/139803)

Pull Request: https://projects.blender.org/blender/blender/pulls/140299
2025-06-13 10:32:06 +02:00
Campbell Barton 446c191503 Fix out-of-bounds write with Wayland compose-key event handling
`xkb_compose_state_get_utf8` may return multiple characters, while
this isn't supported, prevent a buffer overflow & report a warning.

Co-authored-by: Phoenix Katsch <phoenixkatsch@gmail.com>

Ref: !114612

Pull Request: https://projects.blender.org/blender/blender/pulls/140272
2025-06-12 13:36:27 +02:00
Brecht Van Lommel 2bac991090 Fix #139180: Cycles does not work on older NVIDIA GPU driver in 4.2 LTS
Revert "Cycles: Add Blackwell to Cycles CUDA binaries architectures"

This reverts commit c483c15810. Rely on
PTX again to avoid incompatibility with new CUDA toolkit.
2025-06-02 12:15:50 +02:00
Brecht Van Lommel 0d4b18a529 Release: Bump to 4.2.11 candidate 2025-06-02 12:15:50 +02:00
Philipp Oeser 930497d462 Release: Bump to 4.2.10 release
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/139097
2025-05-19 16:56:30 +02:00
Campbell Barton 7327978cc7 4.2LTS: Fix #129225: Crash in modifiers & constraints with invalid enum values
Fix #129225: Crash in modifiers & constraints with invalid enum values

Even though this is generally avoided, drivers don't prevent
invalid values being set. Further files from branches or files
written in the future may contain enum values not yet known.

Resolve by range checking enum values which are used to index arrays.

---

Back-ported from f69fbb41c1

---

Extensions: resolve unhandled exceptions when wheel extraction fails

Setting up wheels wasn't handling errors if extraction failed.

Addresses the error in #132924.

---

Back-ported from 198d07e240

Pull Request: https://projects.blender.org/blender/blender/pulls/139016
2025-05-19 10:13:25 +02:00
Campbell Barton 7629abe435 4.2LTS: Extensions: forward any errors setting up wheels to reports
When actions on extensions failed setup extensions, errors weren't
forwarded to the user and were only visible in the terminal.

---

Back ported from fb3fe458bf

Pull Request: https://projects.blender.org/blender/blender/pulls/139017
2025-05-19 10:13:01 +02:00
Campbell Barton 0269725011 4.2LTS: Fix #129926: Crash with Python 3.12 & Manta flow
Python 3.12 no longer supports calls to PyImport_AppendInittab
once initialized.

The call was redundant as Blender's `bpy_internal_modules` already
includes the "manta" module.

Resolve by disabling the call when Python's lifecycle isn't being
managed by manta-flow.

Pull Request: https://projects.blender.org/blender/blender/pulls/139021
2025-05-19 10:12:41 +02:00
Campbell Barton 8299e073cf 4.2LTS: PyAPI: support Python 3.13
PyAPI: support Python 3.13

- `_PySet_NextEntry` has been removed, use generic iterator access
  which will has some additional overhead as it needs to create
  an iterator to access the values.

- Add v3.13 compatibility defines to account for renaming:
  _PyObject_LookupAttr -> PyObject_GetOptionalAttr
  _PyLong_AsInt -> PyLong_AsInt

- Unfortunately use of Python's internal API needs to be used to
  inspect op-codes in `bpy_driver.cc`.

Testing GLTF/FBX IO there isn't any significant performance impact
from these changes.

Resolves #123871.

---

Unbreak building with Python 3.12

Support for 3.13 [0] broke 3.12.

[0]: d9f38fca5f

---

Back port:

- 829b16e4f096717b831bde3110e06399772be876
- 8e18ee8276e47bd9aa139b218b394438b7df4530

Pull Request: https://projects.blender.org/blender/blender/pulls/139023
2025-05-19 10:12:24 +02:00
Campbell Barton 018a2386a5 4.2LTS: Fix #137314: Excluded directories ignored when opening from the splash
Regression in [0] which incorrectly swapped the check for the
`use_scripts` property being set with the value it was set to.

Resolve this error as well as the "Recover Last" operator
which never worked.

[0]: 8c688a052c

---

Back ported from: dbf6902a19b6979f8be7b314fec33db17801ed73

Pull Request: https://projects.blender.org/blender/blender/pulls/139045
2025-05-19 10:12:05 +02:00
Omar Emara f4865e06e8 Fix #134073: Compositor crash with viewer inside muted group
The compositor crashes when the user goes into a muted group that has a
viewer node while the backdrop is enabled. The compositor should not
schedule viewer nodes inside muted contexts, so we need to add checks to
prevent this.

Pull Request: #134093

Pull Request: https://projects.blender.org/blender/blender/pulls/138936
2025-05-19 10:11:12 +02:00
Aliaksei Urbanski 8646b5f3b2 Fix #134933: False positive SUPPORT_SSE42_BUILD
When you build Blender with optimization flags, such as `-O1` or higher, [this check](https://projects.blender.org/blender/blender/src/branch/main/build_files/cmake/macros.cmake#L572-L576) always passes, so `SUPPORT_SSE42_BUILD` is set to false positive value even when a CPU doesn't actually support `SSE4.2`.

This fix prevents a compiler from throwing away `SSE4.2` instructions.

_Best regards!_

Pull Request: https://projects.blender.org/blender/blender/pulls/135685

Pull Request: https://projects.blender.org/blender/blender/pulls/138922
2025-05-16 11:56:20 +02:00
Brecht Van Lommel f25ad81e8c Fix #138073: Crash with UI display of custom properties
Don't directly access translation context, as this pointer may be an ID
property instead of a real PropertyRNA.

Pull Request: https://projects.blender.org/blender/blender/pulls/138100
2025-05-15 09:16:59 +02:00
Christoph Neuhauser b2ccc05fd9 Fix #132196: UI: Camera gizmo cannot be shifted on Intel GPUs
GPU_DEPTH_NONE leads to issues with Intel GPU drivers on Windows
where camera gizmos cannot be shifted. glGetQueryObjectuiv for
GL_SAMPLES_PASSED seems to return zero in all cases.

This might be due to undefined behavior of OpenGL when the depth
test is disabled and rendering to a depth render target-only
framebuffer. Using GPU_DEPTH_ALWAYS fixes the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/136607
2025-05-15 09:16:38 +02:00
Brecht Van Lommel 67afa353f0 Fix #137821: Crash with grease pencil render, compositor and render region
When using the compositor, the parent scene overrides the render resolution
and region of the child scene. Unlike workbench and EEVEE, the grease pencil
engine was reading this information from the child scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/137923
2025-05-15 09:16:12 +02:00
Sean Kim 74a78f5e21 Fix #137751: Dyntopo undo can crash when drawing attributes
When performing an undo in Sculpt Mode with Dyntopo enabled, it is
possible that the active color attribute exists in the original mesh but
not on the BMesh used by Dyntopo. When attempting to extract this color
data, this can then lead to a crash.

To prevent this, use the BMesh as the source of truth for existence of
generic attributes when mode inside Sculpt Mode when Dyntopo is enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/137828
2025-05-15 09:15:39 +02:00
Jesse Yurkovich 851fa3c2f9 Fix #135672: Ghost: Prefer CF_HDROP ahead of CF_TEXT during drag'n'drop
When a user starts a drag'n'drop operation, the originating application
dictates the formats carried along with it. In the context of what is
broadly supported by Blender, we actively look for "text" and "files" in
the data. In that order. This order sometimes leads to a suboptimal
choice where, for example, a drag'n'drop of a "file" is interpreted as
"text" containing just the path to the file.

This PR changes the ordering to prefer the "files" first. Two notable
applications where this matters are:
 - The Firefox download library window
 - The Perforce P4V client application

Dragging and dropping files, like say FBX or OBJ, from these two apps
now properly triggers file handler behavior. Existing behavior is best
seen in the Blender Text editor. Dragging and dropping a file from the
above apps into a Text data block will yield the raw "file:///test.ext"
text. This will no longer occur after this PR.

Other platforms might have similar concepts but I don't have the
capability of checking how they handle this type of situation. They
would have to be checked against several applications to see if they
have the same issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/135939
2025-05-15 09:15:03 +02:00
Philipp Oeser 22ead00237 Release: Bump to 4.2.10 candidate 2025-05-14 13:22:15 +02:00
Sergey Sharybin af21da1282 Move tests/data and assets to the main repository
This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.

The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.

More detailed explanation and conversation can be found in the
design task.

Ref #137215

Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/137219

Pull Request: https://projects.blender.org/blender/blender/pulls/138487
2025-05-06 13:42:47 +02:00
Sergey Sharybin 60ad563e62 Fix: Compilation error with CMake 4.0
Essentially a back-port of the earlier PR against main !130566

Aligns version used by cmake_minimum_required() in the main
CMakeLists.txt with the one in the extern/audaspace,

Pull Request: https://projects.blender.org/blender/blender/pulls/137460
2025-04-15 12:55:40 +02:00
Philipp Oeser a10f621e64 Release: Bump to 4.2.9 release 2025-04-14 14:24:27 +02:00
Sahar A. Kashi ed1ccefb95 Handling SDK/ROCm 6+ lack of backward compatibility with pre ROCm 6 in Blender 4.2
This commit intends to port changes introduced in https://projects.blender.org/blender/blender/pulls/130153 to blender-v4.2. The update primarily targets Linux, and it's best to keep kernel binaries on Windows compiled with SDK 5.7. This is due to how HIP-RT is distributed on Windows before Blender v4.3—via the AMD driver package. The HIP-RT version shipped with the driver is based on SDK 5.7, and mixing versions could result in undefined behaviour.

Co-authored-by: salipourto <sahar.alipourkashi@amd.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/134892
2025-04-11 14:11:23 +02:00
Falk David 7140dace7a Fix #136538: Grease Pencil: Remove unused "Sample Color" keymap
This was meant to be used by GPv3, but ended up also being called
from GPv2 Draw Mode.
Removes the entry since it's not doing anything.

Pull Request: https://projects.blender.org/blender/blender/pulls/136599
2025-04-11 13:31:58 +02:00
Jacques Lucke b99d415913 Fix #137114: crash due to bad mesh ownership handling
When releasing a mesh from a `GeometrySet` one has to take manual control over
owner-management. In some cases, the geometry set was not the owner of the mesh,
but was just referencing it. This is generally fine in a limited set of
circumstances and can avoid copies. However, when taking ownership of the mesh
in the geometry set, one has to be sure that the geometry set actually has
ownership.

This is similar to what is done in e.g. `modifier_modify_mesh_and_geometry_set`.

Pull Request: https://projects.blender.org/blender/blender/pulls/137150

Pull Request: https://projects.blender.org/blender/blender/pulls/137338
2025-04-11 13:29:14 +02:00
Jacques Lucke 5b84e2bab2 Fix: avoid crash when there is an unknown interface socket
This needs to be backported to fix #136949.
2025-04-11 12:52:30 +02:00
Campbell Barton 044f5e06af Fix: potential use of invalid IME window pointer on Wayland 2025-04-11 12:45:29 +02:00
Sergey Sharybin a9f74b6dee Fix: Compilation error with XCode 16.3
Currently linking will fail if OpenMP is used. It will be addressed in a separate PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/136816
2025-04-11 12:35:37 +02:00
Sergey Sharybin 43dbdbd4ec macOS: Disable OpenMP when using Xcode 16.3 / LLVM 17
The precompiled library uses incompatible ABI with this version,
leading to linking errors.

There is no easy short-term solution: as per documentation the
OpenMP library must match LLVM version. It is hard to achieve in
a way that both older and newer LLVM versions are supported: it
would need to be multiple OpenMP libraries pre-compiled and chosen
at the build time.

There are not that many places left in Blender when OpenMP is
still used, so it seems better to invest in getting of those
remaining cases. The most challenging one would be Eigen, but
need to check whether the code-paths that are used from Eigen
even contain OpenMP.

Pull Request: https://projects.blender.org/blender/blender/pulls/136828
2025-04-11 12:35:00 +02:00
Campbell Barton 2ddb903bac Fix #136280: Select shortest path crashes in the UV editor 2025-04-11 12:34:26 +02:00
Pratik Borhade ca964e9766 Fix #100264: Outliner icon overlap when filter collection is off
In Outliner (View Layer mode) when filter "Collections" is off the icon
of the object mode overlaps with "arrow" icon (if "Show Mode Column" is
enabled). To fix this, add offset for this specific case and also when
"All View Layers" is off.

Pull Request: https://projects.blender.org/blender/blender/pulls/132339
2025-04-11 12:33:49 +02:00
Brecht Van Lommel 074d99c357 Fix #136593, #136641: Quadriflow remesh gets stuck on Windows
This appears to be a pre-existing issue that got exposed by the refactor
for some files, while for others it was already happening.

Pull Request: https://projects.blender.org/blender/blender/pulls/136680
2025-04-11 12:32:18 +02:00
Ray Molenkamp b01d9e5871 Fix #126782: Win: Install python3.dll into python bin folder
python3.dll was installed for blender, but not next to the
python binary, leading to issues with subprocesses. Given
it's only a small dll the duplication isn't that big of a deal.
2025-04-11 12:20:18 +02:00
Omar Emara 98f6f45b83 Fix #136360: Crash in older versions for files from v4.5
Blender crashes in older versions when loading files saved from v4.5 and
contain nodes like Mix in the compositor. That's because those nodes do
not exist in older versions, that is, this is a forward compatibility
issue.

The compositor already has protections in place to not crash when
loading files from future versions containing new nodes. However, for
nodes like Mix which existed in other node trees, the node is not new,
it is just new to the compositor, so it goes undetected and the
compositor tries to execute it leading to a crash.

To fix this, we also check the poll method of the node when verifying
compositor node trees. This should be backported to the corrective
release, as well as LTSs. But for v4.5, a change will later follow to
make the compositor execute such undefined/unsupported nodes using a
default operation that initializes the output with default values.

Pull Request: https://projects.blender.org/blender/blender/pulls/136438
2025-04-11 12:19:03 +02:00
Brecht Van Lommel db98b9063a Fix #134756: Internal IES texture node flagged in missing file report
There was another fix for this, but it addressed a different problem than
what was reported.

Pull Request: https://projects.blender.org/blender/blender/pulls/136331
2025-04-11 12:13:55 +02:00
Bastien Montagne 657c1f6912 RNA: LibraryWeakReference: make path and ID name editable.
There is no real reason to keep these read-only, they are not exposed in
the UI anyway, and being able to edit them can become necessary in a
pipeline mamangement context.
2025-04-11 12:09:59 +02:00
Bastien Montagne f451b984ce Fix: IMBuf: Potential buffer overflow in JPEG metadata writer.
Looks like a logic inversion mistake.

Not clear how bad this issue is, as other code related to image metadata
seems to expect 1024 char max size too (e.g. `MAX_METADATA_STR` define
in `ed_draw.cc`. But this is potentially a very bad issue, and the fix
seems safe enough for 4.4 still.

Should also be backported to active LTSs.

Pull Request: https://projects.blender.org/blender/blender/pulls/135983
2025-04-11 12:06:26 +02:00
Philipp Oeser 60b11bf186 Release: Bump to 4.2.9 candidate 2025-04-11 11:43:33 +02:00
Philipp Oeser 7685fdbb99 Release: Bump to 4.2.8 release 2025-03-17 15:22:41 +01:00
Patrick Mours c483c15810 Cycles: Add Blackwell to Cycles CUDA binaries architectures
Enables building of a Cubin for GPUs based on Blackwell architecture
if CUDA toolkit version 12.8 or higher is installed.
Only added sm_120 to the default set, since it is the one relevant for
consumer GPUs (RTX 5090 etc.) that are generally used with Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/134170
2025-03-13 14:36:39 +01:00
Brecht Van Lommel 08d5ffd7b3 Fix: Cycles device info uninitialized variable
It's unclear if this caused an actual bug, detected by ASAN.
2025-03-13 14:36:39 +01:00