Commit Graph

141650 Commits

Author SHA1 Message Date
Jeroen Bakker
4d8581c7ee Vulkan: Add node to update buffers
This change adds the option to update a buffer via the render
graph via `vkCmdUpdateBuffer`. This is only enabled for
uniform buffers as they are small and aligned/sized correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/128416
2024-10-01 14:22:56 +02:00
Jonas Holzman
01e96b3422 macOS: Enable clang-tidy Objective-C checks
This commit improves macOS Objective-C code linting and developer
experience by enabling clang-tidy Objective-C checks. The full list
of objc-* checks can be found here:

https://clang.llvm.org/extra/clang-tidy/checks/list.html

As these checks are pretty simple and non-invasive, they have all
been kept enabled. Currently, enabling this series of checks does
not introduce any new clang-tidy warnings in the current Objective-C
code.

Pull Request: https://projects.blender.org/blender/blender/pulls/128334
2024-10-01 14:13:40 +02:00
Jeroen Bakker
9dfb49d16b Vulkan: Fix incorrect access flag
Detected by latest vulkan validation layers.

Pull Request: https://projects.blender.org/blender/blender/pulls/128417
2024-10-01 14:06:41 +02:00
Jeroen Bakker
71b7dd8079 Vulkan: Remove core 1.2 extensions
Vulkan backend registered extensions that were already part of Vulkan
1.2 core. These extensions don't need to be registered.

Pull Request: https://projects.blender.org/blender/blender/pulls/128408
2024-10-01 13:40:13 +02:00
Sybren A. Stüvel
5b9de19345 Anim: respect group parameter of rna_struct.keyframe_insert() func
Add support for `rna_struct.keyframe_insert(…, group="name")` parameter,
when inserting keys into a layered Action.

This simply was never implemented, and the default channel group name
was always used.

Pull Request: https://projects.blender.org/blender/blender/pulls/128383
2024-10-01 10:27:36 +02:00
Sybren A. Stüvel
23d3f692f6 Anim: clean up keyframe insertion unit test
Clean up a keyframe insertion unit test I just committed, as it had some
commented-out code that shouldn't have been commented out. The test
logic could also be simplified, as the complexity was necessary for
replaying the broken test case, but not necessary for testing the actual
underlying behaviour.

No functional changes.

Ref: 2dba943341ce7a7706c3865b4b7b1cfc5d6bb746
Pull Request: https://projects.blender.org/blender/blender/pulls/128379
2024-10-01 10:22:59 +02:00
Kevin Chuang
9f4da19800 Vulkan: Add support for VK_KHR_fragment_shader_barycentric
This PR introduces support for the extension `VK_KHR_fragment_shader_barycentric`,
and includes a few miscellaneous improvements related to it.

1. Add support for `VK_KHR_fragment_shader_barycentric`, if the physical device
  supports it. Otherwise, gpu_BaryCoord is generated through an injected geom
  shader, like it was previously.
2. Simplify the logic of checking has_geometry_stage in vert shader.
3. Fix a potential issue of location mismatch in an injected geom shader.

Related to #127687
Resolves #126228

Pull Request: https://projects.blender.org/blender/blender/pulls/127995
2024-10-01 09:32:59 +02:00
Jeroen Bakker
0eff22dd2a Fix #128258: Vulkan: Memory leak preview job rendering
When performing preview job rendering the memory wasn't recycled leading
to a memory leak. For background rendering we already recycled memory in
a correct way. This change enables the same branch during preview
rendering.

Also adds a better `VKDevice::debug_print` to see the resources being
tracked by the different threads and resource pools.

Pull Request: https://projects.blender.org/blender/blender/pulls/128377
2024-10-01 09:09:42 +02:00
Campbell Barton
729004390d Cleanup: quiet pylint warnings for extensions 2024-10-01 16:07:05 +10:00
Campbell Barton
38c30c5c43 Extensions: resolve test failing
Enable the extensions add-on by default, without this, it's enabled
on startup, causing the preferences to be tagged as modified.
2024-10-01 15:36:54 +10:00
Campbell Barton
08203a6048 Core: don't save an empty recent files (when no file exists)
Avoid creating redundant files when running tests & automated tasks.
2024-10-01 15:36:53 +10:00
Campbell Barton
a7ab81d927 PyAPI: remove use of BaseException
BaseException was used as a catch-all in situations where it
didn't make sense and where "Exception" is more appropriate
based on Python's documentation & error checking tools,
`pylint` warns `broad-exception-caught` for e.g.

BaseException includes SystemExit, KeyboardInterrupt & GeneratorExit,
so unless the intention is to catch calls to `sys.exit(..)`,
breaking a out of a loop using Ctrl-C or generator-exit,
then it shouldn't be used.

Even then, it's preferable to catch those exceptions explicitly.
2024-10-01 13:18:46 +10:00
Campbell Barton
22cdf8da1e Extensions: only apply SSL workaround for Python older than 3.12.6
Skip the workaround for versions of Python that contain the fix.
2024-10-01 13:06:05 +10:00
Campbell Barton
9f072ecefb Cleanup: remove unused exception values 2024-10-01 10:30:04 +10:00
Campbell Barton
58fe7c9b22 Cleanup: remove unused imports, exception values 2024-10-01 10:24:22 +10:00
Campbell Barton
4c36f9a566 Cleanup: simplify attribute access
Avoid getattr(..) when values are know to exist.
2024-10-01 10:23:04 +10:00
Campbell Barton
0afce08c20 Cleanup: use Python format specifiers 2024-10-01 10:14:48 +10:00
Campbell Barton
6cbdf0223b Cleanup: defer imports on startup 2024-10-01 10:01:16 +10:00
Campbell Barton
c6fd26a3f5 Cleanup: spelling in comments 2024-10-01 09:59:33 +10:00
Campbell Barton
b3a9ca2ac2 Cleanup: remove unused variable 2024-10-01 09:54:29 +10:00
notrudyyy
8d11882d07 Fix #128257: Crash when using Set Vertex Colors with no brush
The issue is due to a null pointer dereference in the call to
`IMB_colormanagement_srgb_to_scene_linear_v3` in
`vpaint_get_current_col` in `paint_vertex.cc`.
`BKE_paint_brush_for_read` returns a null pointer and as a result
`brush_color` points to the zero page, thus causing a null pointer
dereference and hence the access violation exception.

Normally, users should not be able to have no brush selected inside
vertex paint mode. Instead of adding null checks everywhere, this
commit protects against this case by switching the poll method to
check for a brush before allowing execution.

Pull Request: https://projects.blender.org/blender/blender/pulls/128260
2024-10-01 00:04:53 +02:00
quackarooni
44fbd69317 Function Node: Value to String Integer subtype
This patch adds an `Integer` type to the Value to String node.
This allows for converting integer inputs into string outputs without
any loss of precision. Something which the original implementation is
not able to do.

This issue becomes evident at values greater than `2 ^ 24` or
`16,777,216`, where the precision loss is high enough that the float
implementation starts skipping certain integers.

Pull Request: https://projects.blender.org/blender/blender/pulls/128362
2024-09-30 23:10:41 +02:00
Harley Acheson
89d7f00ff8 UI: Fix Editor Highlight Top Bar
New editor highlighting (#116684) will sometimes highlight a nearby
area when hovering over the Top Bar. This is caused by the use of the
top-left corner for testing. This just uses the region midpoint
instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/128394
2024-09-30 22:17:56 +02:00
Jesse Yurkovich
69a936f9f3 Hydra: Update Storm reference images with recent changes 2024-09-30 13:07:31 -07:00
Xavier Hallade
284b89a0a3 Cycles: oneAPI: compile kernels with fast-relaxed-math
This enables most of the GPU compiler's optimizations while -ffast-math
isn't set at DPC++ level.
It brings an overall 1% speedup and currently doesn't change the unit
tests pass rate.
2024-09-30 21:40:00 +02:00
Colin Basnett
22d78c5a8e Geometry Nodes: add Matrix Determinant node
Pull Request: https://projects.blender.org/blender/blender/pulls/128212
2024-09-30 21:30:10 +02:00
Jacques Lucke
8f30c25207 Geometry Nodes: add panel for generated geometry on foreach zone
The panel makes the separation of the main geometry and generated geometry
outputs more obvious.

Pull Request: https://projects.blender.org/blender/blender/pulls/128382
2024-09-30 21:28:20 +02:00
Sean Kim
71033685f6 Fix #128272: Plane Trim applies to incorrect vertices
Missed in 68ef1d6f36

Affects all brushes that use the Plane Trim option:
* Clay Strips
* Multiplane Scrape
* Flatten
* Fill
* Scrape

Pull Request: https://projects.blender.org/blender/blender/pulls/128391
2024-09-30 21:20:40 +02:00
Jacques Lucke
f97fb87212 Cleanup: make utilities for node warnings more reusable 2024-09-30 21:18:08 +02:00
Harley Acheson
5bb7f06409 Fix #127825: Do Not Clear Recent Item If File Not Found
When attempting to load a blend file that is not found or otherwise
invalid we are currently showing an (ugly) popup menu report and then
clearing the item from the Recent Files list. Clearing the list could
be unwanted in the case of files that are temporarily offline. And we
now have the ability to only clear "Items not found" using the "Clear
Recent Files List" operator. This PR removes that clearing.

Pull Request: https://projects.blender.org/blender/blender/pulls/127882
2024-09-30 21:03:09 +02:00
Jacques Lucke
ee348d2bff Fix: missing grease pencil data after duplicate elements or realizing instancecs 2024-09-30 18:31:36 +02:00
Omar Emara
60bb3b6677 Fix #124737: Scale To Render size is not precise
The Scale node in the Scale To Render size mode is not precise in case
of the use of render size percentage. This is due to floating point
imprecisions and we mitigate it by rounding instead of flooring after
multiplying by the percentage.
2024-09-30 18:58:13 +03:00
Pablo Vazquez
d601c21f2f UI: Use Grease Pencil object icon for Dope Sheet
Use the Grease Pencil object icon for the mode selector in Dope Sheet.

Pull Request: https://projects.blender.org/blender/blender/pulls/128385
2024-09-30 17:57:20 +02:00
Omar Emara
1b392ef016 Fix #127093: Kuwahara node produces NaNs
The Kuwahara node produces NaNs if the pixels have a very high local
standard deviation and sharpness is also high. This is because the
weighted sum of the Kuwahara sectors can have a zero total weight, which
causes zero division. To fix this, we return the original color if the
total weight is zero.

Pull Request: https://projects.blender.org/blender/blender/pulls/128378
2024-09-30 17:29:44 +02:00
Jacques Lucke
b22a1499a4 Geometry Nodes: remove "Zone" from menu entries
This was accepted in #128384. The term "zone" is known well enough now
that it's not really necessary to show it in the menu anymore.
2024-09-30 17:09:00 +02:00
Jacques Lucke
70cdfabf79 Geometry Nodes: shorten foreach zone menu entry
This changes the name from `For Each Geometry Element` to just `For Each
Element`. While we might have more foreach zones in the future, it's not clear
yet whether the longer name will be necessary to differentiate the zones. So
better just use the better looking name for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/128384
2024-09-30 17:04:36 +02:00
Julian Eisel
12b50ccb50 Assets: Update assets repository hash for essentials library updates
Asset catalogs for the essentials asset library were changed, see
88f1a1caf7f0.
2024-09-30 16:53:17 +02:00
Bastien Montagne
60908e8819 Refactor: Move bone eyedropper to C++ allocation.
Similar to what was already done for all other eyedroppers a few weeks
ago, part of pre-steps to make PointerRNA non-trivial.
2024-09-30 16:37:11 +02:00
Julian Eisel
88085accf7 Fix: Missing fill tool default brush in grease pencil draw mode
Apparently the name of the default fill brush in the essentials asset
library was changed in 9dfd0a171f.
2024-09-30 16:23:32 +02:00
Falk David
4c17ccbf56 GPv3: Add functions to copy parameters of layers and groups
Adds `BKE_grease_pencil_copy_layer_parameters` and
`BKE_grease_pencil_copy_layer_group_parameters` to copy
the parameters of layers and layer groups without copying
the data.
2024-09-30 16:20:43 +02:00
Falk David
be3e5e979f GPv3: Add function to copy GreasePencil parameters
Adds a kernel function to copy only the `GreasePencil` parameters
and not the layer tree or drawings.
2024-09-30 16:20:43 +02:00
notrudyyy
fcc263162d Fix #128087: EEVEE: Position render pass not in viewport shading panel
Adds Position Render pass to Render Pass enum in Viewport Shading popup for EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/128136
2024-09-30 16:20:14 +02:00
Julian Eisel
2a1004f7af Fix #128335: Activating brush from asset shelf sets tool, but not brush
We'd first set the brush, then change tools, which would again set the
brush to what it was before (switching tools tries to remember its last
used brush). Instead, switch the brush after switching the tool.

Also added a brush API check to test if the brush is valid for the
current mode, so that we don't end up switching tools in that case. This
matches previous behavior where this would be checked as part of setting
the brush already, causing the function to early exit before the tool is
changed.
2024-09-30 16:19:06 +02:00
Dalai Felinto
dc7645ff95 Extensions: Manifest polishing
* Match name with the extension ID.
* More strict double comment for optional parameters.
* Comment out tag since it is optional.
* More complete explanation for the paths_exclude_pattern.
2024-09-30 16:15:43 +02:00
Jacques Lucke
f839266b78 Geometry Nodes: support dynamic sockets and separators in panels 2024-09-30 16:07:36 +02:00
Lukas Stockner
f96f3c33af Cycles: Add some more math optimizations
This enables three additional math optimizations:
-ffp-contract=fast (enables FMA generation)
-freciprocal-math (enables x/y -> x*(1/y))
-fassociative-math (enables e.g. a*b + c*b -> (a+c)*b)

These are used on Windows and HIP anyways, so our code can't expect exact IEEE
semantics in any case.

The only difference between the new set and -ffast-math is that we don't use
-ffinite-math-only since this causes issues with the BVH (see ce1f2e271d) and
breaks e.g. isnan.

This causes a ~1.5% speedup in my very quick test, but might be higher for some
more math-intensive cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/128342
2024-09-30 15:58:40 +02:00
Lukas Stockner
908d3c387f Cleanup: Cycles: Deduplicate math optimization flags
The only difference between Windows+Clang and the others is a prefix, so use
some CMake logic to just prepend that to all flags instead of duplicating them.

Pull Request: https://projects.blender.org/blender/blender/pulls/128342
2024-09-30 15:58:38 +02:00
Lukas Stockner
5f4c18c0bb Cycles: Apply SSE4.2 minimum regardless of compiler
We require it on all x86 platforms, so now it's assumed on all compilers that
support it.

Pull Request: https://projects.blender.org/blender/blender/pulls/128342
2024-09-30 15:58:36 +02:00
Lukas Stockner
de80c24ed4 Cleanup: Cycles: Rename CYCLES_x_KERNEL_FLAGS to CYCLES_x_FLAGS in CMake
Pull Request: https://projects.blender.org/blender/blender/pulls/128342
2024-09-30 15:58:31 +02:00
Lukas Stockner
442d99fe03 Cleanup: Cycles: Split vectorization and optimization CMake build flags
These aren't really related to each other, and not separating it caused
some issues - for example, enabling NATIVE_ONLY would disable math
optimizations.

Pull Request: https://projects.blender.org/blender/blender/pulls/128342
2024-09-30 15:58:29 +02:00