Commit Graph

120693 Commits

Author SHA1 Message Date
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
Sean Kim
716653d22b Cleanup: Use blender::Array instead of raw pointer for PolyCornerIndex
Changes `MultiresDisplacementData` to use a `blender::Array` instead of
a manually allocated pointer to allow for using `Span`s and avoid
further manual memory management.

Note that `MultiresDisplacementData` is already handled via C++ style
`new` & `delete` and does not need to be converted as a prerequisite.

Pull Request: https://projects.blender.org/blender/blender/pulls/140328
2025-06-16 00:56:12 +02:00
Sean Kim
23cc842319 Cleanup: C++ changes for subdiv_displacement_multires.cc
* Uses references where possible
* Adds const where appropriate

This commit only modifies the internal methods, and does not touch any
of the function signatures or areas that interface with other parts of
the codebase.

Pull Request: https://projects.blender.org/blender/blender/pulls/140326
2025-06-15 23:09:18 +02:00
YimingWu
ab4f5ef5f2 Fix #140161: UI: Use theme wireframe color by default
In Geometry Nodes workspace, the viewport didn't have wireframe color
type set to a valid value, now set default value to theme color for all
viewports.

Pull Request: https://projects.blender.org/blender/blender/pulls/140172
2025-06-15 12:54:10 +02:00
YimingWu
6756982f07 Fix #139873: Grease Pencil: Auto normalization on assign/remove operator
Auto normalization used to not work on assign/remove vertex group
operator, this was due to `BKE_object_defgroup_validmap_get` and
`vgroup_parray_alloc` did not handle grease pencil type objects. Now
added grease pencil cases in them and auto normalization works as
expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/139912
2025-06-15 12:50:13 +02:00
Pratik Borhade
f9e7769f7f UI: Use selected text theme of list item for tree view
If view items button is active, call `ui_layout_list_set_labels_active` to
set the `SELECT` flag on label button. Due to this flag being set, text_sel theme
color is copied to `wcol.text` (see `UI_SELECT` condition in `widget_state()`).
This `wcol.text` is later used inside `widget_draw_text()` for text color.

Pull Request: https://projects.blender.org/blender/blender/pulls/140330
2025-06-15 12:07:22 +02:00
Campbell Barton
e0f075fc35 Merge branch 'blender-v4.5-release' 2025-06-15 19:15:47 +10:00
Campbell Barton
bd3a66a416 Fix #140396: bmesh.ops.dissolve_edges fails to dissolve vertices
Support flagging BMesh operator slots as being used so it's possible
to use a non-zero fallback value for the edge-dissolve angle threshold.
2025-06-15 19:12:50 +10:00
Richard Antalik
1fbd83f72e Fix: VSE function has inverted logic
`seq_need_scale_to_render_size` returned true, when scaling was not
needed. The code that used this function worked correctly, so the logic
was inverted in both places.
2025-06-15 06:49:46 +02:00
Aras Pranckevicius
d9ef240311 Merge branch 'blender-v4.5-release' 2025-06-14 22:15:36 +03:00
Aras Pranckevicius
074fcfe1a5 Fix #138834: FBX importer sets pivots incorrectly in some cases
Fix the rest of #138834, pivot adjustment was not done
when rotation pivot and scaling pivot inside FBX were not matching.

Pull Request: https://projects.blender.org/blender/blender/pulls/140411
2025-06-14 21:14:27 +02:00
Aras Pranckevicius
6251f7f0b0 Fix #140336: VSE scene strips with sequencer in them are not playing
The intra-frame cache was not notified of the current frame number
when rendering VSE through a scene strip.
2025-06-14 21:11:54 +03:00
Campbell Barton
7ae8e18f0b Cleanup: rename preferences for NDOF sensitivity
Clarify the terms for NDOF translation & rotation sensitivity.
Previously translation was named: "ndof_sensitivity" making it
sound like it would control rotation as well.
2025-06-14 16:35:51 +10:00
Campbell Barton
bb9d491ca5 Merge branch 'blender-v4.5-release' 2025-06-14 16:02:07 +10:00
Campbell Barton
fb3b1043d3 Cleanup: spelling in comments (make check_spelling_*) 2025-06-14 16:01:04 +10:00