Commit Graph

118328 Commits

Author SHA1 Message Date
Clément Foucault
a92f6ebf13 Cleanup: DRW: Remove ModelMatrix legacy GLSL macros 2025-03-05 15:31:35 +01:00
Clément Foucault
5916c39fa4 Cleanup: DRW: Simplify resource id and custom id 2025-03-05 15:31:35 +01:00
Clément Foucault
580c02c053 Fix #135497: Auto-Depth Operation are affecterd by Retopology offset
Setting the offset to 0 for these cases fixes the issue.
We still want to draw the edit face in this case to a be able
to zoom on the retopo surface. We just don't want the offset.

Pull Request: https://projects.blender.org/blender/blender/pulls/135511
2025-03-05 15:08:12 +01:00
Clément Foucault
edd3781584 Fix: DRW: Fix the fix
The `tmp_object.runtime` is getting overwritten by the shallow
copy.
Caused by b4b1d010fb
2025-03-05 14:57:59 +01:00
Clément Foucault
b4b1d010fb Fix: DRW: Asan crash because of use after free
Caused by 2038ba699d
2025-03-05 14:49:22 +01:00
Omar Emara
97ada4f307 Cleanup: Compositor: Remove operation stream cache
This patch removes the operation stream cache code from the compositor.
This code path has been disabled already since 4137fdf555, so this patch
just removes the dead code.

Pull Request: https://projects.blender.org/blender/blender/pulls/135513
2025-03-05 14:01:12 +01:00
Sybren A. Stüvel
d620f7605c Merge remote-tracking branch 'origin/blender-v4.4-release'
ch.cc
2025-03-05 13:28:16 +01:00
Jonas Holzman
32f8863b0c Fix #134260: Color Picker components partially resetting when pressing Backspace
Previously, when pressing the Backspace key inside an open color picker,
the HSV and Hex field components would not refresh. Only the RGB
components would.

Fixed by calling the attached button function callbacks which propagates
the color changes to the other color picker buttons from the RGB values.

Pull Request: https://projects.blender.org/blender/blender/pulls/135131
2025-03-05 12:41:32 +01:00
Campbell Barton
1efcf7d729 Cleanup: correct flag check in remesh operator
Inclusion of other flags would make this check fail.
2025-03-05 22:27:53 +11:00
Campbell Barton
f54eeaf2aa Fix #135490: Incorrect allocation size with MEM_new (naming collisions)
Resolve naming collisions for structs which could cause the wrong size
to be used allocating the `LaplacianSystem` when calculating mesh
weights from an armature.

Ref !135491
2025-03-05 22:26:55 +11:00
Falk David
a4ac52d0d0 Fix #135312: Grease Pencil: Crash when drawing while animation is playing
While we can avoid this crash by enforcing that the animation can't
play while drawing, this PR fixes the problem by remembering the
drawing that the operation was started on.

This seems like the right thing to do in general because there might be
other ways that the frame can be changed.

From my tests this seems to work even in cases where we use multi
frame editing.

Pull Request: https://projects.blender.org/blender/blender/pulls/135451
2025-03-05 12:21:28 +01:00
Sybren A. Stüvel
aada31c041 Anim: Fix issue where F-Curves were half-initialized when importing USD
Fix an issue where imported F-Curves were allocated but not zeroed out,
when importing skeletal animation from USD.

When growing the F-Curve array, `BKE_fcurve_bezt_resize()` will now zero
out new array elements, instead of leaving the initialisation to the
caller. There are many fields in `BezTriple`, and the caller is likely
to only set those that can be imported (like the keyframe coordinates &
handles).

This fixes an issue introduced in 857743db9d.

Pull Request: https://projects.blender.org/blender/blender/pulls/135448
2025-03-05 12:20:40 +01:00
Sybren A. Stüvel
a03077c22d UI: show '+ New' button in Action Slot selector when no slot is selected
In any Action Slot selector, when there is no slot selected yet, replace
the 'Duplicate' and 'Unassign' buttons with a large 'New' button. This
is consistent with the ID selector, which does the same thing.

Care is taken to ensure this is only applied to the use case of
selecting Action Slots, in order to minimize the UI changes in Blender
4.4.

The only other use case of `template_search()` that I could find, is the
View Layer selector in the top-right corner of the window. However, even
without the "_is this an Action Slot selector_" guard, it would not show
these changes, as Blender guarantees there is always a view layer
assigned. Add-ons may still use `template_search()` in other ways,
though, so it's still good to keep this guard in place.

Pull Request: https://projects.blender.org/blender/blender/pulls/135443
2025-03-05 12:20:11 +01:00
Clément Foucault
04fcf2f907 Merge branch 'blender-v4.4-release' 2025-03-05 12:06:00 +01:00
Clément Foucault
326ce59961 Fix #134509: GPU: Add workaround for Intel ARC nodelink driver bug
This disables the instancing optimization for this specific
hardware.

Pull Request: https://projects.blender.org/blender/blender/pulls/135458
2025-03-05 12:05:34 +01:00
Lukas Tönne
1b8185db79 Merge branch 'blender-v4.4-release' 2025-03-05 12:04:12 +01:00
Lukas Tönne
70473d7589 Fix: Grease Pencil forward declaration of RandomNumberGenerator.
This is a class, was forward-declared as struct.
2025-03-05 12:02:58 +01:00
Hans Goudey
b8d547ab1a Fix #134876: Wireframe overlay incorrectly skips some edit mode objects
The detection of when the wireframe is drawn by the edit mode overlays
instead was incorrect and didn't handle recent changes to avoid drawing
edit mode overlay data for invalid evaluated/original edit mesh mappings.
See code comments for more detail.

Pull Request: https://projects.blender.org/blender/blender/pulls/135402
2025-03-05 11:18:26 +01:00
илья _
02281dd26a Cleanup: BKE: Nodes: improve node label functions
Slight cleanup of function naming, return types and related things like early return.

Pull Request: https://projects.blender.org/blender/blender/pulls/135351
2025-03-05 11:17:50 +01:00
Pratik Borhade
c2a5fb28d7 Fix #135344: Extra space in node editor group panel
Remove extra padding from panel when it doesn't have toggle socket. It
was added in 2822777f13

Pull Request: https://projects.blender.org/blender/blender/pulls/135424
2025-03-05 11:16:56 +01:00
Omar Emara
117b47840a Refactor: Compositor: Remove use of auto_resource_location
This patch removes the use of auto_resource_location during shader
operation material compilation. Instead, we assign slot locations
explicitly. Output images are just assigned incremental indices, while
input samplers are also assigned incremental indices, but starting from
the number of textures in the material, because color bands might be
reserving slots already.

Pull Request: https://projects.blender.org/blender/blender/pulls/135453
2025-03-05 09:12:52 +01:00
Lukas Tönne
b66bfa345d Merge branch 'blender-v4.4-release' 2025-03-05 08:50:10 +01:00
Lukas Tönne
dc3a652d5b Fix #134606: Grease Pencil: Randomization of attributes in primitive tools
Primitive tools were not using the brush randomization options.

This moves the randomization functions into the editor utilities for Grease Pencil
and enables primitive curve generation to use them.

Pull Request: https://projects.blender.org/blender/blender/pulls/135454
2025-03-05 08:49:27 +01:00
YimingWu
8b8b0837a0 Fix #135002: Sculpt/Paint: Grease Pencil stabilization toggling during a stroke
Prior to 4.3, it is possible to toggle Stabilize Stroke during a Grease
Pencil stroke with shift key, however this is broken by brush system
changes. Now this behaviour is re-implemented.

Note: Shift-toggling of Stabilize Stroke is only for Grease Pencil for
now, as mesh sculpt mode will use shift key for smooth brush instead of
pointer smoothing.

Pull Request: https://projects.blender.org/blender/blender/pulls/135024
2025-03-05 07:14:13 +01:00
Campbell Barton
a79b7323fa Merge branch 'blender-v4.4-release' 2025-03-05 13:22:25 +11:00
Campbell Barton
b889cc66ca Unbreak building with CLANG & WITH_GMP=OFF 2025-03-05 13:18:29 +11:00
Harley Acheson
6a7fa2fc0f Merge branch 'blender-v4.4-release' 2025-03-04 16:11:22 -08:00
Harley Acheson
4da5377e17 Fix #135421: BLF Show Most Control Characters as Space
Prior versions of Blender showed control characters as spaces, but
since we recently made fallback optional they are no longer visible.
This is because with fallback we are guaranteed to return a glyph, but
without fallback the current font will not have entries for these. This
PR just shows them as spaces, just like before. But does not do so for
carriage return and line feed.

Pull Request: https://projects.blender.org/blender/blender/pulls/135484
2025-03-05 01:09:53 +01:00
Jacques Lucke
f9e02b5925 Geometry Nodes: support opening images in modifier
Previously, it was unnecessarily complicated to open an image that is passed
into Geometry Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/135352
2025-03-04 23:59:22 +01:00
Jacques Lucke
c233955ef9 Geometry Nodes: support custom delimiter in Import CSV node
Previously, only `,` was a valid delimiter, but it's also common to have e.g.
tab or semicolon. Only single characters are supported as delimiters. A few
characters are not allowed because they have other meanings: `\n`, `\r`, `"`,
`\\`.

Note: The best way to get a tab character is the use the Special Characters node
currently.

Pull Request: https://projects.blender.org/blender/blender/pulls/135468
2025-03-04 23:58:02 +01:00
Harley Acheson
0ee642611c UI: Add Specific Icon to Represent Preview While Loading
Rather than continuing to use ICON_TEMP, meant to represent temporary
locations, this PR adds a specific one - ICON_PREVIEW_LOADING - for
this purpose. Just a copy of ICON_TEMP for now, but with all parts at
40% opacity, matching how we use it now. Not only gives us an icon we
can later change, but also removes our special handling of reducing
opacity for one icon id.

Pull Request: https://projects.blender.org/blender/blender/pulls/135463
2025-03-04 23:35:30 +01:00
Christoph Lendenfeld
0399134406 Fix #135260: Snap stuck when dragging time cursor
Caused by ac549dcfde. Snap is meant to be not saved, but the breaking
commit introduced a new property below the `snap` property so it was
no longer applied.

Pull Request: https://projects.blender.org/blender/blender/pulls/135433
2025-03-04 21:21:04 +01:00
Hans Goudey
c560cdc8cc Cleanup: Use StringRef for layout panel API functions 2025-03-04 14:29:15 -05:00
Hans Goudey
a48d155c87 Geometry Nodes: Add "Face" option to Mesh to Curve node
Adds a mode option to the node to choose between the existing
behavior and new behavior that converts each face to a cyclic curve.
Generally this is much faster than the existing mode because it's
easy to parallelize and because curve offsets and face and corner
attributes can be implicitly shared to avoid copies.
Resolves #134671.

Pull Request: https://projects.blender.org/blender/blender/pulls/134773
2025-03-04 19:16:36 +01:00
Hans Goudey
c821b7d2e7 Fix #135413: Potential invalid normals in sculpt mode node tools
Another case of special handling needed for normals caches in sculpt mode.
2025-03-04 12:43:44 -05:00
Philipp Oeser
6e76741e6c Merge branch 'blender-v4.4-release' 2025-03-04 18:24:56 +01:00
Philipp Oeser
f3161149db Fix #135370: Crash when baking textures with a modified UV map
The report was storing a non-2D-Vector attribute with geometry nodes
over a valid UVMap, resulting in the evaluated mesh not having a valid
`CD_PROP_FLOAT2` layer anymore. There is already a check to early out
for the original mesh in case it has no UVs, but as mentioned, not for
the **evaluated** (cage/multi-no-res) mesh which is actually/rightfully
used to get the UVs.

To resolve, check again if we have UVs right after getting he mesh that
is actually used.
(we might even want to remove the first check, seems redundant now -
even though it would early out a bit sooner...)

Pull Request: https://projects.blender.org/blender/blender/pulls/135388
2025-03-04 18:24:39 +01:00
Clément Foucault
3dfec1ff73 Depth Picking: Do not include non-selectable object in depth picking
This allow to make transparent object not interfere with
navigation.

Rel #134784

Pull Request: https://projects.blender.org/blender/blender/pulls/135109
2025-03-04 18:13:48 +01:00
Harley Acheson
d71ce31122 Merge branch 'blender-v4.4-release' 2025-03-04 09:12:00 -08:00
Harley Acheson
84123446e3 Fix #135324: Data-block selector icon drawn too big
DPI scaling was applied twice. Added an API comment to make this more
clear for the caller of the function. This is exactly the changes to
main committed in 47bbf3fcae, which is a
correction to 1f88645728.

Pull Request: https://projects.blender.org/blender/blender/pulls/135411
2025-03-04 18:11:00 +01:00
Hans Goudey
a2386789da Cleanup: Sculpt: Simplify enabling BVH build debug time prints 2025-03-04 12:04:38 -05:00
Julian Eisel
7e99e575a4 Fix: Fix most cases of asset browser preview flickering on undo/redo
Mitigates #93726.

With this asset previews will no longer flicker in the asset browser
on actions like undo, redo or when using "Adjust Last Operation" if
the asset library doesn't contain assets from the current file.

Previews of assets from the current file would have to be cleared on
undo & redo, because their memory location can change then. However the
file browser's data model didn't allow clearing just these previews, so
previews from external assets would have to be reloaded from disk too,
causing the flickering.

Noticed we can trivially skip clearing of previews if there are no
assets from the current file anyway. This mitigates the issue quite a
bit until preview handling is rewritten, see #122439.
2025-03-04 18:04:28 +01:00
Jacques Lucke
ba4cf3f738 Cleanup: add clarifying comment at assert checking if vbo is empty
I've hit this a couple of times and disabling it always worked fine for me. So
it's good to make it more obvious that there is an actual bug instead of a
missed optimization.

Pull Request: https://projects.blender.org/blender/blender/pulls/135467
2025-03-04 18:03:59 +01:00
Miguel Pozo
d3ee449ca0 Fix: EEVEE: Handle multiple specialization constants variants
Correctly handle cases where multiple scenes with different
specialization constants are rendered concurrently.

Pull Request: https://projects.blender.org/blender/blender/pulls/135270
2025-03-04 17:41:26 +01:00
Hans Goudey
2d12dc4790 Merge branch 'blender-v4.4-release' 2025-03-04 11:40:58 -05:00
Hans Goudey
ebb916aa1e Fix: Missing label for unassigned node tools menu
The label was visually missing in menu search.

Pull Request: https://projects.blender.org/blender/blender/pulls/135461
2025-03-04 17:35:54 +01:00
Sean Kim
5b04b4ac18 Sculpt: Add Mask by Color to menu bar and enable redo panel
This commit adds the `sculpt.mask_by_color` operator to the 'Mask' menu item in Sculpt Mode. This
allows users to access it via operator / property search. Additionally, the Redo panel is exposed
for general usage.

Pull Request: https://projects.blender.org/blender/blender/pulls/135210
2025-03-04 17:33:45 +01:00
Jacques Lucke
c19a1d1fb9 BLI: new add_overwrite methods for Set and VectorSet
These methods can be useful when storing keys that contain more data than just
what affects their hash. This came up in #134000. `Map` already has a method
with the same name.

Pull Request: https://projects.blender.org/blender/blender/pulls/135456
2025-03-04 17:30:54 +01:00
Sean Kim
d6f885c408 Cleanup: Remove #ifdef blocks for Dyntopo edge code
At this point, it is unlikely that we will revert the changes made over
a decade ago to the Dyntopo edge splitting code. The old code will still
exist in the git history, but to improve readability, this commit
flattens out the blocks and removes the `#define` statements.

Pull Request: https://projects.blender.org/blender/blender/pulls/135410
2025-03-04 17:30:16 +01:00
Julian Eisel
5a29367325 Merge branch 'blender-v4.4-release' 2025-03-04 17:29:51 +01:00