Commit Graph

120723 Commits

Author SHA1 Message Date
Sean Kim
73fd422701 Cleanup: Use C++ math types for multires_inline.hh
* Use `float3x3` and `float3` for the resulting tangent matrix and
  constituent derivatives, respectively.

Pull Request: https://projects.blender.org/blender/blender/pulls/140442
2025-06-16 23:42:05 +02:00
Jesse Yurkovich
9353fc280d Cleanup: Improve precompiled header for USD
Improve the selection of headers included in the precompiled header.

This reduces build time of the full `io/usd` directory by 12 to 19%.

Laptop i7-8750h: Average 30.3 sec --> 24.5 sec
Desktop i7-13700k: Average 12.1 sec --> 10.7 sec

Pull Request: https://projects.blender.org/blender/blender/pulls/140418
2025-06-16 22:51:58 +02:00
Pablo Vazquez
8404228aeb UI: Rename "HDRI Preview" to "Reference Spheres"
`HDRI Preview` is no longer correct since the spheres are also affected
by lights in the scene.

Rename to `Reference Spheres` and adjust the tooltip accordingly.

Related to #140438

Pull Request: https://projects.blender.org/blender/blender/pulls/140487
2025-06-16 22:05:05 +02:00
илья _
4b88e3dbdd Cleanup: Pass optional constant string reference by value
Small constant trivial referencing objects should be passed by value.
Current state of code most likely legacy from the times there was an optional strings.

Pull Request: https://projects.blender.org/blender/blender/pulls/138058
2025-06-16 20:34:32 +02:00
Mattias Fredriksson
407dcb39d4 Tests: EXPECT_EQ_SPAN utility macro
Replaces pointer based EXPECT_EQ_ARRAY with EXPECT_EQ_SPAN in most cases
as they already used spans (or span compatible datastructures).
Currently EXPECT_EQ_ARRAY only takes in one size variable and doesn't
compare the  number of elements between arguments (requiring an
additional line to do so).

This should make the code cleaner and safer. Goal is also to promote
the use Spans in new test code.

Pull Request: https://projects.blender.org/blender/blender/pulls/140340
2025-06-16 20:31:00 +02:00
Guillermo Venegas
b03e64223c Refactor: UI: Add active_default, activated_init, enabled methods
This replaces API for accessing the uiLayout  active_default,
acviated_init, enabled properties with methods, following uiLayout
refactors and the Python API naming.

Pull Request: https://projects.blender.org/blender/blender/pulls/140226
2025-06-16 20:23:28 +02:00
Bastien Montagne
9a41dc73f9 Merge branch 'blender-v4.5-release' 2025-06-16 18:49:45 +02:00
Pablo Vazquez
c046b8bb21 UI: Outliner: Improvements to row highlights
Subtle visual tweaks to the way highlights are drawn in the Outliner
in order to improve readability.

* Similar to the File Browser, draw highlights as rounded corners.
* Draw an additional slightly lighter outline in active elements.
* Replace the dark background for dragged-onto elements with a
  lighter color, and add an outline.

See PR for details and screenshots.

Part of #135192

Pull Request: https://projects.blender.org/blender/blender/pulls/140371
2025-06-16 18:48:47 +02:00
Bastien Montagne
2e5b4a120a Fix #140083: Nodes: Never attempt to read default value from custom socket.
Pull Request: https://projects.blender.org/blender/blender/pulls/140459
2025-06-16 18:48:19 +02:00
Pablo Vazquez
2ea3cd2188 UI: Theme: Make nodes use the exact theme color
Make node headers (or body when collapsed) use the exact theme color
set for that node type, instead of a hardcoded blend between it and the
node backdrop.

This can result in unreadable combinations, but allows more
flexibility and it is consistent with the rest of Blender.

Both dark and light theme defaults have been updated.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/140481
2025-06-16 18:34:29 +02:00
Nathan Vegdahl
86f2dd418d Merge branch 'blender-v4.5-release' 2025-06-16 17:40:46 +02:00
Clément Foucault
168ef2331c Fix #140361: EEVEE: Volume viewport renderpass requires volume
The volume module was not enabled when the render pass
was needed. Forcing the module to be enabled fixes the issue.
2025-06-16 17:33:46 +02:00
Nathan Vegdahl
9b1f4dc483 Merge branch 'blender-v4.5-release' 2025-06-16 17:33:09 +02:00
Nathan Vegdahl
33b712f909 Core: Always use current open file for blend_name variable
Previously `blend_name` was using the same path to get its file name
as `//` used. However, the choice of path for `//` seems to be
bespokely chosen at each call site.  There may be a logic to it, but
if so it's not immediately clear what it is.

This PR changes `blend_name` to instead always use the currently open
("global") file path, making it well-defined and predictable for
users.

This also prepares better for PR #139438 for 5.0, which adds
`blend_name_lib`, which always uses the blend file that the ID owning
the path is linked from. Over-all this should be much more predictable
and controllable for users.

Pull Request: https://projects.blender.org/blender/blender/pulls/140474
2025-06-16 17:32:11 +02:00
Pablo Vazquez
69599493c8 Cleanup: Use function to copy from default theme
Use the dedicated `FROM_DEFAULT_V4_UCHAR` function instead of
`copy_v4_v4_uchar`.
2025-06-16 17:12:58 +02:00
Hans Goudey
c48423256d Draw: Remove mode transfer overhead when inactive
Currently the mode transfer overlay has to check whether it should
draw for every single object. For scenes with many instances even
that small amount of work per object can be significant. I observed
the overlay taking 1.8% of the samples in a profile.

This commit removes the mode transfer timer and stores it in a
global map instead. Besides the benefit of removing 8 bytes per
object, the main improvement is that it's now trivial to check
whether the overlay can be completely disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/140374
2025-06-16 17:02:25 +02:00
Omar Emara
efc2fd16a9 Compositor: Remove Map Range node
This patch removes the Map Range node that was deprecated in 4.5 and was
planned for removal in 5.0. The common Shader Map Range node should be
used instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/140476
2025-06-16 17:00:43 +02:00
Clément Foucault
52f986c2a9 Fix #140179: EEVEE: Vulkan crashing with complex procedural materials
Avoid crash by removing overlapping attributes.
Print error to the console.

Pull Request: https://projects.blender.org/blender/blender/pulls/140470
2025-06-16 16:38:13 +02:00
Bastien Montagne
e28a714245 Merge branch 'blender-v4.5-release' 2025-06-16 16:31:38 +02:00
Hans Goudey
6f0229b3a0 Cleanup: Remove unused Python OpenGL warning popup
Unused since decd88f67e
2025-06-16 10:27:40 -04:00
Hans Goudey
6bb10e8412 Cleanup: Remove unused variable in subdiv paint overlay shader
From 4b4ed8bccc
The vert to loop map is unnecessary here, we don't need information
about neighboring faces. This was just incorrectly copied from older
code where this data was mixed with normal evaluation.
2025-06-16 10:21:07 -04:00
Bastien Montagne
c605c71a96 Fix #140451: Revert "Fix #140396: bmesh.ops.dissolve_edges fails to dissolve vertices"
The BMesh python API was fully broken by this commit.

While the fix seems to be reasonably simple, it is safer for now to revert
the faulty commit, as the breakage is fairly impactful for people using 4.5
and/or 5.0 daily builds.

This reverts commit bd3a66a416.
2025-06-16 16:18:41 +02:00
Omar Emara
961fdb9a86 Compositor: Remove Mix Color node
This patch removes the Mix Color node that was deprecated in 4.5 and was
planned for removal in 5.0. The common Shader Mix Color node should be
used instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/140468
2025-06-16 15:59:11 +02:00
Hans Goudey
c16ee2c939 Refactor: Use C++ bounds corners function
Remove the last uses of `BKE_boundbox_init_from_minmax` in
favor of the newer `bounds::corners`. Besides clearer naming
and better ergonomics, it's also inline-able which seems to be a
good thing for such a simple function.

In order to get the same behavior as before I changed the
C++ bounds function to give the same vertex order as the
older function.

Pull Request: https://projects.blender.org/blender/blender/pulls/140401
2025-06-16 15:49:14 +02:00
Hans Goudey
84212bae4b Attributes: Remove AttributeStorage legacy compatibility option
Remove the `use_attribute_storage_write` experimental option and always
write in the new format, which is supported by 4.5. The new format is
only used at runtime by point clouds currently but there is no reason
for it to be an option at this point.

Pull Request: https://projects.blender.org/blender/blender/pulls/140284
2025-06-16 15:48:23 +02:00
Omar Emara
0bac721763 Compositor: Remove Color Ramp node
This patch removes the Color Ramp node that was deprecated in 4.5 and
was planned for removal in 5.0. The common Shader Color Ramp node should
be used instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/140462
2025-06-16 14:56:22 +02:00
Jeroen Bakker
f39460d407 Merge branch 'blender-v4.5-release' 2025-06-16 14:47:31 +02:00
Jeroen Bakker
e8c5d26838 Fix #140285: Refactor clip editor drawing to fix asserts
- Removes asserts where polygon shaders are used to draw lines and
  points. This is incorrect and leads to asserts in Vulkan.
- Kept as close to the existing control flow. Didn't want to introduce
  regressions as this PR lands in 4.5

Pull Request: https://projects.blender.org/blender/blender/pulls/140337
2025-06-16 14:43:06 +02:00
marcopavanello
ab21755aaf Shaders: Remove old Preetham and Hosek sky texture models
Remove old Preetham and Hosek-Wilkie sky models, which are less accurate.
The Nishita improved model has been available for long enough.

Pull Request: https://projects.blender.org/blender/blender/pulls/139923
2025-06-16 14:36:18 +02:00
Omar Emara
27b83c5fdc Compositor: Remove Value node
This patch removes the Value node that was deprecated in 4.5 and was
planned for removal in 5.0. The common Shader Value node should be used
instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/140460
2025-06-16 13:47:34 +02:00
Miguel Pozo
60c74cfa20 Draw: Use unique handles where possible
Use `unique_handle` where possible.
Add `unique_handle_for_sculpt`.

This also updates `ObjectRef` to make all its properties either
immutable or private.

Pull Request: https://projects.blender.org/blender/blender/pulls/139852
2025-06-16 13:39:21 +02:00
Miguel Pozo
ef9187c2c0 Merge branch 'blender-v4.5-release' 2025-06-16 13:04:14 +02:00
Miguel Pozo
3c3fe0659a Fix #140416: Crash when undoing adding camera background movie clip
Fix free_movieclips_textures.
Release movieclips at the end of draw.
(Same behavior as Overlay Legacy)
2025-06-16 13:03:31 +02:00
Clément Foucault
11063b5b90 pyGPU: Remove creating shaders directly from GLSL source files
The reasoning is that this is not supported by Vulkan.
In order to make shaders cross API compatible, python scripts
needs to use `GPUShaderCreateInfo`.

This removes the constructor all-together. Another option
is to raise an error inside the constructor and always
return none.

Rel #107374

Pull Request: https://projects.blender.org/blender/blender/pulls/140368
2025-06-16 12:51:15 +02:00
Clément Foucault
decd88f67e Python: Remove deprecated BGL API
The API was in a deprecation state for many years now.
This API was not compatible with Metal nor Vulkan.

This also remove `Image.bindcode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/140370
2025-06-16 12:50:50 +02:00
Clément Foucault
9ddc67166f Fix: GPU: Hang on Mesa with --debug-gpu on opengl
Just workaround the issue.
2025-06-16 12:44:16 +02:00
Bastien Montagne
2d490d47a4 Merge branch 'blender-v4.5-release' 2025-06-16 12:43:46 +02:00
Bastien Montagne
6ccdb8c06e I18N: Add comment about required manual sync in nodes code.
Nodes code uses direct access to enum property values definition
(outside of the RNA API) to generate UI (translated) messages, this is
risky/messy since the i18n context potentailly defined for the actual
RNA property is not available in these cases.
2025-06-16 12:43:10 +02:00
Damien Picard
00d9d58d77 I18n: Fix strange report formattings
A few reports used string formatting in a way which made translation
awkward, by splitting the message into several individually translated
submessages, instead of just one message with formatting markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/139895
2025-06-16 12:39:06 +02:00
Damien Picard
ec22a91233 I18n: Allow translation of Bitwise Math node label
The Bitwise Math node's label uses a formatted string, where the
operation name was not translated.
2025-06-16 12:39:02 +02:00
Omar Emara
35d21bd9d7 Compositor: Remove forward compatibility code
This patch removes the forward compatibility code for the compositor
that was introduced in 4.x and planned for removal in 5.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/140458
2025-06-16 12:38:45 +02:00
Sybren A. Stüvel
3b01809475 Merge remote-tracking branch 'origin/blender-v4.5-release' 2025-06-16 12:11:11 +02:00
Sybren A. Stüvel
953aaf1dae Fix: Pose Inbetweener crashes when bones have custom properties
Fix a crash in the inbetweener (and other similar tools) when bones have
custom properties, but no system properties. It just needed another
`nullptr` check.

Pull Request: https://projects.blender.org/blender/blender/pulls/140455
2025-06-16 12:10:47 +02:00
Julian Eisel
abc0b8dbc4 Merge branch 'blender-v4.5-release' 2025-06-16 12:08:15 +02:00
Julian Eisel
8717036405 Fix #140426: Saving new file creates empty catalog file next to .blend
When initially saving a file, we would now always create a catalog
definition file that would be writted to disk on file save. This
shouldn't be done if there are no new catalogs to write.
2025-06-16 12:07:01 +02:00
Brecht Van Lommel
b920f6f1a7 Shaders: Remove point density texture node
This is replaced by geometry nodes, where volumes can now be generated from
point clouds and meshes with more control, and more efficient rendering as a
sparse volume.

No backwareds compatibility is provided, as this would be complicated, and
probably this feature was not used much in the past few years.

This node was supported in Cycles only, not by EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/140292
2025-06-16 12:06:02 +02:00
Pratik Borhade
8530e7c39b UI: Resize limit to tree view
It is possible to resize tree view too much that only one row is
visible. To add the resize limit, clamp rows value in `tot_visible_row_count`,
that way visible rows are restricted when building the UI inside
`build_from_tree`. Limit is set to 4 (see `MIN_ROWS`).

Pull Request: https://projects.blender.org/blender/blender/pulls/140184
2025-06-16 11:36:19 +02:00
Clément Foucault
d6f9414c27 Fix #140367: EEVEE: Materials with special characters fail to compile
These `CREATE_INFO_` guards are not yet used.
Still have special case for materials.
2025-06-16 11:28:04 +02:00
Aras Pranckevicius
05185c65dc Merge branch 'blender-v4.5-release' 2025-06-16 12:14:01 +03:00
Aras Pranckevicius
81a1993614 Fix #140427: VSE crash with scene strips and prefetch on
Other call sites were guarding against null prefetch job, one was not
2025-06-16 12:13:14 +03:00