Commit Graph

153985 Commits

Author SHA1 Message Date
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
Simon Thommes
40ecce9843 Fix: Geometry Nodes: Move to Nodes operator not disabled on linked data
This operator can only be used if the data-block the modifier belongs to
is editable.
2025-09-21 13:44:06 +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
Julien Duroure
9f3770b949 Fix #142867 - glTF importer: Fix crash trying to import an empty glTF scene 2025-09-21 11:26:48 +02: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
613abf0383 Logging: Cycles: Change various warnings to errors
So that --debug-exit-on-error can be used to detect issues like missing
textures. Blender also reports such cases as errors now.

Pull Request: https://projects.blender.org/blender/blender/pulls/146507
2025-09-20 16:28:43 +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
fc8bc41b84 Cleanup: Compiler warning in GPU kernel compilation
Silence false positive about function not returning.

Pull Request: https://projects.blender.org/blender/blender/pulls/146178
2025-09-20 13:14:35 +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
tariqsulley
69e27b4855 Fix #78916: unpredictable results with merge by distance
The previous implementation used KDTree duplicate search with
BLI_kdtree_3d_calc_duplicates_fast(). The survivor was always
one of the input vertices, not the centroid of the cluster.

This caused cases where merging a line of vertices did not
collapse to their average position, resulting in jagged loops.

Now vertices within the threshold are clustered, their centroid
is computed, and the chosen survivor is snapped to this centroid.
This ensures predictable and consistent merge results.

Ref !145851
2025-09-19 15:09:14 +10:00
tariqsulley
c2319f8293 Modeling: support adding lattices to selected objects
Support adding lattices to selected objects,
deforming them with with the lattice modifier.

By default the lattice fits to the object bounds and is oriented
to the active object (if it's set).

Resolves #144076

Ref !144888
2025-09-19 11:33:12 +10:00
Campbell Barton
c2766d2058 Cleanup: use a typed enum for context data type
Ensure all types are handled in switch statements (see !144810).
2025-09-19 08:21:30 +10:00
Damien Picard
dd0eb2f90c Color Management: Show descriptions for displays, views, and looks
Descriptions for these types of data are specified in the OCIO config,
but were not shown in the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/146339
2025-09-18 19:41:36 +02:00
Brecht Van Lommel
6bef804d17 Fix: Save as Render does not work for some OCIO configs
There was an incorrect assumption that the display colorspace of a
view + display transform uniquely identifies it. But with modern OCIO
configs there is no longer a unique display colorspace per view.

The same wrong assumption was made in the code that refreshes the image
editor after save, and that was fixed as well.

Ref #145519

Pull Request: https://projects.blender.org/blender/blender/pulls/146449
2025-09-18 19:39:29 +02:00
Brecht Van Lommel
e753460e95 Fix: Working color space name on Blender startup is wrong
It was copying the wrong name.

Pull Request: https://projects.blender.org/blender/blender/pulls/146443
2025-09-18 19:33:35 +02:00
Jaume Bellet
42756c3d9a Fix #146176: Solve build errors using gcc version 12.2.0
error: ‘INT_MAX’ was not declared in this scope

compiler hints to include missing header `#include <climits>`
but replaced with `std::numeric_limits<int>::max()` / min
**ONLY** in cases where the errors were thrown

Pull Request: https://projects.blender.org/blender/blender/pulls/146212
2025-09-18 16:09:09 +02:00
Omar Emara
f50296b416 Cleanup: Remove RNA defines for removed nodes
Pull Request: https://projects.blender.org/blender/blender/pulls/146441
2025-09-18 16:01:36 +02:00
Jesse Yurkovich
fb352dcd53 Cleanup: IO: Remove unused local variable
Pull Request: https://projects.blender.org/blender/blender/pulls/146423
2025-09-18 01:20:46 +02:00
Ray Molenkamp
abd683fcb5 CMake: CTest: Disable blendfile_library_overrides test
This test is intermittently failing. Disable it for now to avoid other work
being incorrectly flagged as broken. Once issue #146221 is resolved this
test must be re-enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/146411
2025-09-17 17:38:40 +02:00
luz paz
612f869036 Cleanup: Fix typos in build_files subdirectory
Fixes several typos in the build_files sub-directory.

Pull Request: https://projects.blender.org/blender/blender/pulls/146344
2025-09-17 15:35:45 +02:00
Clément Foucault
36151962d6 Cleanup: GL: Remove unused AMD workaround
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/146404
2025-09-17 14:23:32 +02:00
Jesse Yurkovich
858254aca4 Cleanup: Unused variable when WITH_ALEMBIC is off
Pull Request: https://projects.blender.org/blender/blender/pulls/146389
2025-09-17 01:41:00 +02:00
Weizhen Huang
eae0a33dd4 Revert "New bone color presets"
This reverts commit ab98959af0.
Did not mean to push
2025-09-16 18:04:25 +02:00
Weizhen Huang
367beb7f6e Revert "Add versioning"
This reverts commit 17ea75d929.
Did not mean to push
2025-09-16 18:04:10 +02:00
Weizhen Huang
f3c061d1ce Revert "remove prints"
This reverts commit d4c99b871c.
Did not mean to push
2025-09-16 18:03:51 +02:00
Weizhen Huang
f391b72875 Revert "Move versioning into the 'this always runs' block until we land the PR"
This reverts commit 229a84ef90.
Did not mean to push
2025-09-16 18:03:27 +02:00
Weizhen Huang
db3fee09b2 Revert "Partial versioning code, very much WIP"
This reverts commit 43f8efbf82.
Did not mean to push
2025-09-16 18:02:37 +02:00
Weizhen Huang
a0daebb4a7 Revert "New Colors v4"
This reverts commit a1dfd67cbf.
Did not mean to push
2025-09-16 18:02:07 +02:00
demeterdzadik@gmail.com
a1dfd67cbf New Colors v4 2025-09-16 17:59:54 +02:00
demeterdzadik@gmail.com
43f8efbf82 Partial versioning code, very much WIP
Just committing to transfer to another computer.
2025-09-16 17:59:54 +02:00