Commit Graph

114025 Commits

Author SHA1 Message Date
Jeroen Bakker
da767bcbdc Fix: Vulkan: Enable interleaved tests
Interleaved tests where disabled for Vulkan, but interleaving has been
implemented. This PR enabled these tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/129957
2024-11-07 14:00:51 +01:00
Jacques Lucke
fee02cc224 Fix #129871: converting linked text to mesh results in empty mesh
Similar to other bugs caused by ada367a0e9 (e.g.
ff9de2f7da9dcec96692355a67a7e7e280c223a7), the issue is that the object is
tagged for changes before retrieving its evaluated state.

I can't say I fully understand the all the code path for the object conversion
already. However, the change seems to make sense based on the `/* other users
*/` comment right above the change.  Also, the selected object is tagged again
further down in my test anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/129948
2024-11-07 14:00:21 +01:00
Jeroen Bakker
e0f699abdb Fix: Vulkan: Read & write outside of bounds
When running test cases
`test_texture_roundtrip__GPU_DATA_10_11_11_REV__GPU_R11F_G11F_B10F`
would read and write outside of allocated memory. This is an error in
the test case itself the GPU API doesn't have a public function to get
the desired byte and component size.

Pull Request: https://projects.blender.org/blender/blender/pulls/129958
2024-11-07 13:59:53 +01:00
Jeroen Bakker
91960b07db Fix unreported: Vulkan: Memory leak
When exiting Blender the list of devices was not freed, leading
to a memory leak.

Pull Request: https://projects.blender.org/blender/blender/pulls/129956
2024-11-07 13:59:07 +01:00
Lukas Tönne
dc04d9abc7 Fix (unreported): GPv3: Incorrect user count for drawing at index 0
The `GreasePencil::update_drawing_users_for_layer` function was using an
incorrect drawing index check, skipping over drawing 0 every time.
As a consequence the first drawing may have zero users despite at least
one frame referencing it.

Pull Request: https://projects.blender.org/blender/blender/pulls/129955
2024-11-07 13:31:34 +01:00
Jacques Lucke
59bc3f0959 Fix #129522: renaming sockets in node does not work for some types 2024-11-07 13:27:12 +01:00
Julian Eisel
0e0939b83f Fix #129112: Asset shelf ignores double-click keymap item
Double clicks would be captured by view-item renaming, even when renaming
wasn't supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/129919
2024-11-07 12:57:28 +01:00
Clément Foucault
a43a209959 Fix #129567: GPv3: Incorrect wireframe for strokes
First this make the wire batch use the same set of drawing that the main
gpencil batch uses (as they share the same VBO data, they need to use
the same drawings).

Then we skip drawing the onion frames by nullifying the indices in the
index buffer. A better way would be to skip these strokes or drawing
but that can be done later and seems more bug prone.

Pull Request: https://projects.blender.org/blender/blender/pulls/129920
2024-11-07 12:01:36 +01:00
casey bianco-davis
a114534295 Fix #121233: GPv3: Primitives: Add missing confirm action and ability to pan viewport.
This adds `MMB+shift`/`MMB+Alt` for panning, while keeping `MMB` to confirm.

Pull Request: https://projects.blender.org/blender/blender/pulls/122813
2024-11-07 12:00:29 +01:00
Falk David
ffd80047ee Fix #124725: GPv3: Masked layers not rendered correctly with onion skinning
The issue was that the masks for the current frame would be
rendered for a different frame.
Unfortunately, we can't easily render masks for the onion
skinned frames correctly at the moment.

The fix makes it so that we render the mask only for the current frame.

Pull Request: https://projects.blender.org/blender/blender/pulls/129878
2024-11-07 11:54:33 +01:00
Sean Kim
831166b4dc Fix #129907: Grease Pencil brush size gets stuck at 0
Possibly due to c13cde24cc

This commit clamps the `brush->size` value to 1 at lowest for the
Grease Pencil Draw mode. There are situations where when the brush scene
space value is set to a small enough size that the distance calculated
by `project_brush_radius` becomes 0.

When this value is set as the actual brush size, the `wm.radial_control`
operator fails to work properly as the new size is now lower than the
expected minimum value, causing incorrect clamping of the modal value.

Pull Request: https://projects.blender.org/blender/blender/pulls/129937
2024-11-07 10:50:46 +01:00
Sergey Sharybin
30ba6bfa7e Cleanup: Unused function argument 2024-11-07 10:37:44 +01:00
Jeroen Bakker
f3342fa680 Fix #129708: Vulkan: Add limit checks when creating images
Drivers should perform a limit check when creating images and return
`VK_ERROR_OUT_OF_DEVICE_MEMORY`. However there are drivers where this
check is a pass-through and leads to `VK_ERROR_DEVICE_LOST`.

This issue was introduced !128877 and only shows up on official NVIDIA
drivers.

Pull Request: https://projects.blender.org/blender/blender/pulls/129939
2024-11-07 10:29:40 +01:00
Jeroen Bakker
f896242477 Vulkan: Disable GPU depth picking on official AMD/NVIDIA drivers
There is an issue in the GPU depth picking that is only visible
in official AMD/NVIDIA drivers. AMD does pick objects that are
around the cursor. NVIDIA drivers include any overlay objects.

This PR will disable GPU pick selection for AMD/NVIDIA official
drivers. This will limit some selection functionality.
This PR will be reverted in Blender 4.4 to find the root cause.

Ref: #128624, #127768
Pull Request: https://projects.blender.org/blender/blender/pulls/129863
2024-11-07 10:07:08 +01:00
Jeroen Bakker
bc480f05d5 Draw: Reduce overhead of sharing meshes without attributes
When using a lot of instances the requested and needed attributes
are merged. This process uses a lock even when no work needs to be
done.

By early exiting the merging process when no work needs to be done
the performance of navigating 60k cubes went from 17.5 fps to 18.3 fps.

Detected when researching #126391.

Pull Request: https://projects.blender.org/blender/blender/pulls/129791
2024-11-07 08:31:08 +01:00
Richard Antalik
97e44901b4 Fix #129892: Retiming selection is broken
Deselect keys before selecting new keyss, unless toggling selection.

Pull Request: https://projects.blender.org/blender/blender/pulls/129893
2024-11-07 01:11:32 +01:00
Julian Eisel
5e688ffa73 Fix: UI: Missing redraws when clicking on catalogs in asset shelf popup
When opening the asset shelf brush selector popup in paint modes, clicking on a
catalog on the left wouldn't refresh the popup properly. Two catalog items
would be drawn as active, and the active catalog change wouldn't be reflected.
Only some mouse movements would trigger an update eventually.
2024-11-06 18:37:37 +01:00
Julian Eisel
198688dfbd Fix: UI: Asset shelf clamped to half the width on HiDPI screens
The asset shelf was not as wide as it should be on HiDPI screen, because the
calculations didn't account for pixel scaling properly.
2024-11-06 18:36:49 +01:00
Bastien Montagne
ca1353237f Fix #129797: bpy.data.libraries.write() is no longer saving the asset_data associated with the ID-block.
Do copy asset data when copying an ID into the PartialWriteContext.

Currently there does not seem to be any use-case where this would not be
the desired behavior. This can be made an optional behavior in the
future if needed.
2024-11-06 17:52:41 +01:00
Philipp Oeser
bccae832ae Fix #129853: Stroke Scene Spacing freezes with tablet size pressure
This lead to infinitely small return values from
`paint_space_stroke_spacing` (since the size can become so small) which
in turn causes an infinite loop in `paint_space_stroke`.

Was considering clamping to some other measure (e.g. based on bounding
box factors), but these might not work well in all circumstances
(dyntopo on a terrain-size mesh might still need tiny spacing), so
settled to clamp to the minimal numerical value.

Pull Request: https://projects.blender.org/blender/blender/pulls/129908
2024-11-06 16:34:52 +01:00
Pratik Borhade
496023691c Fix: Unused parameter warning
Caused by 40162873e0

Pull Request: https://projects.blender.org/blender/blender/pulls/129910
2024-11-06 15:54:42 +01:00
Clément Foucault
dd01858959 GPU: Avoid assert caused by overlapping attribute in material shaders
This was caused by `drw_ResourceID` taking one vertex input
(at slot 15) which was then also used by material shaders.

Starting material shaders at 14 in this case avoid the overlap.

Note that this reduces the amount of supported attribute when
using the workarounds by one.
2024-11-06 13:03:32 +01:00
Hans Goudey
5774441ee8 Fix: Crash in curves edit mode multi-object selection pick
The code was always using the deformed positions from the active object
rather than from the object currently being processed.
2024-11-06 12:52:19 +01:00
Aras Pranckevicius
3d457fa5d4 Fix #129876: VSE playhead text wrongly gets outline while playing
Caused by sticky text shadow enable that was not reset back

Pull Request: https://projects.blender.org/blender/blender/pulls/129906
2024-11-06 12:15:34 +01:00
Bastien Montagne
d0ca77f587 Add minimal user report about unreadable future blendfiles.
This commit adds a minimal, simple detection for future, incompatible
blendfiles (in case the header itself is modified).

The current available info does not allow to be more specific, but at
least this avoids telling users that it is not a blendfile.

In the future, the new header format designed in #129309 for Blender 5.0
should allow for a better report (since the first 16 bytes of the header
should always have the same meaning from there on).

Pull Request: https://projects.blender.org/blender/blender/pulls/129875
2024-11-06 11:13:28 +01:00
Sean Kim
bb01e3e37d Fix: Enhance details brush does not work with hidden faces
Similar to !129886

Pull Request: https://projects.blender.org/blender/blender/pulls/129888
2024-11-06 10:06:07 +01:00
Iliya Katueshenock
6255c49685 Fix: Geometry Nodes: Skip string attribute processing in some nodes
String attribute type generally not supported in geometry nodes currently.

Pull Request: https://projects.blender.org/blender/blender/pulls/129882
2024-11-06 07:16:36 +01:00
Jacques Lucke
05e27b4aec Fix #128948: crash when changing area type and starting modal operator from script
The issue was that changing the area did not immediately update the
`snode->edittree` when changing between different node editor types. That update
only happened later in `node_area_refresh`. However, by that time, the `poll`
function of the modal operator has already succeeded even though when there
operator actually starts `poll` would not succeed anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/129870
2024-11-06 07:04:04 +01:00
Richard Antalik
6ee1eb49be Fix #126167: Speed effect does not interpolate frame numbers
Only convert frame number to integer when image interpolation is not
used.

Pull Request: https://projects.blender.org/blender/blender/pulls/129839
2024-11-06 05:39:30 +01:00
Richard Antalik
b05e932ec6 Fix #126272: Set speed operator doesn't work correctly
Caused by 2 issues:
- Incorrect logic when checking if added key matches last key
- FPS mismatch not compensated in `SEQ_retiming_key_speed_set()`

Also `seq_retiming_evaluate()` output was not clamped to 0-1 range. This
was not causing issues in sample .blend file, but output should be
clamped.

Pull Request: https://projects.blender.org/blender/blender/pulls/129838
2024-11-06 05:25:54 +01:00
Richard Antalik
9840dd233c Fix: VSE: use after free in for loop
Same fix as 2a32b26415 - initialize range before using it in for loop

Pull Request: https://projects.blender.org/blender/blender/pulls/129835
2024-11-06 05:24:49 +01:00
Pratik Borhade
40162873e0 Fix #129632: GPv3: Vgroup operation edits drawings from all keyframes
Verge groups operations such as assign/remove/select/deselect from data
properties tab edits all drawings instead of visible drawings at current
frame. Now fixed with `retrieve_editable_drawings`.
For remove/remove_from operator, separate PR is created: !129890

Pull Request: https://projects.blender.org/blender/blender/pulls/129789
2024-11-06 04:16:48 +01:00
Campbell Barton
a1dfd51fae Cleanup: rename SceneEEVEE::gtao_quality -> fast_gi_quality
Avoid confusion from misleading/incorrect names, see: #129830.
2024-11-06 10:49:58 +11:00
Campbell Barton
6ccbafc5dc Cleanup: spelling in comments 2024-11-06 10:49:51 +11:00
Sean Kim
630455d686 Fix #129840: Various mesh filter modes do not work with hidden polygons
Mesh filter modes that use averaged neighbor data were not passing in
the mesh `hide_poly` attribute data, leading to incorrect behavior when
calculating averaged positions. To fix this and account for hidden
elements since we are operating on the entire mesh, we pass in the
attribute and use the `neighbor_data_average_mesh_check_loose` method to
account for vertices with no neighbors.

Pull Request: https://projects.blender.org/blender/blender/pulls/129886
2024-11-06 00:20:19 +01:00
Bastien Montagne
6fb6cd64b1 Fix 'missing files' operator not reporting which ID is using the missing filepath.
No idea why this was not reported before... Kind of critical info here.

Committed directly to 4.2 as:
* This is trivial change with extremely small risk of causing issues.
* Gold team at the studio needs it to better cleanup the production
  files for publication.
2024-11-05 19:32:05 +01:00
Jesse Yurkovich
38ac003703 Fix #129618: Tag Image ID inside the IMAGE_OT_replace operator
Follow what was already done with the "reload" operator and tag the
Image ID during "replace".

A tag of "0" is used for now until we can investigate why the other more
appropriate values are not working.

Pull Request: https://projects.blender.org/blender/blender/pulls/129619
2024-11-05 19:08:26 +01:00
Clément Foucault
32f4754a38 Fix: EEVEE: Volume: Assert on MacOS with high resolution
This would happen if the viewport with large enough
and a tile resolution of 1:1 was choosen.

This changes the fallback behavior from simply clamping
the resolution (which did break a lot of math downstream),
to simply finding the next largest tile size that fits
the hardware requirements.
2024-11-05 17:40:06 +01:00
Clément Foucault
750a9af518 Fix #129705: EEVEE: Light Probe RAM Pool Crash on MacOS
Crash manifested after the inclusion of #128877.
The very tall 3D texture tested by the new code
were not supported / tested by the Metal Backend.

Simply adding the appropriate upfront checks fixes
the issue.

Needs to be backported to 4.2
2024-11-05 17:37:02 +01:00
Clément Foucault
43b5e2d0ed Fix: EEVEE: Add buffer workaround for stencil classification
Adding a dummy storage buffer to the classification shader
seems to fix the issue on Qualcomm drivers (WoA).

The workaround is added to the force workaround option to
allow other platforms to test the fix.

Rel #122837

Pull Request: https://projects.blender.org/blender/blender/pulls/129857
2024-11-05 17:12:28 +01:00
Julian Eisel
fd2d2f225f Fix #128744: Reverting single essentials brush reverts all
Code used library reloading which would reload all data-blocks from a
data-block library. Since the essentials brushes are stored in a single
.blend file (one per mode), they would all be reset. In general this
violates the design where multiple brushes in a single .blend file
should be usable just fine. (A single file per brush is only necessary
to allow saving edits to that file without opening it.)

Instead of library reloading, delete the brush from the current file and
re-link it.

The link/append API should probably get support for reloading a single
data-block (and optionally its dependencies) but for now this is not
supported yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/129866
2024-11-05 17:05:15 +01:00
YimingWu
46b89b2aa4 Fix: GPv3: Some modifiers not working with non-poly curves
Some modifiers expect the curves to be of type `POLY`.
For such modifiers we need to resample the curves to the
evaluated points so that the modifiers work as expected.

Resolves #129859.

Pull Request: https://projects.blender.org/blender/blender/pulls/129860
2024-11-05 16:35:16 +01:00
Jacques Lucke
551e87c4fd Fix #128875: text cursor offset by one
The `UI_BUT_NO_TEXT_PADDING` flag was not taken into account when setting the cursor in a text box.

Pull Request: https://projects.blender.org/blender/blender/pulls/129299
2024-11-05 15:56:54 +01:00
Christoph Lendenfeld
71692abd59 Fix #127949: able to pan keys out of view if channels are not shown
The issue was that with a96f1208cc the clamping
of the `View2D` happened in the drawing function
of the channel list. That of course won't work if the
channel list isn't drawn.

The fix is to ALSO clamp in the drawing function of
the main area. The reason this has to be in addition, is that
(I think) the channel box is drawn first. So if the clamping doesn't
happen there, the channels and their keys can lose their vertical
alignment.

Pull Request: https://projects.blender.org/blender/blender/pulls/129864
2024-11-05 15:34:22 +01:00
Clément Foucault
e47e720f06 Fix #126415: EEVEE: Halo on motion blurred out of focus objects
Was caused by swapped depth of field and motion blur effects.
2024-11-05 15:05:42 +01:00
Bastien Montagne
e2b1e9912c Fix readfile linking code not protected against invalid BHeads.
Follow up to 6ba58a8303, apply similar checks to code loading
linked data from blendfile libraries.
2024-11-05 14:38:30 +01:00
Campbell Barton
828f60b742 Fix check that only Control was pressed ignoring OsKey 2024-11-05 23:26:20 +11:00
Jeroen Bakker
fe8bc5100d Cleanup: Remove compilation warning
Introduced by !129775

Pull Request: https://projects.blender.org/blender/blender/pulls/129855
2024-11-05 13:22:18 +01:00
Campbell Barton
e071bf4690 Fix #129607: Armature "Assign to Collection" crashes with defaults
Armature::collection_array was indexed with -1,
returning an invalid collection.

When the collection index isn't usable, create a new collection
with the default name.

Ref !129608
2024-11-05 23:00:31 +11:00
Campbell Barton
b53c20db25 EEVEE: remove DNA/RNA for values that are no longer in use
Remove values from EEVEE which are no longer used.

Ref !129832
2024-11-05 23:00:29 +11:00