Commit Graph

138489 Commits

Author SHA1 Message Date
Jeroen Bakker
88f04e95c3 Vulkan: Fix HiZ synchronization
HiZ update performs a read/write on different buffers, this lead
to write-after-write hazards as the resources where added multiple
times in the same pipeline barrier with different access masks.
This is fixed by merging pipeline barriers based on their resource.

Pull Request: https://projects.blender.org/blender/blender/pulls/124036
2024-07-02 14:06:49 +02:00
Jeroen Bakker
bf3c6a3480 Vulkan: Improve debugging render graph
Adds debug print function to output a node with its inputs and outputs.
Also keep track of the name of the resource (only images) what will
be presented. Tracking of the resource name is only done in debug builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/124033
2024-07-02 13:29:34 +02:00
Bastien Montagne
365a3da148 Fix RNA 'property iterator' code wrongly skipping some custom properties.
`rna_idproperty_known` would systematically skip IDProperties if their
identifier matched the identifier of an RNA property.

This should only be done in case the RNA property is
'dynamically-defined', i.e. it uses IDProperties as storage backend, and
has the `PROP_IDPROPERTY` flag set.

This will fix #123983, among probably many other similar hidden
failures.

NOTE: I would call that fix too risky for Blender 4.2 at this point of
the release. This is a very low-level change, it's fairly hard to foresee
all of its possible side effects.

Pull Request: https://projects.blender.org/blender/blender/pulls/124000
2024-07-02 10:37:43 +02:00
Jeroen Bakker
459b4c7f00 Vulkan: Fix Point rendering in UI (Curves)
`ui_draw_but_CURVE` used a flat color shader to draw points. This
isn't valid as that shader doesn't support point rendering.

This is fixed to replace the `GPU_SHADER_3D_FLAT_COLOR` with
`GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR`.

Regression found when loading `monster.blend` using Vulkan. This
scene has the color management tab open with a custom curve.

Pull Request: https://projects.blender.org/blender/blender/pulls/124025
2024-07-02 09:43:57 +02:00
Nathan Vegdahl
2e505b76a4 Anim: add a method to Action that ensures a Binding exists for an ID
This PR also uses the new method in the one place I'm currently aware of that
needs it.

The reason to split this out into its own method is that it's coming up again in
upcoming PRs that handle smaller corner cases in the Baklava keyframing code. So
this centralizes the 'ensure binding' logic in one place so it's handled
consistently everywhere.

Since this is a small PR, I've also taken the opportunity to do some minor
cleanup of the affected areas of the keyframing code while I was there anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/123988
2024-07-02 09:40:40 +02:00
Jeroen Bakker
7fcc4e5374 Vulkan: Add Render graph support to VKDrawList
Resources of the draw list were overwritten, before used. Fixed by
using resource tracking.

Pull Request: https://projects.blender.org/blender/blender/pulls/124024
2024-07-02 09:20:34 +02:00
Campbell Barton
9103f9682d Merge branch 'blender-v4.2-release' 2024-07-02 17:06:40 +10:00
Campbell Barton
dffc47e6cf Merge branch 'blender-v4.2-release' 2024-07-02 17:06:35 +10:00
Campbell Barton
df6ba6d324 Fix unhandled exception refreshing outdated extensions
Changes the the extension repositories in the preferences while
update notifications were running could raise an exception.

Resolve by only calculating outdated extensions for
repositories that still exist.
2024-07-02 17:04:53 +10:00
Jeroen Bakker
4d0c14bed3 OpenGL: Fix read from uninitialized memory
When performing framebuffer transition on legacy opengl platforms, some
state was uninitialized. Resulting in incorrect behavior and crashes.

Note that this doens't fix the black cube on legacy platforms. With this PR we
might be able to reproduce the issue on modern HW.

Pull Request: https://projects.blender.org/blender/blender/pulls/123989
2024-07-02 08:37:50 +02:00
Campbell Barton
e3d0997065 Merge branch 'blender-v4.2-release' 2024-07-02 16:19:45 +10:00
Andrej730
1f0592b3b1 Docs: corrections to bpy.utils.register_tool
- Replaced `tool` argument with `tool_cls`.
- Removed `space_type` argument that's not present in the method.

Ref: !118900
2024-07-02 16:18:08 +10:00
Campbell Barton
83ce50f2b8 Merge branch 'blender-v4.2-release' 2024-07-02 16:09:45 +10:00
Thomas Barlow
d1cff7974a Fix #108254: Infinite loop in rna_info.BuildRNAInfo(..)
When a registered class has a non-registered superclass,
rna_info.BuildRNAInfo entered an eternal loop.

The while loop in `rna_info.get_py_class_from_rna` was not mutating the
variables within the loop nor the variable in its condition, meaning it
would loop infinitely if the loop didn't exit in its first iteration.

When yielding registered classes in `subclasses_recurse`, the function
was erroneously checking if the class' superclass was registered rather
than checking the class itself, causing registered classes to be skipped
if their superclass was not also registered. If the class to be found
was skipped, the while loop would not exit in its first iteration and
would thus loop infinitely.

The while loop has been modified to iterate through each base rna type
until there is no further base type.

The `subclasses_recurse` function now correctly checks whether the
subclass is registered, not its superclass, when determining if the
subclass should be yielded.

Besides the fix, no functional changes are expected, the generated
Python API docs remain unchanged.

Ref: !108256
2024-07-02 16:03:26 +10:00
Campbell Barton
d97b7f4cd6 Merge branch 'blender-v4.2-release' 2024-07-02 15:23:11 +10:00
Campbell Barton
1322daa480 Extensions: clear search and tags when showing updates
Search and tags could prevent extensions from being displayed.
2024-07-02 15:20:25 +10:00
Campbell Barton
11b32ed48b Merge branch 'blender-v4.2-release' 2024-07-02 15:07:17 +10:00
Campbell Barton
c29d8326e0 UI: sort add-ons by name
Previously add-ons were sorted by category & name, remove the category
only sorting by name since the category is no longer displayed and
isn't part of extension meta-data. Now the add-ons are sorted by name
(case insensitive).

Details:

- Store add-ons modules sorted to avoid having to sort on every redraw.
- addon_utils.modules() now returns an iterator.
2024-07-02 15:06:14 +10:00
Campbell Barton
ebe5860027 Merge branch 'blender-v4.2-release' 2024-07-02 13:34:38 +10:00
Guillermo Venegas
262c68512f Fix #123807: layout panels can't be collapsed on scaled regions
In `ui_popup_block_position` popup blocks are scaled with the owner
button region scale which wasn't being done for layout panel bounds.

This applies the scale applied to the popup block to layout panels
bodies and headers.

Also when calculating layout-panels headers and bodies the offset
`layout_panel_y_offset` is applied in place, this because this value
can also be affected by this scale.

This solves the original issue described in #122411 and reverts the
regression #123807.

Ref !123980
2024-07-02 13:32:18 +10:00
Campbell Barton
3b420a5a79 Merge branch 'blender-v4.2-release' 2024-07-02 12:56:02 +10:00
Campbell Barton
33fb83ae74 Fix using network shares for extensions on WIN32
- Support UNC paths.
- Normalize URL's to account for differences between browsers.
2024-07-02 12:53:00 +10:00
Campbell Barton
170325744d Merge branch 'blender-v4.2-release' 2024-07-02 11:46:36 +10:00
Campbell Barton
e8a3537ffb Extensions: improve automatic repo names for file:// repos on WIN32
- Skip leading slash from drive letters.
- Use back-slashes.

While these weren't exactly bugs, it seemed like an error when the
path name wasn't what users would expect. Relates to #123994.
2024-07-02 11:45:39 +10:00
Hans Goudey
5bf9fc632b Sculpt: Data oriented refactor for multi-plane scrape brush, part 1
Part of #118145.
This only addresses the deformation part of the brush, the sampling of
the plane normals will be addressed separately. Generally this is a
somewhat strange brush compared to the others, so the order of
utility function calls is slightly different.

Pull Request: https://projects.blender.org/blender/blender/pulls/124018
2024-07-02 03:13:30 +02:00
Campbell Barton
cabfe94014 Merge branch 'blender-v4.2-release' 2024-07-02 09:30:28 +10:00
Campbell Barton
603b833fe3 Fix error accessing remote extension repositories via file:// on WIN32
Converting the URL back to a path left a slash before the drive letter.
2024-07-02 09:27:59 +10:00
Sean Kim
9fbfce4a13 Cleanup: Sculpt: Add forward declarations
Pull Request: https://projects.blender.org/blender/blender/pulls/124017
2024-07-02 00:46:39 +02:00
Sean Kim
11db18473d Refactor: Sculpt: Split up smooth::relax_vertex
Pull Request: https://projects.blender.org/blender/blender/pulls/124014
2024-07-01 23:42:55 +02:00
Hans Goudey
4b03274d80 Cleanup: Sculpt: Split function to join multi-plane samples, rename struct 2024-07-01 17:42:10 -04:00
Hans Goudey
3f27917838 Cleanup: Tweak variable naming in multiplane scrape brush 2024-07-01 17:40:03 -04:00
Hans Goudey
29ce7907e2 Cleanup: Sculpt: Simplify access to multiplane scrape planes
Instead of using if statements to choose between the planes,
use array indices.
2024-07-01 17:40:03 -04:00
Hans Goudey
d106592f7b Cleanup: Sculpt: Use C++ math types 2024-07-01 17:40:03 -04:00
Hans Goudey
71038bfbce Cleanup: Sculpt: Move multi-plane scrape code to C++ namespace 2024-07-01 17:40:03 -04:00
Hans Goudey
52bd028bd8 Cleanup: Sculpt: Move utilities to gather grids and BMesh normals
Turns out these functions are useful elsewhere too.
2024-07-01 17:40:03 -04:00
Richard Antalik
639acb2b5d Merge branch 'blender-v4.2-release' 2024-07-01 23:26:21 +02:00
John Kiril Swenson
8d8a84ffb4 VSE: Fix crashes adding freeze-frames to segments
If a freeze-frame retiming key was added to either a transition or
freeze-frame segment when the strip was selected, Blender would crash.
The issue is that `SEQ_retiming_add_key` returns `nullptr` if the start
key of the current segment is one of these types, and never bothers to
cancel the operation if this happens.

Instead, it only attempts to get a key at the current frame with
`SEQ_retiming_key_get_by_timeline_frame`. This is redundant, since there
are already checks to see if that key exists in `SEQ_retiming_add_key`.
Remove this code and move up the other `nullptr` check to fix the bug.

Pull Request: https://projects.blender.org/blender/blender/pulls/123981
2024-07-01 23:25:11 +02:00
John Kiril Swenson
4c8319a227 VSE: Fix retiming unallowed strip type crashes
Currently, many retiming operators are able to operate on all selected
strips. However, if strips that do not support retiming are selected
(e.g. color strips), attempting to perform these operations will crash
Blender. The operators are only polled away if the active strip does
not support retiming -- this is not resilient enough.

This patch fixes the issue by checking each strip to make sure it
supports retiming. Some of the operators do not necessarily crash
without this fix (`retiming_show`, `retiming_key_add`), but still benefit
from exiting early if the current strip does not permit the functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/123975
2024-07-01 23:19:44 +02:00
John Kiril Swenson
607445da5f VSE: Standardize reset retiming operator
Every retiming operator works on selected strips. However, the reset
retiming operator only works on the active strip.

This patch standardizes the behavior so that all selected strips have
their retiming reset. This gives more control to the user to reset
many strips' retiming in bulk.

Pull Request: https://projects.blender.org/blender/blender/pulls/123973
2024-07-01 23:12:52 +02:00
Richard Antalik
952f41a9fd Fix: VSE frame interpolation is broken
Caused by incorrect output of `SEQ_give_frame_index` for effect strips.
Also since output value is float, it has to be truncated to integer,
when image bufferes are rendered for the effect.

Pull Request: https://projects.blender.org/blender/blender/pulls/123914
2024-07-01 23:07:23 +02:00
Sean Kim
6dd9c3254b Refactor: Sculpt: Simplify relax face set strength logic
Pull Request: https://projects.blender.org/blender/blender/pulls/124010
2024-07-01 22:55:43 +02:00
Richard Antalik
f205079f1e Fix #122251: Using industry compatible keymap with VSE emits warnings
Tweak tool keymap was empty. `_template_items_tool_select` was added to
tweak tool.

Pull Request: https://projects.blender.org/blender/blender/pulls/123200
2024-07-01 22:54:23 +02:00
Hans Goudey
7bc188a760 Sculpt: Initial data oriented refactor for grab brush
Part of #118145.
This introduces a few small API functions for retrieving spans of
original positions and normals from the undo system.

Pull Request: https://projects.blender.org/blender/blender/pulls/123447
2024-07-01 22:32:01 +02:00
Harley Acheson
1d10336afe UI: Blender Logo Icon Optimized
This one SVG file was not optimized. I had edited it to change the (R)
from a text element to path but then missed the optimization step.

Pull Request: https://projects.blender.org/blender/blender/pulls/124008
2024-07-01 21:52:39 +02:00
Sean Kim
3c6f9840db Fix #124002: Multires & BMesh undo doesn't affect mask
Broken in 90c4c48bbf1fe0000d82316ea5196bac394aeefb, missed applying
`undo_node`

Pull Request: https://projects.blender.org/blender/blender/pulls/124006
2024-07-01 21:26:55 +02:00
Hans Goudey
2c0c298675 Fix: Undo doesn't work for sculpt transform tools
An existing issue made visible/worse by c168ef98093a40f5524.
2024-07-01 15:01:05 -04:00
Julian Eisel
4a9e8087a7 UI: Highlight first view item on type to search & activate on enter
In particular, this makes the asset shelf popup search highlight the
first asset when changing the search filter using text input. Pressing
Enter will activate this asset then. The feature is implemented
generally for grid and tree views, but only the asset shelf implements
filtering so far. Plus, it requires the
`UI_BUT2_FORCE_SEMI_MODAL_ACTIVE` behavior on the filter text button,
otherwise it captures all input. Only the popup version of the asset
shelf uses this currently. Moving the mouse makes the highlight jump
back to the brush under the cursor again. This is how search menus
behave too.

Part of the brush assets project, see blender/blender!123853. It's made
so it's possible to quickly spawn the brush asset shelf popup, input
text to search a brush and press Enter to activate it. Based on user
feedback this is an important workflow to support well.

More info about the changes in the pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/123853
2024-07-01 20:36:51 +02:00
Hans Goudey
0363650990 Fix: Sculpt: Undo restore crash with first operation
Mistake in 057fdf4224e0e07a6020cabd4d2a1ca4f307f0a5
2024-07-01 13:58:58 -04:00
Clément Foucault
beb8ec4fe1 Fix: EEVEE: Wrong subsurface sample distribution
The sample distribution was biased toward 0, which
created sharper details than expected.

However the downside is that the subsurface is now
more jittery because of the low amount of samples.
2024-07-01 19:55:01 +02:00
Jesse Yurkovich
453d55b1c4 Merge branch 'blender-v4.2-release' 2024-07-01 10:12:35 -07:00