Commit Graph

121042 Commits

Author SHA1 Message Date
Hans Goudey
f74e304b00 Attributes: Use AttributeStorage instead of CustomData for Instances
Part of #122398.

This commit moves the runtime instances type to use `AttributeStorage`.
Besides sharing some utility functions with point clouds, a resize
method is implemented.

Pull Request: https://projects.blender.org/blender/blender/pulls/140991
2025-06-26 17:03:56 +02:00
Hans Goudey
9bc67b78ce Merge branch 'blender-v4.5-release' 2025-06-26 10:33:20 -04:00
Hans Goudey
62726f486b Cleanup: Add missing include to make header independent 2025-06-26 10:06:58 -04:00
Clément Foucault
6fee44760a Fix: Overlay: Missing refresh when toggling retopology overlay
This appear as meshes still present or missing when toggling
the option.

This was caused by the change in update detection from the
overlay properties.
2025-06-26 15:39:10 +02:00
Germano Cavalcante
9879132c7c Fix #141017: Rotation snapping increment is wrong after changing mode
After changing the transform mode, `initSnapping` was called, resetting
the increment values.

The solution is to create the `transform_snap_reset_from_mode` function
with only the changes needed when changing modes.

This commit also makes the properties set in the operator take priority
over the scene properties.
2025-06-26 10:37:05 -03:00
Hans Goudey
8ebb759046 Fix: Realize Instances use-after-free with collections
The calls to `to_geometry_set` in this file can create a temporary
Instances struct for collections. That instances component will contain
two attributes, which are currently referenced in the attributes map
even after the temporary compoment storage goes out of scope. A simple
fix is to avoid adding these attributes to the map in the first place.

An alternative that would also be more efficient would be to handle each
instance reference type explicitly, without converting it to a temporary
geometry set. That seems to significantly complicate the code though;
for now it doesn't seem worth it.

Pull Request: https://projects.blender.org/blender/blender/pulls/140999
2025-06-26 15:07:34 +02:00
quackarooni
28bd5a7832 Fix #140933: "Group Socket Node" theme property left unset
The theme property for group socket nodes was set to `#000000` for
default themes, which looked out of place against the other node
header colors. This patch adds colors to both the Blender Dark & Light
themes that should resemble their counterparts before 2ea3cd2188.

Colors:
Blender Dark - `#1d1d1d`
Blender Light - `#3d3d3d`

Pull Request: https://projects.blender.org/blender/blender/pulls/141011
2025-06-26 15:05:37 +02:00
Campbell Barton
517792ea5c Merge branch 'blender-v4.5-release' 2025-06-26 22:08:39 +10:00
Campbell Barton
d84aae280d Merge branch 'blender-v4.5-release' 2025-06-26 22:08:36 +10:00
Campbell Barton
0417719ae9 Help text: move Vulkan debugging option under "Debug Options" 2025-06-26 21:57:49 +10:00
Campbell Barton
0f590bbfb6 Cleanup: correct flag name for NDOF Y/Z axis swap 2025-06-26 21:50:03 +10:00
Pratik Borhade
59a971294c UI: Collection visibility number shortcuts for the Outliner
Move number shortcut keys for isolating collection to outliner space.
Resolves #140651

Same operator is also used in the collection list from the view3d N-panel,
video demonstration includes that part as well to ensure it is unaffected.

Pull Request: https://projects.blender.org/blender/blender/pulls/140653
2025-06-26 12:04:48 +02:00
Clément Foucault
1e79660a14 Fix: Overlay: Region info not working if gizmos and overlays are disabled
The depth test was not set properly and was relying on the
(now moved) text drawing to always disable it.
2025-06-26 11:42:11 +02:00
Campbell Barton
048fa8a327 Merge branch 'blender-v4.5-release' 2025-06-26 19:15:20 +10:00
Campbell Barton
d9b3bea356 Merge branch 'blender-v4.5-release' 2025-06-26 19:15:13 +10:00
Campbell Barton
c3d5e429ac Fix crash assigning non UTF8 path to imbuf.filepath 2025-06-26 19:10:54 +10:00
Sybren A. Stüvel
2ce3e8c877 Fix #140969: Joining armature objects that share their data fails assertion
Add a precondition check that verifies all to-be-joined armatures are
unique. If this is detected, an error is shown and the operator is
aborted.

Joining shared Armatures is non-trivial, because the corresponding
pose bones may actually have different drivers or constraints on them
(because those live on the Object ID, and not the Armature).
Duplicating any shared Armature ID could be a first step, but I am not
convinced this is always the right approach. This is why joining
shared Armatures is not supported for now. Users can choose how to
make each Armature unique, either by deselecting objects or by
duplicating their data.

Pull Request: https://projects.blender.org/blender/blender/pulls/140971
2025-06-26 11:01:41 +02:00
Sybren A. Stüvel
d17f5c09d5 Merge remote-tracking branch 'origin/blender-v4.5-release' 2025-06-26 10:49:57 +02:00
Pratik Borhade
7e17ec5562 Fix #140747: Ignore armature from custom shape list
When armature is selected for custom shape of a bone, we run into
stack overflow due to recursive calls. To prevent this situation,
exclude armature object type from the custom shape list.

This also clears the `pchan->custom` pointer after loading/linking a
blend file. Otherwise a linked Armature object can still be assigned
indirectly, by renaming objects in the library file.

Fixes: #140747
Fixes: #140959

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/140851
2025-06-26 10:48:06 +02:00
Campbell Barton
7bc5347d91 Merge branch 'blender-v4.5-release' 2025-06-26 18:39:03 +10:00
Campbell Barton
2355a32017 Fix crash calling bpy.data.file_path_map with non UTF8 paths 2025-06-26 18:35:37 +10:00
Campbell Barton
5d7c433a18 Merge branch 'blender-v4.5-release' 2025-06-26 18:17:16 +10:00
Campbell Barton
b914416613 Merge branch 'blender-v4.5-release' 2025-06-26 18:17:13 +10:00
Campbell Barton
d9eea24b06 Merge branch 'blender-v4.5-release' 2025-06-26 18:17:08 +10:00
Campbell Barton
521fae81fc Cleanup: remove redundant call to BLI_path_basename 2025-06-26 18:12:41 +10:00
Jeroen Bakker
00d746059e Fix #140927, #140912: OpenGL: Annotate draw on surface broken
Recently we switched from Depth24S8 to Depth32FS8. On OpenGL the read
back of depth was not working as it asked the driver to download both
the depth and stencil part of the texture. This isn't supported when using floats
and would not return any data.

This PR forces OpenGL to read back depth component when a depth/stencil
texture is used.

Pull Request: https://projects.blender.org/blender/blender/pulls/141009
2025-06-26 10:05:27 +02:00
Campbell Barton
6d06fc3979 Fix immediate exit when displaying an invalid UTF8 title on Wayland
A non UTF8 title on Wayland causes disconnection from the server.
Resolve by using the path as-is unless invalid UTF8 byte sequences
are found, in that case they're replaced by `?`.

This is skipped on WIN32 & macOS since the issue only exists on Wayland.
2025-06-26 18:01:06 +10:00
Campbell Barton
c5bae85893 BLI_string: add BLI_str_utf8_invalid_substitute
Similar to BLI_str_utf8_invalid_strip except that it substitutes
invalid characters and doesn't change the string length.

Useful for displaying strings that include invalid UTF8 code-points.
2025-06-26 18:01:06 +10:00
Jeroen Bakker
28add6cfea Merge branch 'blender-v4.5-release' 2025-06-26 08:50:36 +02:00
Jeroen Bakker
40eaaf089f Vulkan: Switch Qualcomm to switch to OpenGL
Due to driver issues qualcomm devices that try to start Blender with
a driver below 31.0.112.0 will automatically switch to OpenGL.

Pull Request: https://projects.blender.org/blender/blender/pulls/140902
2025-06-26 08:49:37 +02:00
Campbell Barton
8af001eeea Merge branch 'blender-v4.5-release' 2025-06-26 15:01:20 +10:00
Campbell Barton
8536261164 Fix crash calling the transform operator over the redo panel
Calling transform over the redo panel would access the regiondata
as a RegionView3D for any region type.

Resolve by checking the region type - as done elsewhere transform code.
2025-06-26 05:00:31 +00:00
Campbell Barton
c71b314565 Cleanup: return a boolean from BPY_context_member_get, check it's result 2025-06-26 14:28:40 +10:00
Campbell Barton
06dfab455a Merge branch 'blender-v4.5-release' 2025-06-26 13:41:47 +10:00
Campbell Barton
582a54b94c NDOF: apply YZ axis swap to rotations
Apply the "Zoom direction" preference to the rotation axis.
Until now, this preference was limited to translations.

Note that the X/Y swap is now applied in the accessor functions instead
of wmNDOFMotionData::tvec because swapping the X/Y axis doesn't work
well in some cases (color picker for example), and it's confusing
of axis swapping is handled in different parts of the code for
rotation & translation.

Ref !140975

Co-authored-by: Patryk-Skowronski <patryk_skowronski@3dconnexion.com>
2025-06-26 03:23:25 +00:00
Guillermo Venegas
e460ae24cb Refactor: UI: Replace uiItemEnumR* funtions with uiLayout methods
This converts the public functions to add enum specific property buttons
with uiLayout methods matching the python API.

Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/140941
2025-06-25 22:03:31 +02:00
Howard Trickey
ea65aa5ea1 Fix #140574: Manifold boolean leaves redundant 2-edged vertices.
This is discussed more in PR #140773.
The cause of the breakage was the change of the Manifold library
version from 3.0.1 to 3.1.0. That change is very positive otherwise
because we can remove the "use runids" workaround to prevent bad
face merging, and that removal is also part of this commit.
Removing that changes the time to do a big sphere-sphere test
from 660ms to 340ms.
The problem that needed fixing is that the new library version appears
not to do some aggressive simplification that the old version did,
and as a result, when we dissolve triangulation edges after the boolean
is done, it sometimes leaves valence-2 vertices on original edges.
To fix that, new code detects and then dissolves such vertices.
2025-06-25 15:32:01 -04:00
Howard Trickey
ffc204d1fa Fix #140574: Manifold boolean leaves redundant 2-edged vertices.
This is discussed more in PR #140773.
The cause of the breakage was the change of the Manifold library
version from 3.0.1 to 3.1.0. That change is very positive otherwise
because we can remove the "use runids" workaround to prevent bad
face merging, and that removal is also part of this commit.
Removing that changes the time to do a big sphere-sphere test
from 660ms to 340ms.
The problem that needed fixing is that the new library version appears
not to do some aggressive simplification that the old version did,
and as a result, when we dissolve triangulation edges after the boolean
is done, it sometimes leaves valence-2 vertices on original edges.
To fix that, new code detects and then dissolves such vertices.
2025-06-25 13:44:49 -04:00
Germano Cavalcante
7ae173de39 Fix #140718: Incremental snap sometimes has wrong aspect
The 2 values in `t->snap` are not enough to indicate the transformation
value for each axis including precision.

Therefore, imitating the snap to grid solution, `t->snap` has been
replaced by `t->increment` and `t->increment_precision`.

Pull Request: https://projects.blender.org/blender/blender/pulls/140980
2025-06-25 17:31:01 +02:00
Julian Eisel
69eab999e0 Refactor: UI: Warn when not using result from UI layout getter functions
These functions were refactored recently, e.g. see e300d44e69. In some cases
it's less clear now which functions are getters and which are setters. Case in
point, I first thought `layout.use_property_split()` would enable property
split (that's what the name suggests). Previous names like
`uiLayoutGetPropDecorate()` and `uiLayoutSetPropDecorate()` were more clear.

By using the `[[nodiscard]]` attribute for getters, the compiler will emit
warnings when using such functions like a setter, without using the returned
value.
2025-06-25 16:45:36 +02:00
Bastien Montagne
0b52dcb0e0 Fix (unreported) logical error in Array IDProp copy code.
`IDP_ARRAY` properties storing `IDP_GROUP` data would not duplicate
these on copying, leading to two different array properties sharing the
same groups data...

NOTE: Uunclear how bad this issue was actually, since Blender itself will
never create such arrays of group IDProps afaik. At least could not find
any.

We really need to cleanup this code and add actual cpp-level unittests.
2025-06-25 16:19:31 +02:00
Campbell Barton
e7fe0932e6 Merge branch 'blender-v4.5-release' 2025-06-25 23:38:40 +10:00
Campbell Barton
5b06823f99 Fix #140929: Crash attempting to link from the current file from Python
Add an error check that the path being linked doesn't match the current
blend file.

Also resolve reference leak in the case of library override errors.
2025-06-25 13:37:52 +00:00
Clément Foucault
1a5f29cb07 Overlay: Move text cache managment to the Overlay::Instance
This avoid legacy code inside the DRWContext.

Note that this change the draw order w.r.t. gizmos. Now the
gizmos will hide the text.

Moreover, streamline the condition for enabling text drawing
in order to fix #78971.
2025-06-25 13:05:06 +02:00
Clément Foucault
e2c3d850cb Cleanup: Sequencer: Remove uneeded uniform creating warnings
The line width is already specified before the program bind
and the uniform doesn't even exists for `GPU_SHADER_3D_UNIFORM_COLOR`.

This might be the remains of an invalid use of the wide line
workaround.
2025-06-25 12:15:35 +02:00
Omar Emara
3b1d252431 Compositor: Support structure type
This patch adds support for the experimental structure types currently
used bu Geometry Nodes. Pixel nodes were declared as function nodes,
which gives dynamic structures for all their sockets. Other nodes now
explicitly declared their inputs as dynamic if not single value, while
the compositor_expects_single_value marker was removed in favor of the
StructureType::Single type.

Pull Request: https://projects.blender.org/blender/blender/pulls/140910
2025-06-25 11:54:48 +02:00
Clément Foucault
872c8fb189 Fix #77909: Viewport Render Image clamps output
The issue was that this operator is using the same
path as the viewport display. So the colors are
clamped if the display is not HDR.
This fix is easy now that we have an HDR path for
the viewport display. We just enforce using it
when doing the viewport render preview.
2025-06-25 11:28:50 +02:00
Habib Gahbiche
f2d95e758d Fix: Crash when opening files with animated compositor normal node
Saved files in 4.5 with a compositing node tree containing a Normal
Node with animated 'Dot' input crash in 5.0.

A test case with animated dot and normal inputs was added as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/140908
2025-06-25 11:04:29 +02:00
Clément Foucault
07ddd5065d Fix #87610: Workbench: World Cavity Not Scale-Agnostic
This is caused by the Attenuation property that is not
scale agnostic. We don't want to change its behavior as
it would break a lot of files. Instead, we allow users
to set its influence to 0 or less than 1 in order to
nullify or adjust its impact at larger AO radii.
2025-06-25 10:14:39 +02:00
Jacques Lucke
72110757b6 Fix: Geometry Nodes: links removed after syncing bundle/closure nodes
This makes sure that sockets keep their old identifiers so that links remain intact.

Pull Request: https://projects.blender.org/blender/blender/pulls/140956
2025-06-25 09:55:00 +02:00