Commit Graph

117289 Commits

Author SHA1 Message Date
Hans Goudey
9a0d4dbd04 Fix #129504: Color smear brush performance regression
For cases where a small fraction of a PBVH node is processed,
missing skipping of vertices outside of the brush radius causes
a noticeable regression. Typically we tried to avoid this sort of
filtering because it should be redundant with lowering the BVH
node size and it interferes with some other code simplicity goals.
But adding factor filtering back is a very small change.
2024-10-29 23:45:38 +01:00
Hans Goudey
e247c358db Fix: Wrong change in refactor of paint smear brush
Mistake in 437cb33a73.
Found while investigating #129504. Personally I don't notice
a change in behavior, but the original code, as convoluted as it
was/is, clearly tried to iterate over neighbors of neighbors rather
than iterating over neighbors twice.

Pull Request: https://projects.blender.org/blender/blender/pulls/129557
2024-10-29 23:18:19 +01:00
Sean Kim
9a0b1f048f Merge branch 'blender-v4.3-release' 2024-10-29 14:55:42 -07:00
Sean Kim
aa937b1cab Fix #128859: Undoing sculpt with deform modifier active doesn't work
Prior to this commit, there was an attempt to remove extra data stored
at the Sculpt Undo `Node` level, specifically an extra position array
used when a deform modifier was in the stack.

The prior commit attempted to perform the undo step by calculating a
translation between the current positions and the previous unode
position and using that as the input to the deformation process.
However, this resulted in the undo not being completely applied to the
mesh and the data remaining in a weird state.

To fix this, this commit reintroduces some previously removed functions
and constructs to perform this restore step by swapping data if
necessary. We choose to not simply revert the change that applied this
as we want to eventually reinvestigate this path, but for the imminent
4.3 release, it makes more sense to restore previous behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/129496
2024-10-29 22:43:11 +01:00
Sean Kim
80f4b4806a Merge branch 'blender-v4.3-release' 2024-10-29 14:36:28 -07:00
Sean Kim
d1e78481e2 Fix #129519: Topology automasking stops working on multires level switch
The topology island cache needs to be freed when changing multires
levels so that it can be recalculated and be valid for a given level. To
fix this, this commit adds the `invalidate` call to the
`BKE_sculptsession_free_pbvh` method, which consolidates similar
lifecycle behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/129549
2024-10-29 22:32:53 +01:00
Sean Kim
0ca50a4372 Merge branch 'blender-v4.3-release' 2024-10-29 14:06:25 -07:00
Sean Kim
e48657eb8a Revert "Fix #126939: Smooth / Enhance Details brush crash when using tablet"
This reverts commit 304800db73.
2024-10-29 14:04:34 -07:00
Richard Antalik
04509992c5 Merge branch 'blender-v4.3-release' 2024-10-29 21:52:44 +01:00
Clément Foucault
7dc43b7dd2 Fix: Metal: Remove some more shader compilation warnings 2024-10-29 21:45:03 +01:00
Richard Antalik
1fadc4b5e3 Fix: VSE: Handle tweaking does not work when retiming key is selected
`select_handle` operator did return passthrough when retiming key was
selected. This was incorrect behavior. To prevent translating retiming
keys, retiming selection must be cleared as well.

Reported in #126273

Pull Request: https://projects.blender.org/blender/blender/pulls/129289
2024-10-29 21:20:21 +01:00
Sean Kim
26a741f7a3 Merge branch 'blender-v4.3-release' 2024-10-29 13:11:21 -07:00
Sean Kim
304800db73 Fix #126939: Smooth / Enhance Details brush crash when using tablet
Prior to this commit, the brush action was determined on a step by step
basis by peeking at the `StrokeCache` `bstrength` property and
determining which brush to use based on if the value was negative or
not. The sign of this value, however, was not static across the
entirety of a brush stroke, as it is calculated from three separate
fields, one of which could vary over the course of a stroke when using a
tablet, the `pen_flip` property.

To fix this issue, this commit ensures the `pen_flip` field is only
updated at the beginning of the stroke and also adds a new boolean to
store the initial direction of the stroke to reduce further ambiguity
when comparing the sign of the brush strength.

Pull Request: https://projects.blender.org/blender/blender/pulls/129184
2024-10-29 21:10:19 +01:00
Sean Kim
d1659c9bb3 Merge branch 'blender-v4.3-release' 2024-10-29 13:09:08 -07:00
Sean Kim
1bc5c488d4 Sculpt: Use unified color for paint brushes by default
With the introduction of brush assets, there are now two reasons that
motivate turning this setting on by default.

* More paint brushes - Previously, there was a single paint brush in
  Sculpt mode, this made the setting for general usage less needed when
  compared to the 10 brushes that are now included in the essentials
  pack

* Brush settings are lost on reload - Unless the changes to a brush are
  saved to the asset as a default, the color for a brush is now no
  longer persisted between Blender sessions. It makes little sense to
  save a specific color for a specific brush on the asset level unless
  it is needed for the brush functionality.

This commit ensures that the appropriate Scene flag is set for the
unified color and defines the default primary and secondary colors as
000000 and FFFFFF, respectively.

Pull Request: https://projects.blender.org/blender/blender/pulls/129127
2024-10-29 21:08:14 +01:00
Clément Foucault
1b8efd7d99 Fix: Metal: Remove some shader compilation warnings 2024-10-29 20:44:45 +01:00
Julian Eisel
c71a6a5304 Attempt to fix missing asset library refreshes 2024-10-29 18:27:32 +01:00
Clément Foucault
133f9a31bf Fix: Vulkan: Incorrect error logging
This was broken by the new filename hash and
line directives.

Parsing the filename hash and using the
same logic as GL fixes the issue.
2024-10-29 18:08:25 +01:00
Weizhen Huang
81590dab5e Merge branch 'blender-v4.3-release' 2024-10-29 18:01:41 +01:00
Anthony Roberts
3438bb8e3c Windows: Implement warning on Splash Screen regarding emulated builds on ARM64
This adapts the work initially done in #124382 to extend to Windows builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/129521
2024-10-29 17:44:30 +01:00
Julian Eisel
f49d0390a1 UI: Add asset browser option to sort by catalogs, new default
So far asset browsers always sorted assets by name, which resulted in
barely related assets being placed together, and related assets being
scattered. This can make navigating assets tedious, and introduces a lot
of visual noise because of scattered preview image styles.

Related assets are typically put into common asset catalogs, and related
catalogs are typically organized close to each other in the catalog
hierarchy. This makes catalogs a better characteristic to sort by,
solving the mentioned issues.

For asset shelves sorting by catalogs was introduced in 471378c666. This
PR exposes this feature to the asset browser, by introducing a new
option to sort either by name or by catalog. The new default is sorting
by catalog. Within a single catalog, assets are still sorted alphabetically.

Pull Request: https://projects.blender.org/blender/blender/pulls/129480
2024-10-29 16:58:49 +01:00
Sebastian Parborg
1d5a3ca129 Merge branch 'blender-v4.3-release' 2024-10-29 16:20:27 +01:00
Bastien Montagne
97f92a19b3 Cleanup: Better use references than copy by value for PointerRNA now.
While copying this used to be very cheap, this will soon be less
trivial.

Note that there are many more places where this type of cleanup will be
needed.
2024-10-29 16:10:35 +01:00
Bastien Montagne
94f71785e7 Cleanup: Use explicit defaults and value-initialization for TemplateID data.
Should prevent UBSan reports once PointerRNA/BPY refactor lands (!123435).
2024-10-29 15:24:50 +01:00
Falk David
18144705cf Fix #129353: GPv3: Crash when using Catmul-Rom curve type
Introduced by 5fff95f519.
The issue was that the `edit_points_vflag` buffer is of size `total_points_num`
which is based on the number of control points not evaluated positions.
The fix is to use `points_by_curve` instead of `points_by_curve_eval`
to get the right start and end indices.

Pull Request: https://projects.blender.org/blender/blender/pulls/129526
2024-10-29 15:12:20 +01:00
Omar Emara
3f464b9f14 Fix: Compositor RGB Curve factor input has wrong range
The Factor input of the compositor RGB Curves node has a wrong minimum
range of -1, while it should be 0. This is clamped during execution, so
it has no effect, but it is good to align UI with code.
2024-10-29 16:10:49 +03:00
Omar Emara
b81eb1aa03 Fix: Missing std qualifier for exp2 2024-10-29 16:10:15 +03:00
Omar Emara
1dd0493c5a Compositor: Implement Set Alpha for new CPU compositor
Reference #125968.
2024-10-29 16:06:33 +03:00
Omar Emara
04ab5e1bde Compositor: Implement Alpha Convert for new CPU compositor
Reference #125968.
2024-10-29 16:05:54 +03:00
Omar Emara
d1ce793147 Compositor: Implement Invert for new CPU compositor
Reference #125968.
2024-10-29 16:05:13 +03:00
Omar Emara
3aa5313a6d Compositor: Implement Hue Saturation Value for new CPU compositor
Reference #125968.
2024-10-29 16:04:26 +03:00
Campbell Barton
6fae671aa4 Merge branch 'blender-v4.3-release' 2024-10-29 22:48:37 +11:00
Campbell Barton
3f6707efd0 Fix #129401: BMesh.clear() causes crash on garbage collection 2024-10-29 22:47:35 +11:00
Omar Emara
e94bbc5436 Compositor: Implement RGB to BW for new CPU compositor
Reference #125968.
2024-10-29 14:41:18 +03:00
Omar Emara
67474133a5 Compositor: Implement Color Ramp for new CPU compositor
Reference #125968.
2024-10-29 14:41:18 +03:00
Omar Emara
caa68b06c7 Compositor: Implement Hue Correct for new CPU compositor
Reference #125968.
2024-10-29 14:41:18 +03:00
Omar Emara
017cced29d Compositor: Implement RGB Curves for new CPU compositor
Reference #125968.
2024-10-29 14:41:18 +03:00
Campbell Barton
51967feb67 Merge branch 'blender-v4.3-release' 2024-10-29 22:09:12 +11:00
Campbell Barton
a42c2afcc5 Merge branch 'blender-v4.3-release' 2024-10-29 22:09:09 +11:00
Campbell Barton
4c67973100 Cleanup: missing-declarations warning 2024-10-29 22:08:59 +11:00
Campbell Barton
f377333326 Fix #129503: unwrap with subsurf at level 1 disconnects triangles
Ref !129501
2024-10-29 22:02:38 +11:00
Julian Eisel
c4774134e9 Fix: UI: Assets catalog sorting in asset shelf mixes catalogs
Sorting assets by catalog was introduced for the asset shelf in
471378c666. Intention was to keep related/similar assets closer
together. But the sorting was based on the catalog name only, so
the catalog order didn't make much sense, and closer related assets
would still end up being separated by less related ones.

Instead the full catalog path should be compared, so that the hierarchy
is reflected better, and for example sibling catalogs follow each other.
This way related assets are actually placed in close proximity, as
initially intended.

Pull Request: https://projects.blender.org/blender/blender/pulls/129469
2024-10-29 11:39:14 +01:00
Hans Goudey
f9f77c582c Merge branch 'blender-v4.3-release' 2024-10-29 11:21:30 +01:00
Hans Goudey
5d548dc3a1 Fix #128958: UV unwrap crash with "Use Subdivision" option
When the modifier is disabled with level 0, the corner_vert array
wasn't properly created in the subdivided mesh. The simplest
solution is to just skip the subdiv processing for the unwrap when
the level is 0 and nothing would happen anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/129447
2024-10-29 11:20:30 +01:00
Omar Emara
8d4d59d0cd Compositor: Implement Exposure node for new CPU compositor
Reference #125968.
2024-10-29 10:46:39 +03:00
Omar Emara
3eab0a4ad0 Compositor: Implement Color Correction for new CPU compositor
Reference #125968.
2024-10-29 10:45:47 +03:00
Omar Emara
c6d4c759eb Compositor: Implement Color Balance node for new CPU compositor
Reference #125968.
2024-10-29 10:44:20 +03:00
Campbell Barton
c3b180ef92 Merge branch 'blender-v4.3-release' 2024-10-29 18:28:02 +11:00
Campbell Barton
28a8486e2b Fix memory leak with PyConfig initialization 2024-10-29 18:25:21 +11:00
Campbell Barton
99e52016ba Merge branch 'blender-v4.3-release' 2024-10-29 14:45:53 +11:00