Commit Graph

123490 Commits

Author SHA1 Message Date
Brady Johnston
4a56973fe7 Geometry Nodes: Set Grid Transform
Explicitly set the transform of a grid.

The new transform can fail to be applied if the input transform isn't
invertible or for some extremes of scaling (0 or combinations of
negative and positive) and numerical errors with `openvdb`. If a
transform is not applied an error is raised and the `Is Valid`
returns false.

Pull Request: https://projects.blender.org/blender/blender/pulls/146824
2025-10-02 19:12:39 +02:00
Hans Goudey
a68d39e9d9 Cleanup: Formatting
Run `make format` after the library update in the previous commit.
2025-10-02 12:55:42 -04:00
Thomas Dinges
66224d69b0 Deps: Library changes for Blender 5.0
This commit includes the changes to the build system, updated hashes to the actual new libraries as well as a required test update.

* DPC++ 6.2.0 RC
* freetype 2.13.3
* HIP 6.4.5010
* IGC 2.16.0
* ISPC 1.28.0
* libharu  2.4.5
* libpng 1.6.50
* libvpx 1.15.2
* libxml2 2.14.5
* LLVM 20.1.8
* Manifold 3.2.1
* MaterialX 1.39.3
* OpenColorIO 2.4.2
* openexr 3.3.5
* OpenImageIO 3.0.9.1
* openjpeg 2.5.3
* OpenShadingLanguage 1.14.7.0
* openssl 3.5.2
* Python 3.11.13
* Rubber Band 4.0.0
* ShaderC 2025.3
* sqlite 3.50.4
* USD 25.08
* Wayland 1.24.0

Ref #138940

Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Co-authored-by: Kace <lakacey03@gmail.com>
Co-authored-by: Sebastian Parborg <sebastian@blender.org>
Co-authored-by: Anthony Roberts <anthony.roberts@linaro.org>
Co-authored-by: Jonas Holzman <jonas@holzman.fr>

Pull Request: https://projects.blender.org/blender/blender/pulls/144479
2025-10-02 18:34:11 +02:00
Jacques Lucke
61cc3af675 Fix #147219: field in bundle is lost when geometry
This was an issue with creatiung the correct `reference_relations` between
input and output sockets. Those are necessary for the automatic lifetime inferencing.
2025-10-02 17:51:11 +02:00
Pablo Vazquez
28280aaeeb Nodes: UI: Center Define Signature in Bundle nodes
Center "Define Signature" in Combine/Separate Bundle nodes,
to match others.

Pull Request: https://projects.blender.org/blender/blender/pulls/147222
2025-10-02 17:50:06 +02:00
Brecht Van Lommel
be61366801 Nodes: Show node editor context path also without a node tree
This provides context for where the node tree will be added when clicking New.

Ref #139634

Pull Request: https://projects.blender.org/blender/blender/pulls/146852
2025-10-02 17:39:30 +02:00
Jesse Yurkovich
b1045fb1fe Fix: Adjust adaptive subdivision versioning to set defaults in all cases
When an old file that uses regular subdivision is loaded, the adapative
settings were not applied to the existing modifiers if they weren't
already using adaptive subdivision. This results in the settings
remaining at their 0 defaults which can be surprising. E.g. the
`dicing_rate` of 0 is clamped to 0.1px which is probably not intended.

Make sure to set the correct defaults in all cases now.

Pull Request: https://projects.blender.org/blender/blender/pulls/147164
2025-10-02 17:20:54 +02:00
Brecht Van Lommel
e238970bd9 Color Management: Update for new extended sRGB naming conventions in OCIO
Recognize srgbe_ prefix for interop ID, and edr-video encoding as HDR.

Pull Request: https://projects.blender.org/blender/blender/pulls/147205
2025-10-02 17:20:35 +02:00
Hans Goudey
946b3498b3 Fix: Build error with OpenVDB disabled 2025-10-02 11:18:36 -04:00
Christoph Lendenfeld
50748d3099 Fix #146105: Missing depsgraph update for "Clear Keyframes"
The issue was that the "Clear Keyframes" operator was missing call
to notify the dependency graph, and thus objects were still animated
even though the keyframes were deleted.

Pull Request: https://projects.blender.org/blender/blender/pulls/147216
2025-10-02 17:12:35 +02:00
Sebastian Parborg
df7273930f PyAPI: Add "path_from_module" function to get full bpy path to structs and props
This is to make it easy to get the bpy paths to bpy.context.property for
example. Before this change, the easiest way was to use the clipboard
bpy.ops function. However this would make the python scripts using this
fragile as it we do not have full control of what is stored in the
system clipboard.

Pull Request: https://projects.blender.org/blender/blender/pulls/147116
2025-10-02 17:05:43 +02:00
Pablo Vazquez
526f46d2c3 UI: Icons: Add icon for Sequencer Strip Modifier
Add a new icon for Sequencer strip modifiers.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/147208
2025-10-02 16:49:05 +02:00
Brady Johnston
0a77a57c4e Geometry Nodes: Add OpenVDB grid operators
Adds four new grid operator nodes that wrap OpenVDB's differential
operators. All nodes take a grid input and output a grid, potentially
with a different data type.

New nodes:
- Grid Curl: Calculate curl of vector field (Vec3 → Vec3)
- Grid Divergence: Calculate divergence of vector field (Vec3 → Float)
- Grid Gradient: Calculate gradient of scalar field (Float → Vec3)
- Grid Laplacian: Calculate Laplacian of scalar field (Float → Float)

These operators enable vector calculus operations on volume grids for
effects like flow analysis, vortex detection, etc.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146845
2025-10-02 16:28:46 +02:00
Bastien Montagne
fdfbb3ad20 Fix (unreported) memleak in IDHash when computing the hash fails.
Code would early-return on failure, forgetting to free the xxhash state.

Use the `BLI_SCOPED_DEFER` util to ensure the state is always properly freed
when it gets out of scope.

Pull Request: https://projects.blender.org/blender/blender/pulls/147189
2025-10-02 16:26:03 +02:00
Bastien Montagne
289e5ef0b7 Fix #147057: Crash when Asset Library Pack-Importing a Missing Data Block.
Do not delete linked data if the packing fails.

Pull Request: https://projects.blender.org/blender/blender/pulls/147190
2025-10-02 16:20:08 +02:00
илья _
d4e254a552 Cleanup: Manifold Boolean: Change order of mesh construction
This patch swap position attribute initialization and edge construction
of boolean result. Logic is what both of these steps are last, all
future code do not build mesh topology but only maintain user
attributes. So at this point mesh already must be valid. But future
change of edge calculation (#132492) code will requer this mesh
validation to be done as part of the step. So when edges will be
calculated mesh must already be built, valid and contains position
attribute.

Pull Request: https://projects.blender.org/blender/blender/pulls/146229
2025-10-02 15:14:32 +02:00
Philipp Oeser
bb3f0f5401 Fix #147182: Duplicating workspace sequencer_scene based on window scene
1122a05cb6 made it so that a new scene was based off of the window
scene, now changed to the workspace sequencer_scene (if we have one,
otherwise fallback to the window scene).

Pull Request: https://projects.blender.org/blender/blender/pulls/147187
2025-10-02 15:07:32 +02:00
Aras Pranckevicius
e4b4e7c308 Fix: Anim: Time display text labels drawn over one another
Regression in e65524382, where what should have been essentially
(window_width / text_width) became (window_width + 1/text_width)
which is not the same at all! What the code was trying to do is
((window_width + 1) / text_width)

Most easily visible in VSE template because it defaults to
MM:SS+FRAME display format, but could be seen in other
animation related windows.

Pull Request: https://projects.blender.org/blender/blender/pulls/147198
2025-10-02 14:22:05 +02:00
Hans Goudey
9b0f27d98a Cleanup: Use socket runtime declaration pointer
Rather than finding the socket's index in the linked list.
2025-10-02 08:16:56 -04:00
Casey Bianco-Davis
29124398a4 Fix: Grease Pencil: Pen tool memory leak
This fixes a memory leak that could occur with the
Grease Pencil Pen Tool. If the Pen Tool exited during
the initialization the `GreasePencilPenToolOperation`
object would not be deleted. The Pen Tool could end
in initialization if the `Selection Mode` was not `Points`

This problem only effected Grease Pencil, because
the `Curves` Object code properly exited.

Pull Request: https://projects.blender.org/blender/blender/pulls/147170
2025-10-02 13:57:37 +02:00
Campbell Barton
88cbc71533 Build: unbreak WITH_OPENVDB=OFF 2025-10-02 21:51:23 +10:00
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
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
b78c5fadf3 Cleanup: various non functional changes for C++ 2025-10-01 23:22:44 +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
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
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