Commit Graph

123163 Commits

Author SHA1 Message Date
Jesse Yurkovich
12cdfb5856 Image: Log errors during image write when using OpenImageIO
Before this change, any accumulated errors from OpenImageIO would be
lost and a nonsensical use of `errno` would be used instead.

An example of the new error log:
```
00:23.188  image.write      | ERROR OpenImageIO write failed: sgi image resolution may not exceed 65535x65535, you asked for 65536x1
```

Pull Request: https://projects.blender.org/blender/blender/pulls/146554
2025-09-22 20:26:55 +02:00
Casey Bianco-Davis
0c3f633024 Fix #146510: Pen tool not working with Auto Keying
The problem was that the `Pen Tool` would not add keyframes when Auto
Keying was enabled.

This also fixes a crash that could happen when auto keying was enabled
and no keyframe existed.

Pull Request: https://projects.blender.org/blender/blender/pulls/146549
2025-09-22 19:34:00 +02:00
Brecht Van Lommel
c857c9d4f5 Refactor: Move video CICP logic to be reusable for images
Ref #145612

Pull Request: https://projects.blender.org/blender/blender/pulls/146606
2025-09-22 19:20:42 +02:00
Brecht Van Lommel
f8e03daf37 Fix: Generated image checkboard colors too saturated with working space
Convert from Rec.709 to scene linear when generating these, to
match results in the default working space.

Pull Request: https://projects.blender.org/blender/blender/pulls/146603
2025-09-22 19:06:32 +02:00
Falk David
9aba62667a Fix: VSE: Missing updates when active scene differs from sequencer scene
This was caused by the fact that the sequencer scenes depsgraph was not
active.
There was no reason to not make it active, the original
PR (!140271) just missed this.

The issue became more apparent with !139634.

Pull Request: https://projects.blender.org/blender/blender/pulls/146605
2025-09-22 18:57:04 +02:00
Jacques Lucke
5ffc5df4f6 Geometry Nodes: support viewing non-geometry data with viewer node
As discussed in the last geometry nodes workshop, the viewer node now
needs the flexibility to handle new features: bundles, closures, and
lists. This PR takes the opportunity to add support for an arbitrary
number of items. Values are displayed directly in the node are all
displayed in the spreadsheet, where a new tree view allows selecting
which data to view, including nested bundles. Lists, single values,
bundle items, and closure signatures are all visualized in the spreadsheet.

We also prioritize the existing viewer behavior that views a geometry
together with a field, so various special cases are added in the viewer
activation to handle this.

Bundle hierarchies are displayed in the new tree view in the spreadsheet
sidebar. The spreadsheet itself just displays bundle identifiers, types,
and the contained values. Design wise, there might be more integrated
ways to present that hierarchy, but doing it in the tree view is a very
simple starting place.

Interactively added viewer node inputs are now removed automatically
if the link is removed. There is a new "Auto Remove" flag for each input
controlling this behavior. It can't be enabled for all inputs all the time
because then one couldn't e.g. setup the viewer node properly using
a script (which might add a few inputs first and then creates links).
Also when viewer items are added with the plus icon in the sidebar,
they are not automatically removed immediately.

https://code.blender.org/2025/07/geometry-nodes-workshop-july-2025/#view-any-data

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/144050
2025-09-22 18:08:45 +02:00
Bastien Montagne
849aba1ccf Core: Make ID::runtime an allocated pointer.
Will avoid having to reshuffle all ID types' DNA alignement when
modifying runtime data, avoid writing garbage data in blendfile, allow
usage of non-trivial C++ data in that runtime struct, etc.

NOTE: Trigger for this refactor was this commit in the upcoming packed
data PR (!133801):
https://projects.blender.org/blender/blender/commit/34a2ad81fbdcf7f

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146046
2025-09-22 18:02:32 +02:00
Brecht Van Lommel
fdc9412b9d Fix: Appending a workspace appends scene data along with it
This probably got broken when expanding was changed to use foreach ID. In the
old code the screen was not part of expanding.

Also adds the appropriate flags for workspace pinned and sequencer scenes.
This was causing issues in particular with the new video editing template, where
appending a workspace would append the Edit scene.

Fix #146156

Pull Request: https://projects.blender.org/blender/blender/pulls/146164
2025-09-22 17:40:38 +02:00
Dalai Felinto
851e5b55af VSE: Story Tools: Add Scene Strip Menu improvements
- Show unassigned scene assets directly under Assets.
- Use Icons for Assets label.
- Only show "Scenes" when there are Assets.
- Don't show scene assets on the "Scenes" list.

The design about changing the operator default behaviour will be
addressed separately. This patch only changes the UI.

Design ref: #145522
Ref: !146574
2025-09-22 17:19:03 +02:00
Bastien Montagne
4253687a9f Refactor: Use ID management API to delete temp preview render IDs.
`preview_id_copy_free` was trying to do its own version of
`BKE_libblock_free_data`, instead of calling directly that function.

This could easily lead to missing cleanup when modifiying ID management,
and since these IDs are managed by general ID API, there is no reason
not to do the same on destruction.

This is extracted from !146046 'making ID::runtime an allocated struct'.
2025-09-22 17:14:20 +02:00
Pratik Borhade
e6a3328da7 Nodes: UI: Show asset state icon in breadcrumbs
If nodegroup is linked or marked as asset, show different icons in breadcrumbs inside node space.

Note: Packed data-blocks have to be tackled separately since they are not in main yet (!133801).

Ref: !146573
2025-09-22 16:51:53 +02:00
Pratik Borhade
ed6caa5e80 UI: Pointcloud statistics
Show points/selected points of pointcloud in viewport and status bar.

Ref: !146129
2025-09-22 16:49:37 +02:00
Bastien Montagne
a6d2b21f3e Refactor: Minor changes to 'non-allocated' ID copying and related Depsgraph code.
Mainly:
- Move 're-used' ID reset from `BKE_id_copy_in_lib` to lower-level
  `BKE_libblock_copy_in_lib`.
- Remove call to `deg_tag_eval_copy_id` in `IDNode::init_copy_on_write`,
  as this is already done in `deg_expand_eval_copy_datablock` for all
  CoW IDs anyway (both re-used and newly allocated ones).

This is extracted from !146046 'making ID::runtime an allocated struct'.

Pull Request: https://projects.blender.org/blender/blender/pulls/146593
2025-09-22 16:40:38 +02:00
Tenkai Raiko
f8d579d153 Nodes: Add Radial Tiling Node
On its own, the main functionality of the Radial Tiling node
is the ability to divide a 2D Cartesian coordinate system into
as many radial segments as specified by the "Segments" input.
Each segment has its own affinely transformed coordinate system,
provided through the "Segment Coordinates" output, which can be
used to tile textures in a radially symmetric manner.

Additionally, a unique index is provided for every segment through
the "Segment ID" output, the width of each segment at Y-coordinate
of the "Segment Coordinates" output without normalization = 0 is
provided through the "Segment Width" output and the rotation value
of the affine transformation of the coordinate system of each segment
is provided through the "Segment Rotation" output.

The roundness of the coordinate lines of the "Segment Coordinates"
output can be controlled through the "Roundness" inputs.
This can be used to make the coordinate systems of the segments
a mix of Cartesian and polar coordinates.

Lastly, the lines of points of the "Segment Coordinates" output with
constant Y-coordinates have the shape of polygon with rounded corners,
which can be used to procedurally create rounded polygons.

Pull Request: https://projects.blender.org/blender/blender/pulls/127711
2025-09-22 16:02:37 +02:00
Oxicid
3dffbb7e35 Cleanup: correct misleading PyError message formatting
Removed duplicated "Error" in `PyErr_SetString` messages

Pull Request: https://projects.blender.org/blender/blender/pulls/146473
2025-09-22 15:20:17 +02:00
Clément Foucault
3ccdd28458 Cleanup: EEVEE: Avoid duplicate computation in bsdf_lut function
This is likely not an issue but it is preferable to not do it.

Also reorder some lines for readability and and add `const`.

Pull Request: https://projects.blender.org/blender/blender/pulls/146575
2025-09-22 14:26:20 +02:00
Clément Foucault
f7e19909f6 EEVEE: Move position renderpass to deferred combined pass
This is supposed to save a few milliseconds of compilation
time per material shader.

This might reduce output precision. If that is an issue
this commit can be reverted.

Rel #145347.

Pull Request: https://projects.blender.org/blender/blender/pulls/146464
2025-09-22 14:18:23 +02:00
Brecht Van Lommel
bb57ab3598 Fix #146448: Object copy/paste has wrong colors with working space
Write proper colorspace information into copy buffer blend files.

Pull Request: https://projects.blender.org/blender/blender/pulls/146450
2025-09-22 13:17:49 +02:00
Clément Foucault
fdd8d85f89 EEVEE: Detect simple GBuffer packing cases
This simplifies the GBuffer packing code in a lot
of common use cases. This improves compilation
speed.

The trivial case is either a single closure (already handled)
or 2 closures with no second data layer.

We detect if reflection and refractions can
be assumed colorless depending on the nodetree config.
Colorless reflection or refraction are only using one
data layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/146455
2025-09-22 12:06:42 +02:00
Clément Foucault
759e85c3ff Cleanup: GPU: Remove unused gl_bindcode_get function
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/146471
2025-09-22 11:56:40 +02:00
Philipp Oeser
e2c3bfde4f Fix #146535: 3d Text selection is broken
Typo in 6d92bf00a6

Pull Request: https://projects.blender.org/blender/blender/pulls/146561
2025-09-22 11:50:19 +02:00
Clément Foucault
aa95220576 Metal: Add workaround for imageAtomic synchronization issue
A compiler/driver bug makes so that we can't rely on image atomics.

Adding a write that is never executed after the atomics tricks
the compiler to issue the correct synchronisation instruction.

This fixes a bunch of our render tests differences.

We will keep this workaround until this is fixed upstream.

Pull Request: https://projects.blender.org/blender/blender/pulls/146442
2025-09-22 11:45:27 +02:00
Clément Foucault
fb3904ce45 GPU: Shader Codegen: Split different graph includes
This allows to reduce the number of includes for each
tree graph (surface, volume, displacement) and
reduce the code size significantly for most vertex
shaders, speeding up compile time.

Rel #145347

Pull Request: https://projects.blender.org/blender/blender/pulls/146419
2025-09-22 10:24:10 +02:00
Hans Goudey
1509985013 Cleanup: Use attribute API and StringRef in bake code
Ref #122398

Pull Request: https://projects.blender.org/blender/blender/pulls/146547
2025-09-21 23:08:59 +02:00
Hans Goudey
ef08810493 Cleanup: Remove unused data transfer argument
Pull Request: https://projects.blender.org/blender/blender/pulls/146544
2025-09-21 22:13:13 +02:00
Hans Goudey
113d91aba8 Mesh: Restructure join operator for simplicity, speed, consistency
Previously the joining code put the final data into temporary mesh
data, which meant more complexity because it couldn't use the slightly
higher level APIs more commonly used for transferring data.

The process can be simplified by just merging into the active mesh
directly (though some care must be taken when that is used by
multiple selected objects).

This process avoids iterating over attribute data twice, by processing
values at the same time as copying them. Also some of the inner hot
loops are parallelized. There is more opportunity for trivial multi-
threading in the future.

Mismatched attribute types and domains will now choose the higher
complexity type and domain, which should help avoid information loss.

There was a bug with the existing face set processing which would
modify the source meshes. That is now fixed.
2025-09-21 19:11:19 +02:00
Hans Goudey
7409dc5171 Refactor: Mesh: Slight restructure of object joining code
- Use spans instead of raw pointers
- Construct OffsetIndices instead of accumulating offsets while iterating
- Use newly added `math::transform_points` utilities.
- Simplify topology index offsetting
- Make sure active mesh is at the start of the vector

The point is mostly to simplify a rewrite of this code that will be
the next commit. The overall motivation is to ease the switch to
AttributeStorage, solve a few issues in this code, and make it easier
to understand.
2025-09-21 19:11:19 +02:00
Hans Goudey
49edc02c10 Cleanup: Simplify iteration in mesh join, move declarations
Use a temporary vector instead of iterating through the context
3 separate times. Also move declarations closer to where
variables are used.
2025-09-21 19:11:19 +02:00
Hans Goudey
f51689d41b Cleanup: Rename variables in mesh join code 2025-09-21 19:11:19 +02:00
Hans Goudey
b8c26f6d01 Cleanup: Move mesh object join code to C++ namespace 2025-09-21 19:11:19 +02:00
Hans Goudey
2e92fa7ae1 Cleanup: Move mesh join objects implementation to separate file 2025-09-21 19:11:19 +02:00
Campbell Barton
d857c48216 Cleanup: replace select/deselect flush functions with a select argument
The naming was confusing as only some selection flushing functions
were intended to be used when elements had been selected or de-selected.

Replace these with a single function that takes a "select" argument.
2025-09-21 20:32:27 +10:00
Brecht Van Lommel
c2e5622d50 Revert "Shaders: Remove old Preetham and Hosek sky texture models"
These are causing quite a big difference in existing files, which is not
easy to address in versioning. Since the goal of removing this was to
simplify things for us and that's not the case, just revert this change.

This reverts commit ab21755aaf.

Ref #139923

Pull Request: https://projects.blender.org/blender/blender/pulls/146336
2025-09-20 16:52:23 +02:00
Brecht Van Lommel
23539f457d Fix: Wrong update of color management settings in file output node
Pull Request: https://projects.blender.org/blender/blender/pulls/146508
2025-09-20 16:27:53 +02:00
Brecht Van Lommel
8f7569f6e0 Fix: Don't show working space change popup when not changing the space
Pull Request: https://projects.blender.org/blender/blender/pulls/146509
2025-09-20 16:27:35 +02:00
Brecht Van Lommel
acb6faf8eb Color Management: Better preserve views when switching between displays
Also match prefixes, so that switching between PQ and HLG keeps an
ACES view regardless of the HDR nits.

Pull Request: https://projects.blender.org/blender/blender/pulls/146504
2025-09-20 13:55:38 +02:00
Brecht Van Lommel
21f358a3cb UI: Shorten Display Device to Display, and View Transform to View
This actually matches the OpenColorIO terminology more closely, and
makes a bit more sense as the display is more of an abstract thing than
a specific device.

Pull Request: https://projects.blender.org/blender/blender/pulls/146483
2025-09-20 13:14:17 +02:00
Brecht Van Lommel
92a4aee3f9 Fix: Crash with certain OCIO configs in display descriptions
This was incorrectly assuming displays have a corresponding colorspace
with the same name.

Pull Request: https://projects.blender.org/blender/blender/pulls/146481
2025-09-20 13:14:04 +02:00
Eitan Traurig
0827fb50b1 UI: Use regular sentence case for Arrange/Align description
Remove capitalization from words that are not at the beginning of the description.

Following Blender’s human interface guidelines.

Pull Request: https://projects.blender.org/blender/blender/pulls/146422
2025-09-20 13:09:52 +02:00
Campbell Barton
4a6268e092 Cleanup: various non functional changes for C++ 2025-09-20 16:28:02 +10:00
Campbell Barton
198eb638b2 Cleanup: use full sentences in bmo_removedoubles.cc 2025-09-20 15:18:18 +10:00
Campbell Barton
6de94ee013 Cleanup: merge loops in weld-vertices
Avoid looking up vertex mappings twice.
2025-09-20 15:11:49 +10:00
Campbell Barton
f5c7a1286d Cleanup: avoid a redundant iteration for weld-vertices 2025-09-20 15:01:51 +10:00
Campbell Barton
e59aab4d12 Cleanup: relocate doc-strings to header 2025-09-20 13:18:55 +10:00
Campbell Barton
93cc17dd72 Fix #78916: unpredictable results with merge by distance
The merge by distance operator now has an optional merge centroid
option, when it is enabled, groups of merged vertices are averaged
and moved to their centroid position.

This allows for more predictable results in cases where vertices that
form loops would have otherwise collapsed unevenly and ended up with
jagged lines.

Ref !146478
2025-09-20 12:55:05 +10:00
Campbell Barton
bdae3e28a2 Modeling: use the central vertex when finding duplicates
Previously the method of picking the "target" duplicate wasn't
deterministic from a user perspective.

The behavior has been changed so:

- For a cluster of 3 or more vertices,
  use the vertex closest to the centroid.
- For a cluster of 2 use the lowest index.

This mitigates #78916, solving some cases where clusters have a
central vertex although can't be considered fixed as the 2 vertex
case doesn't work so well.

Added a BLI_kdtree_{N}d_calc_duplicates_cb function that lets the
caller choose the index to keep from a cluster of duplicates.

Refactored from !145851.

Ref !146492

Co-authored-by: tariqsulley <tariqsulley3c@gmail.com>
2025-09-20 12:42:06 +10:00
Damien Picard
0c06204864 Fix: Color Management: Warning in fallback display description
The fallback OCIO display description method would attempt to call
description, which was actually itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/146467
2025-09-19 16:12:47 +02:00
Mohamed Hassan
48ba7b7745 Compositor: Add a kernel convolution mode to glare node
This patch adds a kernel convolution mode to the Glare node, which is
basically a wrapper around the Convolve node for extra control.

Pull Request: https://projects.blender.org/blender/blender/pulls/145379
2025-09-19 14:33:08 +02:00
Nick Alberelli
439fe8a1a0 PyAPI: support logging for Context.temp_override
Adds comprehensive logging system for temp_override context manager to
help developers debug "context is incorrect" operator poll failures.
The logging tracks all context member access during temp_override
sessions and provides detailed summaries to identify context
availability issues.

Features:
- Command-line logging: `./blender --log-level trace --log "context" `
- Python programmatic control: `temp_override_handle.logging_set(True)`
- C-level API: CTX_temp_override_logging_set/get() functions
- Tracks individual member access
- Uses CLOG logging infrastructure

The logging helps identify which context members are accessed during
temp_override sessions and whether they return valid data, making it
easier to debug operator poll functions that fail with context errors.

Ref !144810
2025-09-19 06:48:07 +00:00
Campbell Barton
20bea06f4a Revert "Fix #78916: unpredictable results with merge by distance"
This reverts commit 69e27b4855.

Own oversight in the approach since this modified vertices from a
bmesh operator intended to "find" duplicates.
2025-09-19 16:22:35 +10:00