Commit Graph

120055 Commits

Author SHA1 Message Date
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
Omar Emara
0bff0cfe0f Compositor: Implemenet Vector Curves node for CPU
This patch implemenets the Vector Curves node for the new CPU
compositor.

Reference: #125968.
2024-10-22 11:37:56 +03:00
Lukas Tönne
71398478b2 Fix #128055: parentinv matrix uninitialized in old GPv2 files
In GPv2 the parentinv matrix is zero initially and only becomes valid
after setting the layer parent. This matrix must not be copied to the
GPv3 layers unless the parent is set.

In addition the parentinv matrix should also be computed when changing
the layer parent. This has been nominally added, except that a full
computation isn't possible without the actual grease pencil Object. This
means a local RNA property cannot update the parentinv matrix, this
needs to become a full-blown operator. The behavior now should be the
same as in GPv2 at least.

Pull Request: https://projects.blender.org/blender/blender/pulls/129304
2024-10-22 09:30:34 +02:00
Campbell Barton
0ae9ae736e Merge branch 'blender-v4.3-release' 2024-10-22 15:58:37 +11:00
Campbell Barton
f69fbb41c1 Fix #129225: Crash in modifiers & constraints with invalid enum values
Even though this is generally avoided, drivers don't prevent
invalid values being set. Further files from branches or files
written in the future may contain enum values not yet known.

Resolve by range checking enum values which are used to index arrays.
2024-10-22 15:56:58 +11:00
Campbell Barton
07880dd369 Merge branch 'blender-v4.3-release' 2024-10-22 13:20:24 +11:00
Campbell Barton
414b9fb96f Merge branch 'blender-v4.3-release' 2024-10-22 13:20:20 +11:00
Campbell Barton
1d6add574d Fix #129167: Operator search can hang for some operator names
RNA label & description truncation could cause invalid UTF8
which caused BLI_string_search to hang.

Resolve by ensuring truncation of RNA descriptions & labels never
truncates a multi-byte sequences.

The issue with BLI_string_search would still be good to resolve but can
be handled separately.
2024-10-22 12:47:39 +11:00
Campbell Barton
40b5a4da2b Fix misleading assertion message setting built-in operator values 2024-10-22 12:46:39 +11:00
Clément Foucault
c81745e4af Fix: Overlay: Shader test broken on Mac
The merge got wrong.
2024-10-21 22:17:55 +02:00
Jesse Yurkovich
79d468fe6b Cleanup: Use compile-time format string type for OBJ and PLY writing
The `fmtlib` text formatting library, when compiled in C++20 onwards,
requires that the incoming format string is a compile-time constant so
it's able to perform type checks against it[1]. The change here ensures
it can do so.

While we're not set to go to C++20 any time soon, this is a backwards
compatible change that can be done today and allows us to focus on the
harder fmt-related issues later.

No change in performance or functionality was observed.

[1] https://godbolt.org/z/qG5dsf7YG

Pull Request: https://projects.blender.org/blender/blender/pulls/129272
2024-10-21 21:20:43 +02:00
Clément Foucault
db56bcdbe9 Merge branch 'blender-v4.3-release'
# Conflicts:
#	source/blender/draw/engines/overlay/overlay_next_curve.hh
#	source/blender/draw/engines/overlay/shaders/infos/overlay_edit_mode_info.hh
2024-10-21 19:19:35 +02:00
Clément Foucault
4a83a58c82 Fix: DRW: Make submit without manager sync still valid
Fixes assert triggering during EEVEE render test.
2024-10-21 19:16:55 +02:00
YimingWu
5fff95f519 Fix: Grease Pencil: Add back support for stroke direction overlay
Since GPv3 shader currently uses particle strand/points shader, we
need to modify that slightly to display the grease pencil overlays.

This adds the missing `vflag` attribute to the edit gpencil batch.

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/128116
2024-10-21 18:47:24 +02:00
Clément Foucault
3035fd1c36 GPencil: Port geometry shader to primitive expansion API
This removes the need for the geometry shader and the
workaround path for Metal.

Note that creating 2 batches for each stroke might become
a bottleneck in bigger scenes. But currently the bottleneck
is always be the fill algorithm. It can be optimized further
if needed.

Rel #127493

Pull Request: https://projects.blender.org/blender/blender/pulls/129274
2024-10-21 16:25:24 +02:00
Jacques Lucke
8588e196c4 Merge branch 'blender-v4.3-release' 2024-10-21 15:48:06 +02:00
Jacques Lucke
7c7b8e1f28 Fix #129087: don't show empty panels in geometry nodes modifier
If a panel is detected to be empty, it is hidden automatically now.
This is the same behavior as in group nodes.
2024-10-21 15:47:16 +02:00
Jacques Lucke
b5eb379e81 Merge branch 'blender-v4.3-release' 2024-10-21 15:34:27 +02:00
Jacques Lucke
84ffe3720d Fix #129217: crash when switching geometry nodes to tool mode with active viewer
The viewer does not work without a context and the context is derived from `snode.id`.
2024-10-21 15:33:21 +02:00
Jason Fielder
4408628a94 Fix: Metal: Resource leak when closing before all compilation batches have finished.
Addresses the case when Blender is shutdown before the
parallel compiler has finished processing all the shader batches.
The parallel compiler destructor will now attempt to terminate all
of the outstanding batches and free the shaders.

Authored by Apple: James McCarthy

Pull Request: https://projects.blender.org/blender/blender/pulls/129172
2024-10-21 14:58:50 +02:00
Aras Pranckevicius
7567c07480 Merge remote-tracking branch 'origin/blender-v4.3-release' 2024-10-21 15:45:12 +03:00
Aras Pranckevicius
28ea1d2f7b Fix: VSE scopes crash on float images
Regression since a904db3ee7 ("skip no-op colorspace transforms for
float images"), the newly added do_display_buffer_apply_no_processor
function did not handle case of both source and destination being
float images. This happens when VSE produces a float image, and
you turn on a Waveform scope.

Pull Request: https://projects.blender.org/blender/blender/pulls/129293
2024-10-21 14:43:56 +02:00