Commit Graph

115392 Commits

Author SHA1 Message Date
Philipp Oeser
e104735eeb Fix: Grease Pencil: issues with the transform keyframes system
Oversight in 09d2108bf5

For one, numinput for keyframes would be broken unless the mouse is moved first.
Secondly, redo would also be broken (using the `Adjust Last Operation` panel or the `Repeat Last` operator).

Above commit did a check for `TRANS_RUNNING` before calling `grease_pencil_layer_update_trans_data`.
This isnt set in any of the above scenarios (it only gets set once the moues moves).

This PR removes `TRANS_RUNNING` check to have proper calls to `grease_pencil_layer_update_trans_data`.
It has one downside: you now get a `grease_pencil_layer_update_trans_data` as soon as you hit `G`.
So it does remove_frame / add_frame unnecessarily (since we are still on the same frame), but only once, sees harmless in comparison to the two regression it fixes.

Fixes #131092
Fixes #130793

Pull Request: https://projects.blender.org/blender/blender/pulls/131143
2024-11-29 15:40:51 +01:00
Omar Emara
4eb1b78d82 Fix: Compositor: Compile error with WITH_FFTW3 off 2024-11-29 15:23:49 +02:00
Omar Emara
b71338ba8d Compositor: Implement Glare node for new CPU compositor
Reference #125968.
2024-11-29 15:04:40 +02:00
Clément Foucault
7a73741157 Fix #131133: GPU: Navigation Gizmo sometimes doesn't display the axis lines
Alignment was incorrect if vertex format stride was bigger than
SSBO required alignment.
2024-11-29 12:50:52 +01:00
Guillermo Venegas
7f7f9e987f Fix #130817: Make resource pool to cycle when swapchain images are presented
Its not standard how `Present Engines` return images for presentation, and
currently is expected that they cycle between swap-chain images with each
`vkAcquireNextImageKHR` call.

However present engines could return any available image, that can mean
to reuse the last presented one if available. (This seem to be the behavior
using `Layered on DXGI Swapchain` the default `Present Method` used
with latest NVIDIA drivers on Windows).

Since resource pools expects to images to cycle in a sequential order, if any
present engine always return the same image for presentation only a single
resource pool would be used for each rendered frame, and since resources
are only released by cycling between resource pools, this resource pool would
overflow since it never releases any resource.

This changes makes resource pools to cycle each time a image is presented.

Pull Request: https://projects.blender.org/blender/blender/pulls/131129
2024-11-29 12:35:44 +01:00
Clément Foucault
4441987e05 Fix #131131: Overlay Next: Clip view crashes Blender
Was simply a missing access to global uniform.
2024-11-29 12:12:53 +01:00
Clément Foucault
6332be9700 GPU: C++ GLSL Stubs: Use unions instead of inheritance for swizzle
This avoid stack overflow on GCC because types were getting too
large (70 bytes for a float4) and created a lot of static
memory for UBOs declarations.
2024-11-29 12:00:01 +01:00
Jeroen Bakker
f5d9f65925 Fix: Overlay: Assert during bone selection in pose mode
Detected when testing `ellie_animation.blend`. When trying to select
bones the select_id_map is empty and would do an invalid resize of
the output buffer.

Pull Request: https://projects.blender.org/blender/blender/pulls/131140
2024-11-29 11:28:04 +01:00
Clément Foucault
95233986cb GPU: C++ GLSL Stubs: Add atomic sampler 2024-11-29 10:19:23 +01:00
Jeroen Bakker
71ec30fce9 Fix #131135: Vulkan: Crash closing window
When a main window contains a child window and the main window is closed
it can crash as the context isn't available when destructing the
VKFramebuffer of the child window.

Pull Request: https://projects.blender.org/blender/blender/pulls/131137
2024-11-29 09:11:13 +01:00
Jeroen Bakker
61d4f7359b Fix: Vulkan: Compiling issue
PR for colored debug groups didn't had the latest changes of main
2024-11-29 08:16:13 +01:00
Jiarui-Yan
b356c2bec1 Vulkan: Colored debug groups
This PR adds color to debug group so that RenderDoc can give color to different
debug groups and sub-groups in the parent debug group.

Ref: #124099

Pull Request: https://projects.blender.org/blender/blender/pulls/129340
2024-11-29 07:52:00 +01:00
YimingWu
73b7e8e256 Fix #131049: Line Art: Prevent stroke generation in locked target layer
Line art will not be able to insert any drawings into a locked target
layer, this fix prevent such situation from crashing Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/131073
2024-11-29 06:08:19 +01:00
Clément Foucault
c1bc1ef3ea GPU: C++ GLSL Stubs: Fix isinf / isnan 2024-11-29 00:37:45 +01:00
Clément Foucault
b39843e7b0 GPU: Use extern for non static expressions and use non zero value for gl_WorkGroupSize
Pull Request: https://projects.blender.org/blender/blender/pulls/131064
2024-11-28 23:23:30 +01:00
Clément Foucault
dd480ab604 GPU: Refactor the GLSL C++ stub swizzle implementation
This removes support for nested swizzling but avoid
warning about static member accesses through class
instance.
2024-11-28 23:23:27 +01:00
Harley Acheson
47492c7aa6 Fix #130385: Use Only Advance When Measuring Mono Text
When measuring text strings we consider both the advance and the glyph
bounding box. But monospaced text should only use the advance because
many fonts allow some mono characters to slightly overflow. This just
removes bounding box from the calculation of width for mono text.

Pull Request: https://projects.blender.org/blender/blender/pulls/131114
2024-11-28 20:14:59 +01:00
Clément Foucault
5982b5e75c Fix #130751: Overlay Next: Selected Outline highlight vanishes when face orientation enabled
Was caused by different drawing order. Use the legacy drawing order
until we find a better fix.

The better fix would be to render outline with depth.
2024-11-28 19:16:37 +01:00
Clément Foucault
5e97b5adc2 Sequencer: Use uchar4 colors for drawing quad buffer again
This partially revert the changes from
909b74e91f
2024-11-28 18:30:28 +01:00
Clément Foucault
5954898edf GPU: Add back support for uchar4 color when using widelines
This is still pretty useful as the data savings is not negligeable.

Also supports it for python.
2024-11-28 18:28:08 +01:00
Clément Foucault
ec84fe5fdb Fix #131091: GL: Weird Lines appearing in Gizmo Overlays
This happened because NVidia GPUs require higher alignment
for SSBO binds than for vertex inputs.

This is related to	#131103 which fixed it for vulkan.

Add a common capability option for that.
2024-11-28 17:22:12 +01:00
YimingWu
8fb12839f2 Grease Pencil: Add all supported modes to simplify operator
The stroke simplify operator was implemented at the beginning of GPv3
migration, which means it lacked a few other modes. This fix reused the
same code as in the simplify modifier to provide more simplify modes
back to the modifier so it can work just like GPv2.

Resolves #130616.

Pull Request: https://projects.blender.org/blender/blender/pulls/131076
2024-11-28 17:00:05 +01:00
Lukas Tönne
d8182421fa Fix #130635: Fill tool stroke projection incorrect in ortho mode
There are two bugs here:

1. Projection of mouse cursor into "image space" for starting a flood fill was
first trying to convert region coordinate to image coordinate, which was broken
for ortho mode. This isn't actually needed since the only purpose of the image
coordinate is to convert to layer space immediately. We can simplify by
computing layer space mouse cursor, _before modifying the region matrices_.

2. Projection of boundary pixels from image space to stroke positions in layer
space also has an offset. This is a bug in `ED_view3d_win_to_3d` which uses the
`viewinv` translation vector instead of the `persinv` translation. This only
works when the rendered region is symmetric around the view direction. This is
not the case when rendering flood fill images, which are shifted to make better
use of available pixel space. The `persinv` translation contains the region
shift. A new function has been added, rather than changing `ED_view3d_win_to_3d`
because many operators rely on the broken behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/130918
2024-11-28 16:38:17 +01:00
Jeroen Bakker
8e4502258a Fix: Vulkan: Misalignment sub-buffers immediate drawing
Since recently we bind immediate sub buffers as storage buffers to
extend the geometry for line drawing. We didn't add alignment checks and
that raised warnings. This change will fix those warnings.

Pull Request: https://projects.blender.org/blender/blender/pulls/131103
2024-11-28 16:31:58 +01:00
Christoph Lendenfeld
e52cb5e24b Fix #131045: Wrong UI range for edit bone head and tail
The issues was simply that the UI range for the RNA
property was set to 0. Fixed by setting to `-FLT_MAX`.

Pull Request: https://projects.blender.org/blender/blender/pulls/131099
2024-11-28 16:20:02 +01:00
Jeroen Bakker
c69b107a28 Fix #130121: Vulkan: Lightbaking resources freed to early
When lighting baking is used in a background render the resources are
freed to early. The cause is that light baking does some initialization
within a context, that isn't send to the GPU. The first iteration of
light baking is expecting that it can free resources, what leads to GPU
resources to be deleted that are still used by commands that are
scheduled to be send to the GPU.

This PR fixes this by using multiple resource pools when background
rendering and ensure that contexts are send to the GPU when rendering
ends.

Pull Request: https://projects.blender.org/blender/blender/pulls/131094
2024-11-28 16:05:59 +01:00
Jeroen Bakker
deff994123 Vulkan: Add support for GPU_logic_op_xor_set
Add support for Logic op XOR. This is used in image editors and tracking
editor. Logic ops is required on Linux and Windows, however for macOS it
will be disabled when using MoltenVK. MoltenVK has can be compiled with
support for logic ops, but that isn't the default as it relies on
private APIs.

When the workaround is enabled it will create artifacts when used.

Ref: #130347

Pull Request: https://projects.blender.org/blender/blender/pulls/131089
2024-11-28 15:12:13 +01:00
Clément Foucault
909b74e91f Fix: GPU: Assert due to new GPU requirements regarding wide lines
The formats was not using the correct attribute type.

Fixes assert in graph drawing and potential assert in cursor drawing
Fixes assert in sequencer and file browser
2024-11-28 12:42:17 +01:00
Raphael Langerhorst
f662caf722 Add RISCV CPU architecture support to build config
Remove assert statement from make_update.py, making it ready for any
architecture.

Add riscv 32, 64 and 128 bit cpu architecture with little/big endian
to Blender's BLI_build_config.h and Libmv's build_config.h

Tested (to compile) on riscv64 little endian machine.

Pull Request: https://projects.blender.org/blender/blender/pulls/130920
2024-11-28 12:37:26 +01:00
Falk David
9e28809695 Fix #130309: Grease Pencil: Smooth doesn't use correct smooth settings
The issue was that when the smooth operation is invoked using shift,
we create a smooth operation for the currently active brush (which
is probably not a smooth brush).

This fixes the issue by using the "Smooth" brush from the essentials
library when the smooth operations is invoked temporarily.

Pull Request: https://projects.blender.org/blender/blender/pulls/130963
2024-11-28 12:23:23 +01:00
Jeroen Bakker
faf2c6f0ca Vulkan: Add method to query debug group of node
When debugging render graph the debug group name can narrow down the
place where a node originates from. This PR adds a function to retrieve
the full debug group name of a specific node.

Pull Request: https://projects.blender.org/blender/blender/pulls/131081
2024-11-28 12:00:21 +01:00
Clément Foucault
601de8bfcb Fix: GPU: Assert due to new GPU requirements regarding wide lines
The formats was not using the correct attribute type.
2024-11-28 11:56:49 +01:00
Falk David
8b233f36db Fix: Grease Pencil: Crash in curves_merge_by_distance for cyclic curves
The issue was that the size of `distances_along_curve` was wrong for
cyclic curves. The fix increases the size by one for cyclic curves to
account for the last segment length.
2024-11-28 11:42:09 +01:00
Omar Emara
a9436b04b8 Fix: Compositor: Crash using Keying node in new CPU compositor
The Keying node crashes in the new CPU compositor because it was writing
to an output that shouldn't be computed and is thus unallocated.
2024-11-28 10:58:14 +02:00
Campbell Barton
4c34b25f56 Cleanup: quiet undeclared function warnings 2024-11-28 10:27:24 +11:00
Campbell Barton
979ad4cc9c Cleanup: remove redundant function 2024-11-28 10:20:59 +11:00
Campbell Barton
7f26812523 Fix bone duplication failing to update it's sub-targets
Regression in [0] attempted to access EditBones from the Bone list,
causing bone constraints fail to reference the sub-targets when
the bone and its target were both duplicated.

[0]: f025ff81fc
2024-11-28 10:13:06 +11:00
Aras Pranckevicius
3d7359a38f Fix #130969: OBJ import shading artifacts when file contains zero-area faces
When OBJ file contains vertex normals, this can in some cases confuse
the custom loop normals code inside Blender. Since it does not simply
just use custom normals, but rather projects them into "lnor space".
But that "lnor space" calculation can go haywire sometimes, when
degenerate faces are present in the input.

Mark zero-area faces as "sharp" before doing custom normals. This will
make them not try to share the "smooth fan" lnor space with other faces,
and things will look correct.

Previously, OBJ importer was (wrongly) always setting all faces
as "sharp", which avoided this problem, but caused other issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/131041
2024-11-27 22:03:15 +01:00
Miguel Pozo
1105f2573e Fix #130846: Workbench: X-Ray incoming vector
Regression from
9396c8f388
2024-11-27 21:26:52 +01:00
Sean Kim
4c1cb3be9d Fix: Filter Mesh crash when using operator panel
`CTX_data_ensure_evaluated_depsgraph` ultimately ends up freeing the PBVH
meaning that any associated data still held may be a use-after-free error.

Pull Request: https://projects.blender.org/blender/blender/pulls/131011
2024-11-27 20:57:23 +01:00
Miguel Pozo
a39bec7197 Fix: Overlay-Next: GP Points/Segments in edit modes
The previous code didn't support disabling them.
This is a copy of the Legacy behavior.
2024-11-27 20:52:49 +01:00
Sean Kim
b53a9a671d Fix #130783: Image editor tools do not set active brush
Missed in a38c96b92c

Pull Request: https://projects.blender.org/blender/blender/pulls/130946
2024-11-27 20:50:30 +01:00
Miguel Pozo
6e6b9abf55 Fix: Overlay-Next: GP Vertex paint points 2024-11-27 20:08:28 +01:00
Miguel Pozo
83dca75cdf Fix #130815: Overlay-Next: Disabled overlays still visible 2024-11-27 20:07:15 +01:00
Julian Eisel
a66a5a3f50 Fix #130882: Asset shelf filter by active tool option doesn't redraw 2024-11-27 18:53:05 +01:00
Clément Foucault
f08c2b8aa1 Fix: Overlay-Next: Wireframe display conflicting with edit cage 2024-11-27 18:45:31 +01:00
Omar Emara
292ad6b00e Compositor: Implement Keying node for new CPU compositor
Reference #125968.
2024-11-27 19:28:16 +02:00
Omar Emara
0efb0ce48e Compositor: Implement Dilate node for new CPU compositor
Reference #125968.
2024-11-27 19:28:16 +02:00
Omar Emara
b43c36e801 Compositor: Implement Morphological Distance Feather algorithm for CPU
Reference #125968.
2024-11-27 19:28:16 +02:00
Omar Emara
32186ca908 Compositor: Implement Morphological Distance algorithm for CPU
Reference #125968.
2024-11-27 19:28:16 +02:00