Commit Graph

120055 Commits

Author SHA1 Message Date
Clément Foucault
1b130f651a Fix: Metal: Remove some more warning & errors
Fix by either changing the user level code,
or by removing the warnings that are not helpful.
2024-10-30 14:58:26 +01:00
Aras Pranckevicius
44ec81695c Fix #129325: VSE blur effect is biased for byte images
Lack of rounding in non-float images was leading to e.g. pure white
becoming just a tiny bit darker than pure white at some blur sizes.
2024-10-30 14:41:54 +02:00
Rob-Blair
dd334faa58 Fix #125024: Bevel offset - eliminate divide by 0.
From Rob Blair's PR https://projects.blender.org/blender/blender/pulls/126309 .
In the code that clamps the bevel amount, the existing code could get
a denominator of 0 (from a tangent of a certain angle).
This code uses a different calculation (diagram in the PR) that clamps
when the projections of four specific edges onto another edge consumes
the whole length of that edge.
2024-10-30 08:21:51 -04:00
Aras Pranckevicius
30d606ea86 Cleanup: cleaner initialization of VSE effects
This is not C anymore, no need to declare variables at start of function
2024-10-30 13:41:38 +02:00
Aras Pranckevicius
66889e4a41 Fix: VSE GaussianBlur effect using wrong allocation size
init_gaussian_blur_effect was allocating memory for sizeof(WipeVars)
instead of sizeof(GaussianBlurVars). Not a problem today since WipeVars
is slightly larger, but this is an accident waiting to happen.
2024-10-30 13:41:38 +02:00
Omar Emara
81cb127612 Compositor: Implement Mix RGB node for new CPU compositor
Reference #125968.
2024-10-30 14:32:10 +03:00
Omar Emara
4359a308dd Compositor: Implement Alpha Over for new CPU compositor
Reference #125968.
2024-10-30 14:31:26 +03:00
Omar Emara
03ec5b6cfb Compositor: Implement Combine Color for new CPU compositor
Reference #125968.
2024-10-30 14:30:46 +03:00
Omar Emara
51a6eb35c0 Compositor: Implement Separate Color for new CPU compositor
Reference #125968.
2024-10-30 14:29:49 +03:00
Campbell Barton
160e76cd9d Cleanup: remove unused function BM_mesh_active_elem_index_get
Getting the active index without knowing the element type
doesn't seem to have any practical use.
2024-10-30 15:47:43 +11:00
Campbell Barton
47926da31d Merge branch 'blender-v4.3-release' 2024-10-30 13:09:22 +11:00
James Fulop
42657cd1b6 Tests: add BLI_path_slash_* tests
Ref !127304
2024-10-30 13:07:33 +11:00
Hans Goudey
4b842b8330 Merge branch 'blender-v4.3-release' 2024-10-29 23:58:55 +01:00
Clément Foucault
7c979d6d40 Fix: Metal: Error caused by missing const_cast
Error introduced by 7dc43b7dd2
2024-10-29 23:55:24 +01:00
Hans Goudey
c4d22839b4 Cleanup: Typo in variable name, consistent naming 2024-10-29 23:48:22 +01:00
Hans Goudey
eaafe7218e 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:45:58 +01:00
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