Commit Graph

114347 Commits

Author SHA1 Message Date
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
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
Jesse Yurkovich
530396289a USD: make use of our valid() API for consistent validation
It was difficult to notice, but we weren't making use of the
`USDPrimReader::valid()` API calls during import.

In many(all?) cases this was fine as we would check the validity during
`read_object_data` or similar anyhow. Rather than just removing the API
entirely, this patch attempts to use it and has the following design:
- Where ever and whenever a reader is created, in addition to checking
  null, we should now also check for `valid()` This happens in
  `usd_capi_import` and `usd_reader_stage`.
- The `valid()` call is intended to check just the USD object status.
  Blender object checks are handled elsewhere (same as they are
  currently) since these objects are often not available at the time of
  the call to `valid()`

This has the benefit that we at least know that USD is valid before our
heavy reading code ever starts executing. Some duplicate checks are now
removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/129181
2024-10-28 23:00:40 +01:00
Sean Kim
e27530e4a2 Merge branch 'blender-v4.3-release' 2024-10-28 14:59:17 -07: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
Pablo Vazquez
9b7e660fad UI: Allow Region Overlap in Node Editor sidebar
Make sidebar see-through when Region Overlap
is enabled in the Preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/129466
2024-10-28 16:30:51 +01:00
Omar Emara
928794c6ac Cleanup: Remove dead code 2024-10-28 14:26:59 +03:00
Omar Emara
61eb3e06df Merge branch 'blender-v4.3-release' 2024-10-28 14:19:09 +03: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
Omar Emara
0a52f2203e Compositor: Implement Luminance Matte node for new CPU compositor
Reference #125968.
2024-10-28 12:56:10 +03:00
Omar Emara
1c19dc9b20 Compositor: Implement Distance Matte node for new CPU compositor
Reference #125968.
2024-10-28 12:55:25 +03:00
Omar Emara
04332ef6b8 Compositor: Implement Difference Matte node for new CPU compositor
Reference #125968.
2024-10-28 12:54:35 +03:00
Omar Emara
8b18831f9d Compositor: Implement Color Spill node for new CPU compositor
Reference #125968.
2024-10-28 12:53:50 +03:00
Omar Emara
cb977e2cbc Fix: Distance Matte DNA enum has wrong value
The enums for the Distance Mate node had wrong values that weren't
inline with RNA values. This patch corrects them and uses the enum in
RNA to be more robust in the future. The wrong values weren't used
directly, so this had no effect on the end user.
2024-10-28 12:49:20 +03:00
Clément Foucault
e9298dced4 GPU: Avoid ShaderCreateInfo object directly inside Map
This avoid uneeded big internal allocation for the map.
2024-10-26 13:51:45 +02:00
Sean Kim
af4974dfaa Cleanup: Remove dead code
Pull Request: https://projects.blender.org/blender/blender/pulls/129391
2024-10-25 20:19:33 +02:00
Sean Kim
71b9238703 Merge branch 'blender-v4.3-release' 2024-10-25 11:18:48 -07: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
Omar Emara
22930ee04c Compositor: Implement Color Matte for new CPU compositor
Reference #125968.
2024-10-25 11:25:55 +03:00
Omar Emara
ba5c6c8682 Compositor: Implement Chroma Matte for new CPU compositor
Reference #125968.
2024-10-25 11:25:55 +03:00
Omar Emara
a955c9e0b4 Compositor: Implement Channel Matte for new CPU compositor
Reference #125968.
2024-10-25 11:25:55 +03:00
Campbell Barton
c5df2cebed Merge branch 'blender-v4.3-release' 2024-10-25 16:52:00 +11: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
04aa583526 Tests: add UTF8 string copying tests for multi-character truncation
The existing test only checked truncation for a single multi-byte
code-point.

Also add defines for 5 and 6 byte UTF8 code-points.
2024-10-25 14:30:48 +11:00
Campbell Barton
6ad22ce40f Cleanup: move utf8 string copying tests into BLI_string_utf8_test.cc 2024-10-25 14:15:31 +11:00
Campbell Barton
054c26d291 Merge branch 'blender-v4.3-release' 2024-10-25 10:05:01 +11:00
Campbell Barton
51e9654ab2 Merge branch 'blender-v4.3-release' 2024-10-25 10:04:58 +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
129982daf8 Merge branch 'blender-v4.3-release' 2024-10-25 09:17:41 +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
7a45c89d7c Merge branch 'blender-v4.3-release' 2024-10-24 14:18:43 -07: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
Campbell Barton
70a7704641 Merge branch 'blender-v4.3-release' 2024-10-25 08:03:32 +11:00
Sean Kim
158f12db4d Cleanup: Document Sculpt PBVH debug_value usage
Pull Request: https://projects.blender.org/blender/blender/pulls/129360
2024-10-24 21:12:50 +02:00
Anthony Roberts
73974f7beb GPU Subdivision: Disable on Qualcomm GPUs on Windows
This resolves #124515 - albeit a little heavy handedly, as it disables 8cx Gen3 devices which work fine, but for the sake of code cleanliness, this should be okay.

Pull Request: https://projects.blender.org/blender/blender/pulls/129355
2024-10-24 11:55:48 +02:00
Omar Emara
ce0b3d9820 Refactor: Move common code into small functions 2024-10-24 11:13:07 +03:00
Alaska
0085ef0e59 Compositor: Increase Glare node max threshold
Increase the threshold of the glare node from 1000
to FLT_MAX to make it easier to use the glare node
with really bright pixels, like Nishita sky sun.

Ref: #129310

Pull Request: https://projects.blender.org/blender/blender/pulls/129343
2024-10-24 08:48:35 +02:00
Campbell Barton
1ba6b74cdf Fix error freeing null pointer on exit for debug builds
Changing comments to 'if 0' in [0] somehow caused null pointer
dereference on exit. Replace 'if 0' with C++ style comments to resolve.

[0]: 7b87c160f8
2024-10-24 14:04:32 +11:00
Campbell Barton
0475054b28 Merge branch 'blender-v4.3-release' 2024-10-24 12:54:12 +11:00
Campbell Barton
f23478439c Fix #129323: Slowdown adding/removing objects from Python
Python scripts could perform actions that created notifiers
which would not be handled until the script was complete.

In the case of adding & removing objects a notifier would be created
for adding the object, then cleared when the ID was removed.

This lead to the notifier queue filling up with cleared notifiers
which were included in the search whenever an ID was removed.

The result of this was that adding and removing objects from a script
would become increasingly slower & use more memory.

Resolve by storing the current notifier being handed which isn't freed
(only cleared). The notifier handling loop detects cleared notifiers
and frees them after use.
2024-10-24 12:50:31 +11:00
Omar Emara
8a02a5de56 Compositor: Implemenet Posterize node for new CPU compositor
Reference #125968.
2024-10-23 13:24:54 +03:00