Commit Graph

154613 Commits

Author SHA1 Message Date
Jacques Lucke
9d20c8d3c8 Spreadsheet: show volume grid stats
This adds support for showing various stats of volume grids in the spreadsheet:
* Extent: Number of voxels in each direction of the bounding box of the grid.
* Voxels: Total number of active voxels in the grid. This includes all voxels
  which are stored in tiles (e.g. one leaf tile contains 512 voxels).
* Leaf Voxels: Number of active voxels stored in leaf nodes. This does not
  contain any voxels that are part of tiles.
* Tiles: Number of active tiles in the grid.
* Size: Estimated size of the volume grid in memory.

All these stats are cached on the volume grid now. A new `tag_tree_changed`
method has been added to invalidate the cache. Computing these stats is not
cheap (but not more than a few ms even for large grids). That mainly means that
we can't do it for socket inspection because that would cause too much overhead.
However, doing it just for the grids that are currently visible in the
spreadsheet seems fine and useful.

This also adds some general improvements to the spreadsheet:
* Support `int64_t` and `int3` columns.
* Draw ints with thousand separators.
* Support showing ints as number of bytes such as `23 MB`.

Pull Request: https://projects.blender.org/blender/blender/pulls/147191
2025-10-02 13:50:25 +02:00
Hans Goudey
4339a60f78 Geometry Nodes: Add volume grid name search
Very similar to the layer name search added somewhat recently.
This just displays the names of existing grids in the "Name"
inputs to the Store and Get Named Grid nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147163
2025-10-02 13:46:12 +02:00
Pratik Borhade
a48bb36588 Fix #147098: No Default Import method being set on new asset library path
`append and reuse` is chosen as default in DNA but this enumpropertyitem
isn't added to the array when `Non data block packing` is disabled in
Developer tools (see `rna_preference_asset_libray_import_method_itemf`).
To fix this, change default in DNA to `ASSET_IMPORT_PACK`. In case of
"non packing", change import_method inside `asset_library_add()`
function. Also introduce `rna_preference_asset_libray_import_method_default`
so that "reset to default value" operator works correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/147104
2025-10-02 13:27:13 +02:00
Jacques Lucke
b9b52472f3 Fix: Geometry Nodes: wrong socket shapes in bake node 2025-10-02 13:10:05 +02:00
Bastien Montagne
ccd16d3372 Fix #147162: Curves Sculpt: Invalid library for 'BRComb'.
Basic mistake in new 'split main' handling that lead to generting
invalid indices for some libraries in some cases.
2025-10-02 12:51:30 +02:00
Jeroen Bakker
b2eaf812b1 Fix: Vulkan: Validation error on Qualcomm
!146956 introduced buffer streaming and is used to improve the
performance of text rendering. However the solution didn't check the
minimum allowed offset for storage buffers.

This PR will use the correct offset. This was only visible on Qualcomm
devices as other systems don't limit this offset.

Detected when looking into: #147023

Pull Request: https://projects.blender.org/blender/blender/pulls/147192
2025-10-02 12:47:24 +02:00
Sybren A. Stüvel
0547d2970f Anim: fix stack-use-after-scope error
Remove the unnecessary construction of a `std::string` to resolve a
stack-use-after-scope error.

Pull Request: https://projects.blender.org/blender/blender/pulls/147186
2025-10-02 12:34:54 +02:00
Pablo Vazquez
17e82ff030 Compositor: UI: Inline sockets
Where possible, inline sockets when the input and output are both the
image or the same value just transformed.

Even though it may make sense, do not apply this change in cases where
the image is the same when a factor is set to "0". For example the
Alpha Over node, where the "Background" matches the "Image" output if
factor is 0. Or the Mix node's "A" and "Image".

Also hide the value (usually a full white color input widget).

It makes for a more compact UI, less noise, and it matches a similar
layout in Geometry Nodes.

See PR for screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/147143
2025-10-02 12:04:27 +02:00
Sybren A. Stüvel
e077c189ec Refactor: Action unit tests, replace deprecated self.assertEquals() call
In the Action unit tests, replace the calls to the deprecated
`self.assertEquals()` function with `self.assertEqual()`.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147185
2025-10-02 11:41:38 +02:00
Habib Gahbiche
5e0b244066 Nodes: Unify add menus
The general idea is to order all menus as:
```
Common categories
(e.g. Input/output)
---
Specific categories
---
Assets
--
Common categories
(e.g. Group/Layout)
```

## Changes:
### Compositor
- Removed Color/Mix submenu
- Moved Vector to Utilities
- New Category: "Creative". This is where most new assets will fit in.
- Moved to Creative:
	- Kuwahara
    - Pixelate
    - Posterize

### Geo Nodes
- Moved 'Vector' to 'Utilities'
- Moved 'Attribute' before 'Geometry'
- Moved 'Material' to 'Geometry'
- Moved 'Color' to top level, grouped with Utilities

### Shader
- Moved 'Vector' to 'Utilities'
- Deleted 'Converter'
- New 'Displacement' menu
- Grouped 'Color' with Utilities (remains top level)

Ref: https://devtalk.blender.org/t/2025-09-05-design-session-node-groups-different-editors/42244
Pull Request: https://projects.blender.org/blender/blender/pulls/146806
2025-10-02 11:07:25 +02:00
Sean Kim
05a3072e7b Cleanup: UI: Remove duplicate Grease Pencil vertex paint code
Pull Request: https://projects.blender.org/blender/blender/pulls/147096
2025-10-02 10:54:55 +02:00
Sybren A. Stüvel
6c011cfed8 IO: update FBX im-/exporter to use the current Action API
Use the current Action API (i.e. move away from the to-be-deleted-in-5.0
one) to import and export F-Curves from/to FBX files.

There is a slight difference in functionality for the exporter, in the
selection of which Actions to export for the "All Actions" option. This
is just a minimal change to ensure the legacy API is no longer used.

Old: `action.fcurves` was iterated, and if all FCurves could resolve to
existing properties, the Action was exported. This would only work
reliably for single-slotted Actions, due to the use of the deprecated
`action.fcurves` property.

New: the above check is done for each Channelbag in the Action. The
first Channelbag that match the above check is exported. This does _not_
export all suitable channelbags; it merely improves on the old behaviour
slightly.

This is part of #146586

Pull Request: https://projects.blender.org/blender/blender/pulls/146980
2025-10-02 10:25:50 +02:00
Simon Thommes
1aaa540763 Essentials Assets: Duplicate Separate/Combine Cylindrical/Spherical assets for shading and compositing
- Adjust asset file structure.
- Fix radius output in `Separate Cylindrical` node-group.
- Add Separate/Combine Cylindrical/Spherical assets for shading and compositing nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147181
2025-10-02 09:53:29 +02:00
Christoph Lendenfeld
2ae953d7f5 UI: remove the Timeline
This adds versioning code that replaces any timeline with a
dopesheet where the footer is shown, AND it removes the
timeline from the menu options.

If the area is too small to show both, the footer and the
header then only the footer is shown.
This assumes that users created the small timeline
just for the playback controls

Any uses of `SACTCONT_TIMELINE` (except for versioning) have been removed.

part of #145577

Pull Request: https://projects.blender.org/blender/blender/pulls/147058
2025-10-02 09:44:53 +02:00
Philipp Oeser
116efa1b32 Fix #147120: UI: Status bar precision mode for Integer input fields
`ui_numedit_but_NUM` only uses the "reduced" `fac` from `ui_do_but_NUM`
in case the button is a float button.
So to clarify that in the UI, dont display the "Precision" in the
Statusbar for Interger buttons.

Pull Request: https://projects.blender.org/blender/blender/pulls/147125
2025-10-02 09:38:05 +02:00
Campbell Barton
bbaf626abb Fix: crash showing depsgraph items in the outliner
Part of a fix for #145877 which exposed multiple crashes in the
outliner.

Hide depsgraph collections that are dynamically allocated,
causing access to freed memory form the outliner.

Ref !145955
2025-10-02 15:09:51 +10:00
Oxicid
44d04ad857 PyAPI: add mathutils.geometry.intersect_point_line_segment function
Add a *_line_segment equivalent of the *_line function,
which clamps to the end-points.

Ref !146490
2025-10-02 11:53:02 +10:00
Oxicid
9f45b479fd PyAPI: use METH_FASTCALL to improve performance for intersect_point_line
Use METH_FASTCALL to improve performance by about 1.3x,
useful as this function may be used on large datasets.

Ref !146490
2025-10-02 11:52:24 +10:00
Campbell Barton
38e5c875c5 PyDoc: correct doc-string for intersect_point_line & minor cleanup
Apply some minor changes from !146490.
2025-10-02 11:48:19 +10:00
Campbell Barton
c4e4c7f4f1 BLF: disable print for unicode character not being found in the font
This is overly noisy in some cases (such as browsing the file-system)
it can flood the stdout with messages that aren't an error to be fixed.
2025-10-02 09:57:52 +10:00
Sean Kim
0e90d1543e Cleanup: Add helper method for common paint pressure curve flag
Pull Request: https://projects.blender.org/blender/blender/pulls/147089
2025-10-02 01:49:33 +02:00
Campbell Barton
8f548d19c1 Fix: alpha overflow when converted to bytes with SVG icon drawing
The SVG icon outline could be over 1.0 when hovering over icons in the
outliner. This was converted to bytes and set FontBLF::shadow_color[3]
which overflowed the byte range.

Clamp the alpha before passing to BLF SVG drawing.
2025-10-02 09:46:28 +10:00
Campbell Barton
a941108804 Cleanup: defer loading anim_utils (previous wm.py commit wasn't enough) 2025-10-02 09:27:16 +10:00
Campbell Barton
b78c5fadf3 Cleanup: various non functional changes for C++ 2025-10-01 23:22:44 +00:00
Campbell Barton
8269e17186 Cleanup: defer import of anim_utils 2025-10-01 23:22:43 +00:00
Campbell Barton
df5366f596 Cleanup: spelling, duplicate terms 2025-10-01 23:22:42 +00:00
Campbell Barton
b938800ba6 Cleanup: sort cmake file lists 2025-10-01 23:22:41 +00:00
Campbell Barton
60f8d625a4 Fix #147155: Crash opening a blend file
Workaround regression in [0] which crashed opening files & on startup
in some cases.

[0]: dde9d21b91
2025-10-02 09:17:52 +10:00
Philipp Oeser
264231e66a Fix #147082: Snap to extruded curve fails in X-Ray with edit-mode source
This is because `snap_obj_fn` checks `SnapObjectParams` `edit_mode_type`
for not being `SNAP_GEOM_FINAL` even if the curve is not in editmode.

Probably an oversight in [0] which changed this for
`nearest_world_object_fn` and `raycast_obj_fn` (but not `snap_obj_fn`).

The reason it worked in non-XRay-shading mode is that another codepath
is taken then (`raycastObjects` instead of `snapObjectsRay` where this
is not an issue -- the then used `raycast_obj_fn` had the correct check
already, see above).

[0]: ab3e470b35

Ref 147121
2025-10-02 07:49:16 +10:00
Campbell Barton
3165ab2933 Cleanup: duplicate field warning, trailing space 2025-10-02 07:49:07 +10:00
Campbell Barton
74a7cd4d41 Build: unbreak building WITH_OPENVDB=OFF 2025-10-01 21:45:21 +00:00
hogan.mastanduno
dde9d21b91 OpenXR: VR Advanced Locomotion Phase 1
Includes the following changes to the existing Locomotion system for VR Scene Inspection:
 * new VR Navigation Preferences and VR Session Settings
 * changes to XR raycast logic and its visualization
 * new XR vignette that appears when moving
 * snap turning

Pull Request: https://projects.blender.org/blender/blender/pulls/144241
2025-10-01 22:16:12 +02:00
Pablo Vazquez
1df4a09539 Fix #146262: Transform constraints shown when overlays off
The check to draw transform constraints was returning too early and
skipping the later check for the `V3D_HIDE_OVERLAYS` flag.

This meant that transform constraints (e.g. when moving over X axis)
were always shown even when all overlays were turned off, which can
be very distracting.

Fix it by switching the check, so it returns false if the region is
not the same, but continues happily if it is.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/147132
2025-10-01 21:42:34 +02:00
Sean Kim
623bf30e4c Fix #132016: UV Sculpt crash with bad tool data
For a period of time during 4.2~4.3, the `UvSculpt` settings could have
been in an invalid state. This commit reapplies the same versioning to
prevent odd behavior and removes the old versioning code.

Pull Request: https://projects.blender.org/blender/blender/pulls/147075
2025-10-01 19:21:00 +02:00
Hans Goudey
a774ebd5af Geometry Nodes: Field to Grid Node
The purpose of this node is to create a grid with new voxel values on
the same grid topology as an existing grid. The new values are the
result of field evaluation. Multiple grids can be created at the same
time, so that intermediate results used for multiple grids can be
efficiently reused during evaluation. This is more efficient than the
"Volume Cube" node, for instance, because the output grid shares the
sparseness of the input topology grid.

Pull Request: https://projects.blender.org/blender/blender/pulls/147074
2025-10-01 18:40:49 +02:00
Bastien Montagne
ead0af6ef7 Fix #146995: Liboverride: Add support for LightLinking data.
Collection side is trivial, Object one is a bit more intricate, as
its LightLinking data behave similar to AnimData of IDs, which requires
a custom liboverride `apply` callback.

Pull Request: https://projects.blender.org/blender/blender/pulls/147039
2025-10-01 18:11:19 +02:00
Sean Kim
9f755b6b01 Cleanup: Remove unused icon keyword argument
This value was never passed in and effectively hardcoded to `'NONE'`

Pull Request: https://projects.blender.org/blender/blender/pulls/147093
2025-10-01 18:08:35 +02:00
Miguel Pozo
44c87179a9 Draw: Re-enable Handle Ranges optimizations
Re-enable the optimizations from #140378, which were reverted in
f8303efd57 until I could fix the
regressions.

Disable handle ranges for bounding boxes.
Take into account DupliObject and parent Object overrides in
`supports_handle_ranges`.

Fix #145446
Fix #145420

Pull Request: https://projects.blender.org/blender/blender/pulls/147069
2025-10-01 17:50:33 +02:00
Simon Thommes
7ad5d04aeb Geometry Nodes: Update bundles hair nodes assets for Blender 5.0
Several adjustments to the hair nodes assets for Blender 5.0.
This mainly affects the user interface rather than their inner workings.

Pull Request: https://projects.blender.org/blender/blender/pulls/147135
2025-10-01 17:20:53 +02:00
Hans Goudey
4aae4a983a Tests: Add another mesh join test for recent report
Add a test for the case where the active mesh doesn't yet
have shape keys #147097.

Pull Request: https://projects.blender.org/blender/blender/pulls/147126
2025-10-01 16:45:02 +02:00
Lukas Tönne
059ac46439 Fix #147129: Crash when using zone pointer without null check
The zone add operator necessarily has to add the input and output nodes
separately one at a time. After the first node is added a tree update is
executed, but the zone is incomplete and the runtime update will temporarily
remove all zones until the second node is added. Using zone lookup without
checking the pointer will crash in this state.

Pull Request: https://projects.blender.org/blender/blender/pulls/147131
2025-10-01 16:44:40 +02:00
Hans Goudey
6087a8b4a4 Fix #147119: Auto smooth modifier detection broken with packing
The check for the essentials node group needs to be updated
to look into the library for node group that's now linked instead
of appended. Also fix missing redraws in the node editor with
a more specific notifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/147130
2025-10-01 16:38:52 +02:00
Bastien Montagne
ee9d7fc9a3 Fix missing libraries reported as older than 2.50 data.
Missing libraries have no version info, but by definition their data
(placeholder IDs) always match current Blender version.
2025-10-01 16:28:09 +02:00
Brecht Van Lommel
7f94df2926 Tests: Block failing object_dicing test on OptiX OSL
This does not support wireframe yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/147124
2025-10-01 16:23:38 +02:00
Simon Thommes
43fbbc95bc Modifiers: Add icons to remaining modifier assets in Generate category
This adds new icons for the remaining two modifier Essentials assets
bundled with Blender in the `Generate` category.
(`Curve to Tube` and `Scatter on Surface`)

Pull Request: https://projects.blender.org/blender/blender/pulls/147115
2025-10-01 15:50:34 +02:00
Sergey Sharybin
152107590e Fix #147083: Playing then pausing causes instant crash
Ensure that function which requires evaluated depsgraph does get
such a depsgraph.

The BKE_scene_ensure_depsgraph() is not guaranteed to give evaluated
depsgraph, it only ensures that the depsgraph exists for the given
combination of bmain, scene, and view layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/147111
2025-10-01 15:30:28 +02:00
YimingWu
63d77f028f Fix #147097: Prevent crash when joining meshes with different shape keys
In 113d91aba8 the mesh joining operator is
largely rewritten but the `join_positions_and_shape_keys` part didn't
supply valid `bmain` and `id` for `BKE_key_add` which leads to crash.
Now fixed by supplying correct arguments.

Pull Request: https://projects.blender.org/blender/blender/pulls/147101
2025-10-01 15:17:47 +02:00
Bastien Montagne
ada45519a7 Fix #146221: Concurrent access to IDPropertyGroup in liboverride code.
Crash seems to happen due to parallelized access of data in liboverride
diffing code (presumably when a same linked data is used as reference
for several local liboverrides?).

Since there is zero reason to actually create IDGroup properties there
(it's actually fairly bad, also adding useless overhead and trash data
in system IDProperties), add a new API to access a Pointer PropertyRNA,
`RNA_property_pointer_get_never_create`, which ensures that the call
never creates data, and simply returns `PointerRNA_NULL` instead.

Also reverts abd683fcb5 and re-enable liboverride unittests.

NOTE: This only addresses the case from the report, the current behavior
of `RNA_property_pointer_get` is simply wrong and needs to be rethought.
This is not a simple change though most likely. See also #147072.

Pull Request: https://projects.blender.org/blender/blender/pulls/146990
2025-10-01 15:14:28 +02:00
илья _
8edf746621 Fix: Geometry Nodes: Wrong field interface of topology node
This socket is not optional field but a source of only a field with input dependency.

Pull Request: https://projects.blender.org/blender/blender/pulls/146540
2025-10-01 15:10:13 +02:00
Habib Gahbiche
fb7818e55e Python: Create default node tree for new materials and worlds
The motivation is to keep backward compatibility after deprecating
 `material.use_nodes()` and `world.use_nodes`. For example the
following script would behave the same way in 4.5 and 5.0:
```python
mat = bpy.data.materials.new("My new mat")
mat.use_nodes = True
```

Pull Request: https://projects.blender.org/blender/blender/pulls/147052
2025-10-01 15:05:16 +02:00