Commit Graph

120055 Commits

Author SHA1 Message Date
Pablo Delgado Krämer
94285011b0 MaterialX: Support sheen distribution input for Microfiber/Zeltner
Implement !108869 for MaterialX.

Pull Request: https://projects.blender.org/blender/blender/pulls/134126
2025-02-18 12:16:00 +01:00
Pratik Borhade
42ce049194 Fix: Grease Pencil: vgroup_select operator not working
Mistake in 8c01a59411. Jump to next drawing instead of
exiting the loop when valid group with deformverts is not found.
Found this bug during !134695

Pull Request: https://projects.blender.org/blender/blender/pulls/134734
2025-02-18 11:02:55 +01:00
Pratik Borhade
a03dd37dfe Merge branch 'blender-v4.4-release' 2025-02-18 15:18:23 +05:30
Pratik Borhade
179169d6c7 Fix #134505: Bevel redo panel closes when defining profile
Caused by 1bde901bf2
`UI_BTYPE_CURVEPROFILE` button has undo flag set. see button-layout in:
`edbm_bevel_ui() -> uiTemplateCurveProfile()`.

This  forces an undo push with the help of `ui_apply_but_undo/ui_apply_but_funcs_after`.
To handle the situation, skip undo push for buttons in hud region.

Pull Request: https://projects.blender.org/blender/blender/pulls/134552
2025-02-18 10:43:51 +01:00
Christoph Lendenfeld
996d19d4b3 Fix #129967: Annotations in the VSE not showing in Dope Sheet
The issue was that with the move to Grease Pencil v3,
annotations and normal GP use different IDs and support to show annotations
wasn't added back in.

This makes it so annotation keys are shown if "Only Show Selected" is disabled,
which works in the Dope Sheet and in the timeline.

In order to not show annotations of the scene twice, the scene-specific code is removed.
The annotations are now shown in a more generic way.

Pull Request: https://projects.blender.org/blender/blender/pulls/134565
2025-02-18 10:33:53 +01:00
Pratik Borhade
19631cae8a Fix #134428: Switching Animation Slots does not update node UI
Node region is not tagged to redraw when animation slot is changed.
`action_slot` RNA prop has `NC_ANIMATION`notifier set, use the same in
`node_region_listener` to tag region redraw.

Pull Request: https://projects.blender.org/blender/blender/pulls/134435
2025-02-18 10:33:23 +01:00
Pratik Borhade
73a9a024f9 Fix #134380: Error adding a torus after hiding a collection
This reverts 06a2617107.
Commit has introduced few errors from user perspective (#134277) and
python side (#134380). Best to revert it now then handle the bug fixes later.

The error in #134380 was due to `context.layer_collection` and
`active_layer_collection` returning excluded collection.

Pull Request: https://projects.blender.org/blender/blender/pulls/134546
2025-02-18 10:05:59 +01:00
Harley Acheson
c3a2af00be Merge branch 'blender-v4.4-release' 2025-02-17 20:27:18 -08:00
Harley Acheson
9aeb97ccea Cleanup: Improved Comments in ui_def_but_rna__menu
Nothing but improvements to comments in this area of code to better
explain the complexity of Emum list row and column calculation. These
things change wrapping and column count to suit available space and
needs better explanation.

Pull Request: https://projects.blender.org/blender/blender/pulls/134719
2025-02-18 05:26:12 +01:00
Campbell Barton
a7924c3b65 Cleanup: quiet unused variable warning in release builds 2025-02-18 13:28:36 +11:00
Hans Goudey
4cd3540579 Point Cloud: Implement separate operator
Similar to existing operators, moves the selected
geometry to a new object.
2025-02-17 21:21:14 -05:00
Harley Acheson
f1514b45e3 Merge branch 'blender-v4.4-release' 2025-02-17 18:13:17 -08:00
Harley Acheson
b39bb42b3a Fix #134271: Reflow Non-Categorized Enum Lists Only If Necessary
For non-categorized lists, rather than always trying to find optimal
rows and columns, revert to prior behavior and only reflow if needed,
when the calculated rows are greater than maximum rows. This is less
disruptive, has less changes at small sizes where this doesn't matter.
Yet still does the job when things get too large to fit, or the list
is very long.

Pull Request: https://projects.blender.org/blender/blender/pulls/134713
2025-02-18 03:12:10 +01:00
Jason C. Wenger
59d72a8f7d Mesh: grid-fill now supports replacing existing faces
The existing behavior of the grid fill operator requires a loop of
boundary or wire edges to be selected. This algorithm tries to fit a
grid of quads into the edge loop. It also works if you select two of the
four 'rails' of an edge loop.

This new behavior allows running grid fill after selecting faces.
If the algorithm sees that a set of faces are selected, it separates
all the faces, and then attempts to grid from their exterior boundary
using the exact same logic it normally uses for interior boundaries.
This all assumes the user has selected a set of faces with an outside
border that works with grid fill. (has one clear exterior loop with an
even number of edges) If not, grid fill will halt, and notify the user
of the error, exactly the way that it already did before.
Once the grid fill is complete and successful,
the existing faces which were replaced get deleted.

UVs (including at UV island boundaries) are interpolated properly,
as are custom-data on verts, edges, faces, and face corners.
At the edges of the selection, the edges/faces/face corners that are
selected contribute, but the custom-data outside the selection does not.

This also resolves non-deterministic behavior.
The previous behavior of `edbm_grid_fill_prepare` found the vertex with
the largest angle, then walked the edge loop until it found one out of
the three best remaining corners. This established one edge of the grid
area, and the second edge was found by symmetry.
However, the direction that the algorithm walked the loop
(and therefore which second corner was found) was essentially arbitrary.

The new behavior first finds the vert with the largest angle,
then finds the vert with the second largest angle,
(after excluding the diagonally opposite corner from the first vert),
and selects the edge between those two verts.

Ref !129318.
2025-02-18 12:40:00 +11:00
Jason C. Wenger
6ca324e790 Fix BMesh split-op failing to output boundary & isovert_map slots
These were defined but never written to.

Part of !129318.
2025-02-18 12:24:01 +11:00
Harley Acheson
dda9a30a83 Fix #134594: Show Overlay FPS in a brighter color
With 5956752eb7 the "red alert" color is in the theme. But it is hard
to select a single color that works well for backgrounds and text
colors. This PR lightens the color when used for text overlay showing
the FPS. This must be quite bright as we favor using a contrasting dark
outline.

Pull Request: https://projects.blender.org/blender/blender/pulls/134700
2025-02-18 02:18:19 +01:00
Hans Goudey
b62ba4af33 Fix: CSV import node ignores last character of some columns 2025-02-17 20:14:54 -05:00
Jason C. Wenger
6a4e7edf8a Fix BMesh split-op failing to output boundary & isovert_map slots
These were defined but never written to.

Part of !129318.
2025-02-18 12:09:05 +11:00
Andrej730
48abc7aabc PyAPI: document never none pointer/collection properties
Set never null for pointer props automatically during RNA generation.

Ref: !126755
2025-02-18 11:27:19 +11:00
Hans Goudey
b4c9b3e87f Cleanup: Move transform editors module to C++ namespace
Pull Request: https://projects.blender.org/blender/blender/pulls/134701
2025-02-18 01:27:04 +01:00
Hans Goudey
59fad71a47 Fix: Copy caches in point cloud "nomain to main" function
Previously the bounds and BVH caches were incorrectly not updated.
2025-02-17 18:39:47 -05:00
Dalai Felinto
ec6383de96 Point Cloud: Delete operator
Note: The point cloud bounding box is not being updated once the points are deleted.

This is a known issue with BKE_pointcloud_nomain_to_pointcloud and Hans is looking into it.

Code inspired/built based on the Delete Geometry node.

Pull Request: https://projects.blender.org/blender/blender/pulls/134622
2025-02-18 00:28:14 +01:00
Dalai Felinto
dec8bf8e76 Point Cloud: Implement edit mode undo system
Implement a basic undo system making use of implicit
sharing to avoid copies for stored attribute arrays.

Functionally this has no benefit over memfile undo,
but current undo system architecture requires each
edit mode to implement an undo type.

(Reviewed and co-authored by Hans Goudey)

Pull Request: https://projects.blender.org/blender/blender/pulls/134623
2025-02-17 23:11:31 +01:00
Harley Acheson
b36f9b3f2e Merge branch 'blender-v4.4-release' 2025-02-17 11:04:24 -08:00
Harley Acheson
37c0b2c47d Fix #134592: Node Editor space_*_get Unregistered Tree Type Returns
When needing a friendly title and icon for windows and screen areas we
use SpaceType callbacks. For Node editors this could crash for custom
node trees that are unregistered. node_tree_type_find returns nullptr
since this custom tree type is not in the map. In this case just return
translated "Node Editor".

Pull Request: https://projects.blender.org/blender/blender/pulls/134692
2025-02-17 20:03:22 +01:00
Hans Goudey
947658d1b2 Refactor: Simplify CustomData functions by requiring ImplicitSharingInfo
Previously we generally expected CustomData layers to have implicit
sharing info, but we didn't require it. This PR clarifies that we do
require layers with non-null data to have implicit sharing info. This
generally makes code simpler because we don't have to have a separate
code path for non-shared layers. For example, it makes the "totelem"
arguments for layer freeing functions unnecessary, since shared data
knows how to free itself. Those arguments are removed in this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/134578
2025-02-17 19:44:54 +01:00
Clément Foucault
a6364eae75 DRW: Make vertex format threadsafe
Wrapping the vertformat into lambda expression to make
them threadsafe.

Pull Request: https://projects.blender.org/blender/blender/pulls/134685
2025-02-17 18:24:31 +01:00
Hans Goudey
dd03a322fe Point Cloud: Implement selection pick operator 2025-02-17 12:11:07 -05:00
Hans Goudey
45094542ff Point Cloud: Implement duplicate operator 2025-02-17 12:11:07 -05:00
Hans Goudey
901b18d17b Point Cloud: Add cached full points BVH tree
Instead of rebuilding the BVH tree every time it's requested.
2025-02-17 12:11:06 -05:00
Clément Foucault
00c3b564b8 Fix: EEVEE: Unitinialized gpu::Batch array content
This lead to a crash in many cases at destruction time.
2025-02-17 17:49:07 +01:00
Bastien Montagne
1b989a3b91 Merge branch 'blender-v4.4-release' 2025-02-17 17:33:15 +01:00
Guillermo Venegas
f0d6391bd9 Fix: quiet warning const qualifier is applied to a function type
This avoids to adding const to the function type in a function pointer
while enabling `Span<FunctionType*>(Span<FunctionType*>)` ctor.

`Span<const FunctionType*>` should be considered invalid.

The warning: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4180?view=msvc-170

Pull Request: https://projects.blender.org/blender/blender/pulls/134425
2025-02-17 16:28:56 +01:00
Guillermo Venegas
f2b6b6c232 UI: Prevent button vector reallocations on redraws
A bunch of reallocations can be avoided this way, usually the amount of buttons
is quite similar over redraws.

Pull Request: https://projects.blender.org/blender/blender/pulls/134580
2025-02-17 16:03:45 +01:00
Omar Emara
8dbd607df5 Merge branch 'blender-v4.4-release' 2025-02-17 16:57:36 +02:00
Omar Emara
003fb98f9d Fix #134567: Compositor memory leak in some setups
The compositor leaks memory in certain setups where a transformed result
is linked to two inputs in the same pixel node. This happens due to an
overestimation in the computation of reference counts of those results.
Since pixel operations might share the same input for multiple links in
the node tree, the reference count should be corrected to take that
sharing into account.

This sharing was previously accounted for as part of releasing inputs in
the pixel operation, but input processors didn't take that into account,
so the realize on domain input processor would leak memory. So to fix
this, we correct the reference count at the evaluator level instead,
such that input processors can safely operate on the correct reference
count.

Pull Request: https://projects.blender.org/blender/blender/pulls/134666
2025-02-17 15:55:22 +01:00
Clément Foucault
2cd15cdfef Overlay: Remove static GPUVertFormat
Makes this code threadsafe
2025-02-17 14:53:18 +01:00
Clément Foucault
b73c06ada0 Fix: Metal: Avoid overriding GPU matrices after shader bind
This was a bad usage of the Matrix API.
This fixes 2D and 3D cursor being broken on Metal.
2025-02-17 14:47:15 +01:00
Jeroen Bakker
51dc3063bf Merge branch 'blender-v4.4-release' 2025-02-17 14:14:45 +01:00
Jeroen Bakker
ed5b077f92 Fix #134634: Overlay: Mask not drawing on top of render result/viewer
Logical error in the overlay engine. Moved mask drawing before the early
exit for viewer/render results.

Pull Request: https://projects.blender.org/blender/blender/pulls/134660
2025-02-17 14:14:12 +01:00
Jacques Lucke
cb96dc34fa Merge branch 'blender-v4.4-release' 2025-02-17 12:38:50 +01:00
Clément Foucault
5b6f4d4759 Cleanup: DRW: Remove unused API functions
Pull Request: https://projects.blender.org/blender/blender/pulls/134461
2025-02-17 12:37:53 +01:00
Jacques Lucke
78b5c47c46 Fix #134669: crash because of dangling socket declaration pointer 2025-02-17 12:37:23 +01:00
Clément Foucault
d3b3cbec84 Sequencer: Move 2D cursor drawing from DRW to sequencer using IMM API
This avoid the dependency on the draw module and remove the
access to a global variable.

# Conflicts:
#	source/blender/editors/space_sequencer/space_sequencer.cc
2025-02-17 12:37:19 +01:00
Clément Foucault
38ce310c17 Overlay: Move 3D cursor drawing to the overlay engine
This is the more logical place and remove the use of the global
batch cache.
2025-02-17 12:36:34 +01:00
Clément Foucault
28ad3736e8 DRW: Move cube batch generation to GPU module
Avoid access on global DRWShapeCache and still
share the code for batch creation.
Each module is then responsible owner of their
own batch.
2025-02-17 12:36:34 +01:00
Clément Foucault
e55897448a DRW: Move sphere batch generation to EEVEE
Avoid access on global DRWShapeCache.
2025-02-17 12:36:34 +01:00
Clément Foucault
c91d60cda5 DRW: Move procedural batch to GPUContext
This remove relying on a global for storing
the batch and allow for more streamlined usage
of procedural drawing.
2025-02-17 12:36:34 +01:00
Clément Foucault
db920add50 Cleanup: DRW: Remove unused functions and batch inside the shape cache
These are not used since Overlay next that handles its own shape cache.
2025-02-17 12:36:33 +01:00
Richard Antalik
2a44bdfbd0 Refactor: Use C++ types for vectors strip image transform code
All 2D vectors related to image transform code were changed to float2.
Previously, it was decided, that 4x4 matrix should be used for 2D
affine transform, but this is changed to 3x3 now.

Texture painting code did rely on `IMB_transform` with 4x4 matrix.
To avoid large changes, I have added function
`BLI_rctf_transform_calc_m3_pivot_min`.

Main motivation is cleaner code - ease of use of c++ API, and avoiding
returning values by arguments.

Pull Request: https://projects.blender.org/blender/blender/pulls/133692
2025-02-17 11:23:00 +01:00