Commit Graph

142695 Commits

Author SHA1 Message Date
Campbell Barton
0c8177f710 Merge branch 'blender-v4.3-release' 2024-10-29 14:45:57 +11:00
Campbell Barton
99e52016ba Merge branch 'blender-v4.3-release' 2024-10-29 14:45:53 +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
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
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
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
Campbell Barton
8682e4087b GHOST/Wayland: support pasting images from a copied file
Support pasting images into Blender which have been copied from a
file manager (matching macOS).
2024-10-28 13:40:26 +11:00
Campbell Barton
d367e6e2b5 Cleanup: share clipboard paste logic between text & image paste
De-duplicate low level logic that reads the clipboard in a thread.

Instead, expand the utility function for reading from the clipboard
with arguments so it can be used for images & text.
2024-10-28 13:40:25 +11:00
Campbell Barton
eb83158325 Cleanup: move URI range extraction into its own a function 2024-10-28 13:40:23 +11:00
Campbell Barton
e31366c3bb Merge branch 'blender-v4.3-release' 2024-10-28 13:33:28 +11:00
Campbell Barton
d6d612dc46 Fix memory leak pasting images in Wayland 2024-10-28 12:38:22 +11:00
Campbell Barton
c72076aec8 Merge branch 'blender-v4.3-release' 2024-10-28 09:52:18 +11:00
Campbell Barton
a312bfe6d5 Fix use of undefined variable in blend2json utility 2024-10-28 09:50:57 +11:00
Campbell Barton
f1eb98c427 Merge branch 'blender-v4.3-release' 2024-10-28 09:38:05 +11:00
Campbell Barton
59c52ef2cf Cleanup: remove unused import in CLI example 2024-10-28 09:36:28 +11:00
Campbell Barton
f13ca4dad0 Merge branch 'blender-v4.3-release' 2024-10-27 23:26:31 +11:00
Campbell Barton
901da07c59 Merge branch 'blender-v4.3-release' 2024-10-27 23:26:26 +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
88b76bfd1c Merge branch 'blender-v4.3-release' 2024-10-27 22:49:20 +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
Campbell Barton
1cf7781596 Cleanup: quiet Python warnings from ruff 2024-10-27 22:35:58 +11:00
Campbell Barton
f3ae90ec96 Cleanup: remove unused function, unused import 2024-10-27 22:35:55 +11: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
d60f2012c7 Merge branch 'blender-v4.3-release' 2024-10-25 14:08:42 +11:00
Campbell Barton
f9ba08d14c Merge branch 'blender-v4.3-release' 2024-10-25 14:08:40 +11:00
Campbell Barton
259611ca4f AUTHORS: add 1 new author 2024-10-25 14:06:30 +11:00