Commit Graph

150077 Commits

Author SHA1 Message Date
Brecht Van Lommel
6db2c6b864 Revert: Part of "Fix: Build failures when using path with spaces"
Commit be63ebd961

This is causing issues with CUDA kernel compilation in some setups, even
though the builbot is ok. Since this isn't yet working for oneAPI anyway,
revert all the changes to Cycles kernel compilation for now.
2025-04-08 14:55:03 +02:00
Brecht Van Lommel
3b203aa71a Fix: ASAN error with Span.slice_safe with empty span
Happened running io_usd_import test.
2025-04-08 14:52:47 +02:00
Jeroen Bakker
22ae59d28d Vulkan: Include Win32 extensions definitions
Includes win32 specific extensions definitions when including
`vk_common.hh`. Inside `gpu_context.cc` vulkan needs to be
included before opengl, otherwise windows 10 builders will
report a warning.

```
[6421/7520] Building CXX object source\blender\gpu\CMakeFiles\bf_gpu.dir\intern\gpu_context.cc.obj
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared\minwindef.h(130): warning C4005: 'APIENTRY': macro redefinition
C:\Users\blender\git\blender-vexp\blender.git\lib\windows_x64\epoxy\include\epoxy/gl.h(59): note: see previous definition of 'APIENTRY'
```

Pull Request: https://projects.blender.org/blender/blender/pulls/137134
2025-04-08 14:10:01 +02:00
Jeroen Bakker
70995180ed Fix: Vulkan/OpenXR: Incorrect swapchain image layout
In the OpenXR/Vulkan specs it is mentioned that the swapchain layout
should be set to optimal color attachment. This wasn't the case and
could lead to validation errors.

Also fixes a memory size validation error. Not concerning as it was
abount already backed memory.

Pull Request: https://projects.blender.org/blender/blender/pulls/137143
2025-04-08 13:35:23 +02:00
Habib Gahbiche
0caa85a6b2 Cleanup: use node.is_type() instead of node.type_legacy
Pull Request: https://projects.blender.org/blender/blender/pulls/137136
2025-04-08 13:14:38 +02:00
Campbell Barton
0b369b6613 Cleanup: remove GHOST_TaskbarX11
This only worked for Ubuntu's discontinued Unity desktop.

Even though `libunity.so` can be used outside of Unity,
it's no longer actively developed.

Ref: !137128
2025-04-08 10:56:29 +00:00
Campbell Barton
3a51d140d8 Cleanup: remove WITH_X11_XF86VMODE since mode setting is no longer used
Setting the display mode was last used for the Game Engine
remove the CMake option WITH_X11_XF86VMODE and the associated code.

Ref: !137126
2025-04-08 10:56:27 +00:00
Jacques Lucke
3a7dc6ed7f Cleanup: improve comment 2025-04-08 12:29:02 +02:00
Jacques Lucke
2825eee715 Cleanup: include name in printed GeometrySet 2025-04-08 12:29:02 +02:00
Jacques Lucke
53072e7a67 Cleanup: remove unnecessary null check
The null check is not necessary, because the function does not fail
because `PyUnicode_Check` is used on the value already.
2025-04-08 12:29:02 +02:00
Jacques Lucke
82aa6a3b71 Cleanup: improve comment for GeometrySet.name 2025-04-08 12:29:01 +02:00
Jacques Lucke
9c89e9c6fd Fix: raise exception when passing arguments to GeometrySet constructor 2025-04-08 12:29:01 +02:00
Maxime-Cots
a4a4dc7da5 Compositor: Expose interpolation in Corner Pin node
This patch exposes an interpolation option to the Corner Pin node,
allowing to choose between Nearest, Bilinear, Bicubic, and Anisotropic.

Pull Request: https://projects.blender.org/blender/blender/pulls/123206
2025-04-08 12:13:47 +02:00
Philipp Oeser
2a36b613ca Fix #137135: Grease Pencil Join not reporting non-active layer
Reported because this operator relies on an active layer, now report an error if this is
not the case.

Pull Request: https://projects.blender.org/blender/blender/pulls/137138
2025-04-08 12:13:23 +02:00
Jeroen Bakker
566c3d0846 Fix: Vulkan/OpenXR: Crash when vulkan physical device not found
When using SteamVR without starting SteamVR, the physical device cannot
be found. This isn't reported to the user nicely. This change will
tell the user why OpenXR couldn't be started.

Note that the physical device can be created when SteamVR has already
launched. OpenGL will start SteamVR automatically, but seems Vulkan
isn't able to do that.
2025-04-08 11:30:29 +02:00
Sybren A. Stüvel
9605cbde6f Fix #137041: Bugs with Slotted Actions and the Available Keying Set
Make the 'Available' keying set look at the F-Curves for the assigned
slot, instead of the backward-compatible API (which only sees the F-Curves
for the first slot).

Pull Request: https://projects.blender.org/blender/blender/pulls/137131
2025-04-08 11:10:46 +02:00
Sybren A. Stüvel
a753d68271 Anim: remove 'name' spacing from Debug Channel List operator
Remove the space-padding from the channel name in the Debug Channel List
operator.

This is a follow-up commit after !137105, to present things a little
cleaner.
2025-04-08 10:43:58 +02:00
Sybren A. Stüvel
ac87a11ece Anim: expand the debug printing of animation channels with their settings
Expand the "Debug Channel List" operator so that it also shows the channel
settings. The setting name is printed in ALL-CAPS if it is on, and in
lower case letters when it is off.

Note that this operator is only available in debug builds of Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/137105
2025-04-08 10:41:03 +02:00
Jacques Lucke
d8a959f34a Cleanup: avoid error-prone function cast 2025-04-08 09:54:39 +02:00
Jacques Lucke
6f022e0530 Fix #137127: missing null check when accessing GeometrySet.mesh 2025-04-08 09:50:10 +02:00
Jeroen Bakker
6785c5e3b9 Cleanup: Vulkan: incorrect include statement
vk_samplers.hh included itself
2025-04-08 09:35:41 +02:00
Campbell Barton
ef22f22c25 UI: resolve glitch where resetting the theme left the old name
Co-authored-by: quackarooni <alfonsomartzii@gmail.com>
2025-04-08 17:33:42 +10:00
Campbell Barton
7657afc8cb Correct error in 5d3496625d 2025-04-08 15:43:38 +10:00
Campbell Barton
5d3496625d Fix: regression storing density in BMP I/O
Regression in [0] which broke support for writing DPI.

[0]: aa3bdfd76a

Ref: !137122
2025-04-08 05:40:43 +00:00
Campbell Barton
80f30211c6 ImBuf: support rendering BMP images with alpha
Support rendering to BMP images with alpha since OIIO supports this.
This was likely left disabled from when Blender's own BMP I/O didn't
support alpha.

Ref !137123
2025-04-08 05:38:59 +00:00
Campbell Barton
f459d97dfd Cleanup: remove unused full-screen support from GHOST
Remove full-screen support from GHOST API's.
Note that this only had back-end implements for X11 and WIN32.

This was last used for the Game Engine to run games full-screen,
removing as it's unused and it doesn't seem likely to be used in the
future.

This doesn't impact making Blender full-screen from the window menu
which uses a window decoration setting.

Ref: !137050
2025-04-08 05:18:57 +00:00
Campbell Barton
d19362df66 Cleanup: quiet unused variable warning 2025-04-08 15:18:53 +10:00
Campbell Barton
256d964879 Cleanup: avoid function casts for BlenderAppTranslationsType 2025-04-08 14:57:14 +10:00
Campbell Barton
a3bd06b4c8 Cleanup: sort cmake file lists 2025-04-08 14:09:15 +10:00
Campbell Barton
92fe84374d Cleanup: remove redundant calls to object & ID material resize
BKE_id_material_clear is already syncing other objects material length.
2025-04-08 14:03:28 +10:00
Zyq-XDz
cebffdfdfa Fix #136384: Separate by Material leaves objects without material slots
`BKE_id_material_clear` removes all materials for each linked objects.
However, the code doesn't sync the materials after resize.

Ref: !136863
2025-04-08 14:02:00 +10:00
Alaska
612f6697c5 Fix #137100: Extra version when reporting a bug from the crash window
This fixes a issue where the word "version" would be listed twice in
bug reports made from the new crash window feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/137119
2025-04-08 04:05:18 +02:00
Campbell Barton
01dc87d841 ImBuf: write the aspect ratio to EXR images
Only rendered EXR's had the aspect ratio written.
2025-04-08 10:14:36 +10:00
Campbell Barton
44fdc7cf8b Fix #137082: Wrong pixel aspect ratio for rendered output
Correct [0], where the density must "correct" the squashed dimension
using a lower density.

[0]: af1110fb3c
2025-04-08 10:14:36 +10:00
Harley Acheson
a21481cbdd UI: Allow Changing Editor Outline Width
The gaps between editors need to be selected and manipulated in order
to resize areas. How wide these need to be depends on the accuracy and
resolution of your pointing device. And also on the fine motor control
and visual acuity of the user. If you are using a tablet pen, touch
device, or are visually or physically challenged, then you need these
gaps to be wider. This PR allows a wide latitude in this.

Pull Request: https://projects.blender.org/blender/blender/pulls/126334
2025-04-07 21:15:20 +02:00
Martin-Vignali
7d75c5e2bc Movie: Add support for writing ProRes codec videos
ProRes is a common intra-frame codec in post-production work, supported
by a wide range of post-production software.

This PR adds support for direct output from Blender using the ProRes
codec from FFmpeg. Alpha is supported, along with 8 and 10-bit channel
images.

Co-authored-by: mvji <33432858+mvji@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/136405
2025-04-07 20:57:44 +02:00
Falk David
7b705d6e54 Fix #137043: Grease Pencil multi frame falloff not working correctly
The multi-frame falloff calculation had multiple issues.
It was also not the same as in 4.2 LTS.

This fixes the issues and should result in the exact same
falloffs as it did in 4.2 LTS.

Also resolves #137055.

Pull Request: https://projects.blender.org/blender/blender/pulls/137091
2025-04-07 18:22:41 +02:00
Hans Goudey
0b7b2e737f Fix: EEVEE motion blur broken after recent fix
Caused by 36130d5584.
That changed the order of the buffers in the surface batch.
I added an assert here so that won't happen again.

Pull Request: https://projects.blender.org/blender/blender/pulls/137104
2025-04-07 18:04:00 +02:00
Sybren A. Stüvel
06231cc8b3 Fix #136830: When multiple F-Curves are marked as active, only one is drawn
When multiple F-Curves have the `FCURVE_ACTIVE` flag set, only one of them
was drawn in the graph editor.

Only one F-Curve should be marked with this flag, but that's not something
the datamodel enforces. Because of that, it apparently is possible to get
into a situation where multiple F-Curves are marked as such. They are now
all drawn properly.

Pull Request: https://projects.blender.org/blender/blender/pulls/137102
2025-04-07 17:48:38 +02:00
Josh Belanich
5cb2b04c5c Fix #130914: Vulkan memory leak while resizing view-port
This PR implements dynamic viewport state for the Vulkan gpu backend.
By doing so, it fixes #130914.

The following high-level changes were made:

1. The pipeline pool no longer uses the viewport and scissor
    states to identify graphics pipelines, only the number of viewports
    and the number of scissors. Graphics pipelines are configured with
    dynamic viewport and scissor states upon construction.
2. The desired viewport and scissor configurations for drawing are set
    in the data of the draw nodes in the render graph.
3. The draw nodes use these viewport and scissors settings in
    `build_commands`. If the viewport and scissor settings have changed
    between nodes, then vkCmdSetViewport and vkCmdSetScissor commands
    are sent to the command buffer.
4. Tests are updated to verify that set_viewport and set_scissor commands
   are executed the correct number of times. (Also note that I needed to
   #136987 in order to avoid skipping some Vulkan tests).

See the attached screencast for verification. The number of graphics pipelines
no longer grow when resizing the viewport.

Pull Request: https://projects.blender.org/blender/blender/pulls/137002
2025-04-07 17:26:13 +02:00
Josh Belanich
65512c0f5c Tests: Adjust gtest filter to avoid skipping some Vulkan tests
Removes '/' prefix from gtest filter for parameterized tests. This prefix
was causing tests in fixtures like VKRenderGraphTestScheduler and
VKRenderGraphTestRender to be skipped in `make test`.

Only parameterized tests with an InstantiationName will have a '*/' in
their names as part of a prefix. But according to the spec, InstantiationName
is optional, and if not set it wont generate prefixes. In these cases, the
gtest_filter produced will not match the test names, and cause `make test`
to not run the tests.

Removing this '*/' prefix should still match any tests with a non-empty
InstantiationName.

Pull Request: https://projects.blender.org/blender/blender/pulls/136987
2025-04-07 16:45:07 +02:00
Hans Goudey
cf6ee877a0 Modifiers: Simplify displace modifier custom normals access
`BKE_mesh_normals_loop_to_vertex` is redundant with `Mesh::vert_normals()`.
Also fix the use of "true normals" vs. "normals".
2025-04-07 10:42:10 -04:00
Brecht Van Lommel
be63ebd961 Fix: Build failures when using path with spaces on macOS
Use VERBATIM to ensure spaces inside command line arguments don't get
escaped automatically.

On Linux and Windows the oneAPI kernel compilation still has problems.
There is an apparent bug with single quote escaping in add_custom_command
which means it's not easy to use VERBATIM.
2025-04-07 16:29:14 +02:00
Brecht Van Lommel
4970bac061 Tests: Properly disable tests when data directory is missing
And clean up cmake output to be less verbose.
2025-04-07 16:29:14 +02:00
Brecht Van Lommel
ea13b19738 Cleanup: Compiler warning about initialization order 2025-04-07 16:29:13 +02:00
Brecht Van Lommel
10b49cd6c6 Cleanup: Compiler warnings with GCC
This showed: argument 1 range [18446744071562067968, 18446744073709551615]
exceeds maximum object size 9223372036854775807.

It seems to think signed integers might lead to this kind of overflow,
but it's unclear why these two cases are causing warnings specifically.
Refactor the code to sidestep it.
2025-04-07 16:29:13 +02:00
Clément Foucault
13bf095c18 Fix #137022: EEVEE: Shadows on reflection planes render incorrectly
This was caused by the cross product changing
sign in view space during planar lightprobe capture.

This can be avoided by making sure the view matrix
doesn't change handedness.

Pull Request: https://projects.blender.org/blender/blender/pulls/137092
2025-04-07 16:27:31 +02:00
Sybren A. Stüvel
9b1a34e83e Fix #136947: Duplicate Action Slot doesn't duplicate animation data
The "new/duplicate" button in the Action Slot selector did not actually
duplicate, and always acted as a "new" button.

This introduces the RNA function `ActionSlot.duplicate()`, which takes
care of duplicating all the animation data associated with the slot as
well. The semantics of this function should remain valid in the
future, when Actions support multiple layers & strips. Note that this
new function does not assign the slot, it just duplicates it and its
data. The assignment of this duplicated slot is done in Python,
through the already-existing API for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/137087
2025-04-07 16:14:49 +02:00
Miguel Pozo
a5ed5dc4bf GPU: Support deferred compilation in ShaderCompilerGeneric
Update the `ShaderCompilerGeneric` to support deferred compilation
using the batch compilation API, so we can get rid of
`drw_manager_shader`.
This approach also allows supporting non-blocking compilation
for static shaders.

This shouldn't cause any behavior changes at the moment, since batch
compilation is not yet used when parallel compilation is disabled.

This adds a `GPUWorker` and a `GPUSecondaryContext` as an easy to use
wrapper for managing secondary GPU contexts.

(Part of #133674)
Pull Request: https://projects.blender.org/blender/blender/pulls/136518
2025-04-07 15:26:25 +02:00
Omar Emara
47471ca2b0 Fix: Crash when sampling Float2 images
Blender crashes when using math interpolation functions to sample Float2
images. That's because 3 components is intentionally left out of various
switch case. To fix this, we handle 3 components and assert for expected
components count.

Pull Request: https://projects.blender.org/blender/blender/pulls/137094
2025-04-07 15:25:15 +02:00