Commit Graph

120055 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Habib Gahbiche
84fb437355 Fix: Cage2d gizmo rotation handle stretches with rotation
The gizmo is drawn in the transformed space of the gizmo (see `GPU_matrix_mul(matrix_final)` in `gizmo_cage2d_draw_intern()`). This causes initial stretching of the drawn circle. However, this initial stretching is already being compensated by drawing an ellipse, which axes are computed based on the gizmo size (see variable `margin`).

Therefore, computing the size of the gizmo (`scale_xy`) based on render dimensions (`dims`) seems to be overcompensating and introduces another stretching. This patch removes the redundant compensation.

Pull Request: https://projects.blender.org/blender/blender/pulls/137079
2025-04-07 15:02:02 +02:00
Lukas Tönne
10e95bebca Fix #136615: Disallow writeback callbacks that are not cleared
Adding "writeback" callbacks to the depsgraph should be temporary, since these
callbacks can bind pointers that become invalid. In this case: the evaluated
nodes modifier bound by a bake node callback. These callbacks are cleared after
being added in the `deg_flush_updates_and_refresh` function, but there are other
cases where depsgraph updates are executed which don't support writeback
callbacks (`object_force_modifier_update_for_bind` run by the smooth modifier
"bind" function).

To prevent dangling invalid pointers in outdated callbacks, disallow adding
callbacks in any case other than the `deg_flush_updates_and_refresh` function.
Since callbacks can be added from any depsgraph update, the safest way to
prevent adding them is in the depsgraph itself. If the `use_writeback_callbacks`
flag is not set, any callback is simply discarded.

Pull Request: https://projects.blender.org/blender/blender/pulls/137083
2025-04-07 13:30:35 +02:00
Omar Emara
f49fd3fc92 Fix: Compositor does compute preview once enabled
The compositor does not compute node previews even after the user
enables previews using the eye operator in the node header. That's
because the operator does not tag the node for update. To fix this, tag
the node for a property update and submit relevant WM notifiers.

Pull Request: https://projects.blender.org/blender/blender/pulls/136985
2025-04-07 13:08:07 +02:00
Clément Foucault
9d06508837 Fix #137052: GPU: Crash on startup caused by legacy pyGPU API
The removed legacy API was still in used by the pyGPU API.
Add a deprecation warning instead.

This partially reverts commit 3179cb0069.
2025-04-07 12:27:48 +02:00
Habib Gahbiche
24faa4d856 Compositor: gizmo for box mask
A box mask can now be manipulated using a (rotated) rectangle gizmo.

Changes:
- Implementation is based on crop gizmo. Some functionalities were generalized for both crop and box mask (later should be used for ellipse mask as well)
- Support offset caused by transform nodes in compositor
- Support rotation for 2d gizmos

Note: a known issue about stretched rotation handle will be handled in a separate patch, see https://projects.blender.org/blender/blender/pulls/137079

Pull Request: https://projects.blender.org/blender/blender/pulls/122693
2025-04-07 12:18:40 +02:00
Pratik Borhade
ed59418d2d Cleanup: Grease Pencil: Remove v3 references
Remove v3 from tooltip, code comments

Pull Request: https://projects.blender.org/blender/blender/pulls/137078
2025-04-07 11:39:16 +02:00
Campbell Barton
c9c59cfa8e Cleanup: rename IMB_FTYPE_{IMAGIC=>IRIS} to confirm with other defines
Use the term IRIS to match the file naming for this format as well as
R_IMF_IMTYPE_IRIS.

Ref !137073
2025-04-07 09:23:49 +00:00
YimingWu
6977c15b51 Fix #134098: Grease Pencil: Use thinner lines for converting from Curves
Previously when converting from Curves to Grease Pencil, strokes will
take a default radius of 1.0f which is way too wide. Now assigned to
0.01f to be consistent with the radius when converting from legacy
curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/134109
2025-04-07 08:31:14 +02:00
Campbell Barton
6f09def038 Docs: correction to ".tx" description 2025-04-07 15:42:03 +10:00
Campbell Barton
15066403de Docs: cross reference imb_ext_image with known eImbFileType values
Justify inclusion of the extensions.
2025-04-07 08:09:44 +10:00
Campbell Barton
96181c5550 Revert "ImBuf: remove ".tx" extension from the list of supported images"
This reverts commit cf55a0acdc.

While this was added with the commit that added support for tile cache,
keep the extension check as Blender can load them.
2025-04-06 22:07:07 +00:00
Campbell Barton
1c702f9c94 Cleanup: assign the property flag to a variable 2025-04-06 10:48:36 +00:00
Campbell Barton
e85c18eb92 Cleanup: remove redundant casts 2025-04-06 20:39:39 +10:00