Commit Graph

114326 Commits

Author SHA1 Message Date
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
Omar Emara
471c30fdd9 Refactor: Return cached image by value
Return cached image by value for consistency with other cached
resources.
2024-10-23 13:13:38 +03:00
Campbell Barton
05128991ec Merge branch 'blender-v4.3-release' 2024-10-23 19:50:09 +11:00
Campbell Barton
9a252c2e73 Fix #127097: Extension preferences crashes after "import multiprocesing"
Remove a workaround for #23871 which manipulated the module
to prevent classes defined in the text editor from having their
name-space cleared.

This caused the "multiprocessing" module to store the "__main__" module
as "__mp_main__" for later use.

Accessing attributes from this module would then attempt to read from
with a null "mp_dict" which crashed. This happened when showing the
extensions preferences but would have occurred if "__mp_main__" was
accessed from elsewhere too.

Resolve by removing the workaround since it has not been needed
since Python 3.2.
2024-10-23 19:45:57 +11:00
Campbell Barton
73fc8950f3 Merge branch 'blender-v4.3-release' 2024-10-23 16:14:08 +11:00
Campbell Barton
26d34d3bfc Fix #128312: Incorrect defaults for gizmo properties 2024-10-23 16:12:33 +11:00
Campbell Barton
cfc645901f Cleanup: use type hints for discover_nodes.py 2024-10-23 13:18:36 +11:00
Campbell Barton
4a69ede005 Cleanup: spelling in strings 2024-10-23 13:14:37 +11:00
Campbell Barton
7b87c160f8 Cleanup: spelling in comments 2024-10-23 13:14:35 +11:00
Campbell Barton
7cacd0da46 Cleanup: suppress unknown source files from "make check_cmake" 2024-10-23 12:37:51 +11:00
Campbell Barton
6dedfe15f8 Merge branch 'blender-v4.3-release' 2024-10-23 12:29:58 +11:00
Campbell Barton
1d1da80c08 Merge branch 'blender-v4.3-release' 2024-10-23 12:29:55 +11:00
Campbell Barton
1d286a1b93 Fix #129302: GIL not released if poll_message_set was passed a string
Regression in [0].

Co-authored-by: Jorn Visser <git@jornvisser.com>

[0]: ebe04bd3ca
2024-10-23 12:25:57 +11:00
Clément Foucault
6cc4e51e0a Fix: GPU: Shader error line broken for NVidia drivers
Previously the source was not set and would always return 0.
Now it correctly returns the filename hash.
2024-10-22 23:31:52 +02:00
Philipp Oeser
ef6a035884 Fix #129200: Transfer Mode operator can be used on already active object
If source and destination objecs are the same, we can just early out
(dont even need a report message for this I think).

Pull Request: https://projects.blender.org/blender/blender/pulls/129208
2024-10-22 21:03:30 +02:00
Omar Emara
53fa6f0d0a Compositor: Implement Map Value node for new CPU compositor
Reference #125968.
2024-10-22 17:43:17 +03:00
Omar Emara
278787aeee Compositor: Implemenet Map Range node for new CPU compositor
Reference #125968.
2024-10-22 17:42:28 +03:00
Omar Emara
1bd64e873e Fix: Corrupt image when compositor is canceled
When the compositor is canceled mid-execution, the image node will get
corrupt in future executions in new CPU execution mode. That's because
the image node treated cached images as an intermediate results that can
be passed through, while they should be treated as external resources
since they are managed by the static cache manager.

This patch fixes that by adding another variant of wrap_external that
takes a Result and wraps its data, then we use that in the Image node.
2024-10-22 17:37:30 +03:00
Howard Trickey
eba2aff295 Revert "Rob-Blair-ready" - committed before tests ready.
This reverts commit 8b94e21976.
2024-10-22 14:57:56 +02:00
Howard Trickey
8b94e21976 Rob-Blair-ready
Copying PR 126309 from Rob-Blair so that I can try to make the tests pass.

Co-authored-by: Rob-Blair <Rob.Blair@Verizon.net>
Pull Request: https://projects.blender.org/blender/blender/pulls/129313
2024-10-22 14:52:30 +02:00
Omar Emara
c8dd6650db Merge branch 'blender-v4.3-release' 2024-10-22 11:54:27 +03:00
Omar Emara
cce896fe11 Fix #127292: Cryptomatte passes are missing meta-data
Meta-data are missing on Cryptomatte layers in the GPU compositor, so
they do not get saved using the File Output node. This is due to a use
after free error where a temporary string is used in the meta-data
population logic. This is fixed by assigning the string to a temporary
variable instead.

Thanks to Jorn Visser for finding the cause of the issue.
2024-10-22 11:50:04 +03:00