Commit Graph

120707 Commits

Author SHA1 Message Date
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
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
Clément Foucault
0b5b1932a0 Merge branch 'blender-v4.5-release' 2025-06-16 11:02:55 +02:00
Clément Foucault
7da81b5f39 Fix #140450: Vulkan: profile.json files appears in home directory
Was caused by the shader compilation profiling not checking
for the profiler being enabled.
2025-06-16 11:02:18 +02:00
Clément Foucault
5096632b83 Cleanup: GPU: Remove or fix tautoligical asserts 2025-06-16 10:59:48 +02:00
Mohamed Hassan
0a4b92678c Compositor: Improve Glare quality option
This patch enhances the quality setting of the Glare node. Previously,
Medium and Low quality were implemented using a single tap interpolation
downsampling filter, which means small highlights that only span a small
number of pixels could be missed during downsampling, and that might
change across frames, causing flickering.

To fix this, we use a higher quality downsampling filter that averages
the entire 2x2 or 4x4 pixel blocks for the Medium and Low quality
settings respectively.

The upsampling pass also needs to be improved to avoid offsets, but this
will be implemented separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/140237
2025-06-16 10:38:40 +02:00
илья _
2818424102 Fix #139936: Geometry Nodes: background of Volume Grid is lost after math node
We have to execute math node both for real Grid tree nodes and for background
values. So internal logic of sharing background values will work in case such
values are used by some nodes.

A field input is evaluated on a tile with maximum bounds to get the background
value.

Pull Request: https://projects.blender.org/blender/blender/pulls/140410
2025-06-16 08:38:40 +02:00
Omar Emara
498a2e5bcd Compositor: Remove deprecated compositor properties
This patch removes the properties that were marked as deprecated in the
4.x series and was planned for removal in 5.0. Some DNA members were
marked as deprecated or removed in correspondence with this change.

Pull Request: https://projects.blender.org/blender/blender/pulls/140355
2025-06-16 08:12:26 +02:00
Omar Emara
ed86b1fcf7 Merge branch 'blender-v4.5-release' 2025-06-16 09:09:14 +03:00
Omar Emara
976efdcac9 Compositor: Remove storage of Alpha Over node
This patch removes the storage of the Alpha Over node, since it is no
longer used. This is a continuation of b62ef2cdd6.

Pull Request: https://projects.blender.org/blender/blender/pulls/140359
2025-06-16 08:07:21 +02:00
Jacques Lucke
59a759b98d BLO: enable new file format by default
This enables the new .blend file format as described in #129309 and implemented
in 6a90382390 by default. This allows storing
blocks larger then 2GB inside the file. This is a necessary requirement to be
able to store e.g. meshes with more than a few hundred million vertices.

There is a new debug option that can be used to force Blender to write the older
file format. This is especially useful when using tools that have not been
updated to be able to read the new format yet.

Compatibility:
* Blender 4.5 is able to read the new format for a few months already, so 4.5
  LTS will be able to read these files
  (6a90382390).
* The internal `blendfile.py` which is used by `blend2json.py` has been updated
  (d83bfee347).
* blender-asset-tracer (BAT) has been updated
  (blender/blender-asset-tracer@f1ee7980b2).
* `blend_render_info.py` will be updated soon (#140341).

Pull Request: https://projects.blender.org/blender/blender/pulls/140343
2025-06-16 07:46:05 +02:00
илья _
3a8655a12b Fix: Geometry Nodes: corrupted grid after math node
There is the use-after-free of the tile value on the stack.

Pull Request: https://projects.blender.org/blender/blender/pulls/140405
2025-06-16 07:17:18 +02:00
Jacques Lucke
71a4c04426 Fix: update after uilayout refactors 2025-06-16 06:56:56 +02:00
Jacques Lucke
9894c4d8e1 Merge branch 'blender-v4.5-release' 2025-06-16 06:32:04 +02:00
Jacques Lucke
0937051d52 Fix: Nodes: bad user counting when creating node group
The newly created node tree already has one initial user
when it is created. So the user count does not have to be
increased when it's first assigned.
2025-06-16 06:31:21 +02:00
Pratik Borhade
a93ab6446d Merge branch 'blender-v4.5-release' 2025-06-16 09:57:57 +05:30
Guillermo Venegas
a8fdecc0a8 Fix: IO: FBX General import settings layout can't be re-enable
The `General` settings layout can be disabled by unchecking `use_custom_props`,
an since this button button is within this layout it can't be activated back.

NOTE: See that the button can be activated back if the checkbox is still
hovered after being unchecked, if the mouse moves out it can't be enabled back.

Pull Request: https://projects.blender.org/blender/blender/pulls/140228
2025-06-16 06:26:27 +02:00
Sean Kim
005ce385d4 Cleanup: Add missing explicit dependency on header
All of the modified files were  pulling in `BLI_math_vector.h` via
`BLI_multires.hh` and subsequently `multires_inline.hh`

Pull Request: https://projects.blender.org/blender/blender/pulls/140441
2025-06-16 01:00:29 +02:00