Commit Graph

151974 Commits

Author SHA1 Message Date
Jesse Yurkovich
deb86f3840 Cleanup: USD: Assign op properties directly to the import/export options
Assign the incoming operator properties directly to their corresponding
import/export options. This removes over 100 lines of unnecessary
ceremony assigning to local variables first.

Pull Request: https://projects.blender.org/blender/blender/pulls/141803
2025-07-12 00:10:31 +02:00
Jesse Yurkovich
c8052bd0dc Cleanup: USD: Use string instead of char array for prim_path options
Use `std::string` rather than raw char arrays for `root_prim_path` and
`prim_path_mask`. This is a more natural fit for these arbitrary length
strings and it simplifies downstream consumers of the values.

Pull Request: https://projects.blender.org/blender/blender/pulls/141801
2025-07-11 22:59:35 +02:00
Guillermo Venegas
c97195cd63 Refactor: UI: Replace uiItemMenuEnumFullO* with class methods
This converts the public uiItemMenuEnumFullO* functions to an
object-oriented API (as uiLayout::op_menu_enum overloads),
matching recent changes in the API.

Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/141797
2025-07-11 19:52:58 +02:00
Hans Goudey
8f198a85b4 Refactor: Add RNA_string_get function returning a string
This can replace most uses `RNA_string_get_alloc` and give us
better type safety and generally simpler code.

Internally, this uses the function added in 50076993f3.

Pull Request: https://projects.blender.org/blender/blender/pulls/141358
2025-07-11 16:24:13 +02:00
Sybren A. Stüvel
7e3c5d021b Cleanup: document the PROP_ID_REFCOUNT RNA property flag
Document what the flag does, and explain that it effectively gets nullified
when there is a custom setter function.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/141739
2025-07-11 16:19:14 +02:00
Hans Goudey
d677a0636e Fix: Incorrect selection check in vertex group smooth after cleanup
Mistake in 546d3495a8.
Thanks to Campbell for spotting this.
2025-07-11 09:29:45 -04:00
Guillermo Venegas
1f34dc9155 Refactor: UI: Replace uiItemsEnumO with class method uiLayout::op_enum
This converts the public uiItemsEnumO and uiItemsFullEnumO functions
to an object-oriented API (as uiLayout::op_enum overloads), matching
recent changes in the API.

Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/141748
2025-07-11 15:25:30 +02:00
Damien Picard
db39daf9e7 Fix: Node Wrangler: Various fixes and cleanup
Fix error in Attributes menu in World shading mode

Node Wrangler's Attributes menu allows direct addition of attributes
to a shading node tree. It only works on objects, not World, since the
latter does not store attributes.

Fix: Update Merge Nodes operator for new node types

Nodes were deduplicated between node modes (shading, compositing,
geometry) in Blender 5.0. This commit aligns Node Wrangler's Merge
Nodes operator to the new node types.

Cleanup
- Remove unused import and variables
- Merge Nodes Operator
  - Use negative list indices instead of length - index.
  - Chain conditions instead of nesting them.

Pull Request: https://projects.blender.org/blender/blender/pulls/141508
2025-07-11 15:25:06 +02:00
Philipp Oeser
8840aa8718 Merge branch 'blender-v4.5-release' 2025-07-11 13:19:36 +02:00
Philipp Oeser
481776a105 Fix #141727: Toggling overlays with enabled Retopology missing update
Meshes could still be present or missing when toggling overlays.

Toggling overlays alone does not trigger object syncing (which is needed
here since the visibility of active object might change).

So to resolve, trigger `rna_SpaceView3D_retopology_update` when toggling
overlays with enabled Retopology

Ref. 6fee44760a

Pull Request: https://projects.blender.org/blender/blender/pulls/141731
2025-07-11 13:19:18 +02:00
Philipp Oeser
6d900f841f Merge branch 'blender-v4.5-release' 2025-07-11 13:18:42 +02:00
Ian Yoo
0c9aaaf25a Tests: Add extended boundary blur tests
These two tests cover the extended boundary option for the blur node.
One with single value input and another with variable input.
They mirror the non-extended gaussian tests.

Coverage:

- Function: 86.36% -> 90.91%
- Line: 91.95% -> 96.90%
- Region: 83.51% -> 96.63%
- Branch: 84.00% -> 95.65%

Pull Request: https://projects.blender.org/blender/blender/pulls/141528
2025-07-11 12:23:42 +02:00
Habib Gahbiche
9a33108afc Compositor: Support rotation for Split Node Gizmo
The split gizmo now supports rotation. It uses the same rotation
handle for `cage2d` gizmos

Pull Request: https://projects.blender.org/blender/blender/pulls/140356
2025-07-11 11:59:46 +02:00
Habib Gahbiche
b35971ad08 Compositor: Rename "Z" to "Depth" in Z Combine Node
Node:
- Rename "Z Combine" node to "Depth Combine"

Sockets:
- First input "Image" -> "A"
- Second input "Image" -> "B"
- First Z -> "Depth A"
- Second Z -> "Depth B"
- Output Image -> "Result"
- Output Z -> "Depth"

This is a breaking change for the Python API

Pull Request: https://projects.blender.org/blender/blender/pulls/141676
2025-07-11 11:58:29 +02:00
Julian Eisel
dd81681583 Refactor: Start splitting filelist.cc
This file is rather big. I'm working in it quite a lot, and find it very
hard to navigate in. I constantly get lost or spend time manually
looking for things.

Move the file to a directory, add an internal header, and split out
filtering and sorting code into own files. I'm sticking with these for
now to not cause too many conflicts with blender/blender!130543, which
does a lot of changes/additions to filelist.cc.

Pull Request: https://projects.blender.org/blender/blender/pulls/141744
2025-07-11 11:30:04 +02:00
Nathan Vegdahl
03332c514d Cleanup: Use prescribed symbol syntax in Path Template code comments
Specifically, #Symbol rather than `Symbol`, as documented in
https://developer.blender.org/docs/handbook/guidelines/c_cpp/#comments

This is a follow up to #139438

Pull Request: https://projects.blender.org/blender/blender/pulls/141775
2025-07-11 11:00:52 +02:00
Jesse Yurkovich
6df4c14e4b Fix #141760: FBX export inadvertently modifies color property on lights
Broken with commit a12bce039f

The Blender `Color` type is treated as a reference in Python. Make a
`.copy` to ensure that changes are not made to the actual scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/141762
2025-07-11 10:17:07 +02:00
Lukas Tönne
efeb11b9c5 Fix #141012: Curve template allows zooming out beyond clip range
The clipping flag of curve templates is applied only to point positions,
but allows zooming beyond the clip range due to numerial error.

If clipping is disabled the curve view rect is still restricted to
clip ranges (this could be considered a bug). However, zooming in and
back out leaves a tiny offset to the clip rect that allows one more
zoom-out step.

This patch ensures the curve rect is always within the clip rect.
When the difference is very small the view rect is snapped to the clip
rect.

Pull Request: https://projects.blender.org/blender/blender/pulls/141275
2025-07-11 10:15:19 +02:00
Campbell Barton
7323ebf192 Cleanup: wrap long lines in operator tests 2025-07-11 17:13:50 +10:00
Campbell Barton
808cc599f8 Cleanup: reduce right shift, wrap long lines 2025-07-11 16:48:15 +10:00
Omar Emara
c53a839631 Compositor: Support host allocation for GPU compositing
This patch allows allocating results on the host even if the context
uses GPU. It also adds support for uploading the host result into a GPU
allocated result. This is done to allow using results for storing data
that gets computed on the CPU be end up on the GPU, like some of the
cached resources used by the compositor. Those resources are refactored
accordingly in this patch as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/141745
2025-07-11 07:55:11 +02:00
Campbell Barton
6a2a999173 Merge branch 'blender-v4.5-release' 2025-07-11 15:48:27 +10:00
Campbell Barton
29a7b60a40 Fix #141667: Erratic behavior with orthographic camera gizmo
Regression in 3.6 caused the orthographic camera gizmo to enter a
feedback loop where the gizmo range was changed while being interacted
with.

Resolve by preventing the range being updated during modal interaction.
2025-07-11 15:36:16 +10:00
Richard Antalik
61b6af6096 Fix #141190: Strip cache not invalidated when keyframe is added
Add case for action ID to VSE depsgraph update callback. Cache is only
cleared, when action changed is owned by scene, since VSE animation
lives there.

Also fixes: #119998, #109579, #98432, #90041, #94542, #82861

Pull Request: https://projects.blender.org/blender/blender/pulls/141647
2025-07-11 07:00:10 +02:00
Campbell Barton
d2a48cc12f Fix #141733: bmesh.ops API docs not showing function names
Formatting changes in [0] broke doc-string extraction.

[0]: a5eb65bac8
2025-07-11 14:44:09 +10:00
Jesse Yurkovich
4de536c114 Cleanup: Remove unused includes of grease pencil legacy headers
Removes unnecessary usages of the following headers:
- BKE_gpencil_geom_legacy.h
- BKE_gpencil_legacy.h
- BKE_gpencil_modifier_legacy.h
- BKE_grease_pencil_legacy_convert.hh
- DNA_gpencil_legacy_types.h

Pull Request: https://projects.blender.org/blender/blender/pulls/141471
2025-07-11 05:01:57 +02:00
Jesse Yurkovich
319a2a5e57 Cleanup: USD: Use pxr::UsdTimeCode for all time values
Standardize on using `pxr::UsdTimeCode time` rather than the assortment
of other uses we had including:
- double motionSampleTime
- double motion_sample_time
- float time (!)
- pxr::UsdTimeCode timecode

This matches what the USD API itself uses.

The only exception is for the APIs and types defined in usd.hh that need
to be useable inside Blender itself. Those will remain unchanged and
continue to use "double motion_sample_time".

Pull Request: https://projects.blender.org/blender/blender/pulls/141756
2025-07-11 01:28:49 +02:00
Hans Goudey
546d3495a8 Cleanup: Use attribute API for mesh data in vertex group smooth operator
And use VArray::ForSingle instead of macros.

Pull Request: https://projects.blender.org/blender/blender/pulls/141752
2025-07-10 22:18:07 +02:00
Hans Goudey
8f65cbd727 Cleanup: Use attribute API for dynamic paint color outputs 2025-07-10 22:18:06 +02:00
Hans Goudey
16aca719e2 Cleanup: Remove unnecessary includes in attributes files 2025-07-10 22:18:06 +02:00
Hans Goudey
a3e8da0072 Cleanup: Line Art: Simplify Freestyle flag CustomData access 2025-07-10 22:18:06 +02:00
Hans Goudey
93f6adcaf1 Cleanup: Use attribute API to create mesh attributes in Freestyle 2025-07-10 22:18:06 +02:00
Hans Goudey
1f1d2f4252 Cleanup: Use mesh helper function to access edge data 2025-07-10 22:18:06 +02:00
Hans Goudey
5b6e632582 Cleanup: Use attribute API for solidify modifier result attributes
Use the attribute API for the result bevel weight and crease custom
interpolation.
2025-07-10 22:18:06 +02:00
Brecht Van Lommel
f38b4323f9 Fix: Build error with NDEBUG after recent fix for log level macro 2025-07-10 21:10:36 +02:00
Jorn Visser
035bc3e7ca Fix #115940, #111152: Handle access violations while loading Wintab
Some Wintab drivers can randomly crash while loading. Guard against this
by catching such exceptions using SEH. Also save and restore the current
unhandled exception filter as some drivers replace it with their own for
some reason.

Pull Request: https://projects.blender.org/blender/blender/pulls/141685
2025-07-10 19:59:34 +02:00
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