Commit Graph

142129 Commits

Author SHA1 Message Date
James Fulop
42657cd1b6 Tests: add BLI_path_slash_* tests
Ref !127304
2024-10-30 13:07:33 +11:00
Campbell Barton
49242a6b68 Cleanup: remove unused "COMPAT_ENGINES" in panels
Their existence was misleading making it seem as if would hidden unless
they were listed here.
2024-10-30 12:05:25 +11:00
Campbell Barton
790fdd35b4 Fix hydra storm add-on not showing material preview
Check panels COMPAT_ENGINES contains BLENDER_EEVEE_NEXT.
2024-10-30 11:35:52 +11: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
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
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
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
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
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
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
Weizhen Huang
219e655119 Fix #129420: precision issue in light tree distant light angle
In volume segment, the minimal angle formed by the emitter bounding cone
axis and the vector pointing from the cluster centroid to any point on
the ray is computed via `dot(bcone.axis, point_to_centroid)`, see Fig.8.
in paper.
For distant light this angle is 0, but due to numerical issues this is
not always true. Therefore explicitly assign `-bcone.axis` to
`point_to_centroid` in this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/129489
2024-10-29 18:00:59 +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
Blastframe
7a9aab4574 Fix: Wrong Grease Pencil icons in context menu
Fix context menu using the wrong icon for Active Layer and
Grease Pencil Layer icons.

Pull Request: https://projects.blender.org/blender/blender/pulls/129450
2024-10-29 16:56:11 +01:00
Jörg Müller
97e9a722fc Fix #129162: High idle CPU usage with PulseAudio in Linux
Prevents the unnecessary calls to CPU intensive pulseaudio functions while the stream is corked.

Pull Request: https://projects.blender.org/blender/blender/pulls/129312
2024-10-29 16:19:07 +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
Hans Goudey
ef0e53d12b Fix: Exception with "Move to Nodes" and no geometry output
Caused by a stupid mistake with the wrong return type and an
undefined value in a Python function.
2024-10-29 14:20:32 +01:00
Campbell Barton
44e719cdf6 Fix missing lock in GHOST_SystemWayland::hasClipboardImage 2024-10-29 23:21:15 +11:00
Campbell Barton
3f6707efd0 Fix #129401: BMesh.clear() causes crash on garbage collection 2024-10-29 22:47:35 +11:00
Bastien Montagne
678e6adc52 Fix (bcon24 reported) FBX export: objects export order being unreliable.
Now always order exported objects by their names, regardless of their
source (collection, viewlayer, selection...).
2024-10-29 12:28:08 +01: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
Bastien Montagne
dd11978a33 I18N: Update UI translations from git/weblate repository (61be8de535853d8). 2024-10-29 11:35:53 +01:00
Patrick Mours
1da221659d Fix #129251: Broken OptiX denoiser output
Looks like some recent changes in the driver broke an assumption
the OptiX denoiser code in Cycles made about being able to set it up
with a different input size than later used to invoke it, which caused
broken output on older GPU architectures. This commit fixes that by
ensuring the input image size passed to `optixDenoiserSetup` matches
that passed to `optixDenoiserInvoke`, even when no tiling is used
(which is the common case).

Pull Request: https://projects.blender.org/blender/blender/pulls/129398
2024-10-29 11:29:22 +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
Campbell Barton
28a8486e2b Fix memory leak with PyConfig initialization 2024-10-29 18:25:21 +11:00
Campbell Barton
ccaf144e6d Cleanup: compare full platform name for "darwin"
Avoid checking a shortened prefix when it's not necessary.
2024-10-29 18:09:47 +11:00
Campbell Barton
731712e3a7 AUTHORS: add 1 new author (via override) 2024-10-29 14:43:10 +11:00
Campbell Barton
066c6f3674 Fix UBSAN warning caused by uninitialized memory use
Unwrapping warned that a non 0/1 boolean value was being set.

Initialize all members of PVert since they would be accessed
when duplicating a PVert causing the uninitialized memory to be read.
2024-10-29 14:36:13 +11:00
Sean Kim
f408531b9b Fix #129448: Undoing face set changes produces artifacts on dense mesh
Introduced in 60ab232afb

An incorrect subset of nodes was calculated as the code prior to this
commit was inspecting vertex indices instead of face indices.

Pull Request: https://projects.blender.org/blender/blender/pulls/129487
2024-10-28 22:52:40 +01:00
Hans Goudey
d87f604a0d Fix #129428: Sculpt undo crash after remesh with deform modifier
This "update object for edit" call is incorrect because it retrieves the
evaluated state for the object that the undo itself invalidates. The
object/modifiers must reevaluate before we rebuild the deformation
matrix array (which is the operation causing the crash).

Pull Request: https://projects.blender.org/blender/blender/pulls/129474
2024-10-28 22:40:46 +01:00
Julian Eisel
58a0b565cd Fix: Curves: Missing brush assets selector in curves sculpt mode
All sculpt and paint modes should have the brush selector asset shelf
popup in the tool settings header. For curves sculpt mode this was
missing. There's no good reason for this, probably just an oversight.
2024-10-28 18:23:43 +01:00
Julian Eisel
8b0206fa26 Fix: Grease Pencil: Brush selector shortcut missing in vertex paint mode
All sculpt and paint modes should bring up the brush selector asset
shelf popup on Shift+Spacebar. For grease pencil vertex paint mode the
shortcut was missing. I think it was added earlier, but only for the
grease pencil v2 keymap, the v3 one got merged later only.
2024-10-28 18:19:10 +01:00
Omar Emara
f0125f26fd Fix #129435: Bad Cryptomatte output in camera view
The Cryptomatte node produces a bad output when the viewport is in
camera view. That's because compositing is limited to the camera region
in that case, but the node assumes the full viewport size. To fix this,
only consider the compositing region instead of the full viewport.
2024-10-28 14:14:49 +03:00
Campbell Barton
d6d612dc46 Fix memory leak pasting images in Wayland 2024-10-28 12:38:22 +11:00
Campbell Barton
a312bfe6d5 Fix use of undefined variable in blend2json utility 2024-10-28 09:50:57 +11:00
Campbell Barton
59c52ef2cf Cleanup: remove unused import in CLI example 2024-10-28 09:36:28 +11:00
Campbell Barton
41cb811849 Cleanup: update the default theme
Re-generate the default theme from blender_theme_as_c.py
2024-10-27 23:24:21 +11:00
Campbell Barton
4ac25883a3 Update blender_theme_as_c to match renamed define 2024-10-27 23:22:13 +11:00
Campbell Barton
005d439264 Fix industry compatible keymap keys for spreadsheet region toggle
Ctrl bracket keys weren't used for toolbar/UI region toggling.
2024-10-27 22:45:43 +11:00
Sean Kim
1dd6cdb172 Fix #129334: Multires displays incorrectly in Sculpt mode with materials
Introduced in 853269aeb0

Prior to this commit, the PBVH partitioning process did not work
correctly for multires meshes with materials. Specifically, it failed
upon mapping the partitioned faces into their corresponding corners.

The rough process here is as follows:
* Flatten out the array of face indices into an array of corner indices.
* Sum up each `GridsNode` `prim_indices` corner count into an array.
* Create an `OffsetIndices` from these sums
* Use the `OffsetIndices` to slice the array created at the beginning
  to assign to each node.

However, this process requires that the main PBVH array of corner
indices has the same order as iterating over the nodes, which the
partitioning algorithm does not do.

To solve this, this commit iterates over the Node `prim_indices` `Span`s
in the same order that the nodes are stored when flatting out the
corner data, ensuring a correct mapping.

Pull Request: https://projects.blender.org/blender/blender/pulls/129392
2024-10-25 20:17:39 +02:00
Campbell Barton
98cae94f6b Fix potential out of bounds read in UTF8 string length calculation
The length checking wasn't accounting for null bytes within multi-byte
sequences and could step over the null bytes.

For BLI_strlen_utf8 this could result in an out of bounds read.

In practice most UTF8 data is validated so the extra checks
are mainly to prevent errors on invalid or corrupt UTF8 text.
2024-10-25 16:50:10 +11:00
Campbell Barton
259611ca4f AUTHORS: add 1 new author 2024-10-25 14:06:30 +11:00
Leon Marz
1a872e69f3 Fix terminating the EGL connection without a valid display
When wl_display_connect fails don't attempt to disconnect EGL,
no connection will have been made.

Ref: !129301
2024-10-25 13:55:06 +11:00
Campbell Barton
584b96018a Fix #128322: Pack Islands warnings & fails to use tool-settings
Ref !128757
2024-10-25 10:03:30 +11:00
Lukasz Czyz
85907199b7 Fix #127963: UV importance weights in minimum stretch randomly fails
Ref !128757
2024-10-25 10:03:22 +11:00
Campbell Barton
1cd2bece60 Fix memory leak on exit for bpy.app.translations members 2024-10-25 09:16:46 +11:00
Sean Kim
420a54a9e4 Fix #129373: Invalid "Cloth" asset shelf category appears in Sculpt mode
The catalog path was updated in
blender/blender-assets@88f1a1caf7 but was
not updated here, resulting in a category that had no effect when
toggled and was not visible in the larger tree view.

Pull Request: https://projects.blender.org/blender/blender/pulls/129387
2024-10-24 23:17:23 +02:00
Michael Jones
0f6a83202d Revert unintended change to tests/data
Revert unintentional tests/data change that happened in 029cd1f739
2024-10-24 11:12:25 +01:00