Commit Graph

112943 Commits

Author SHA1 Message Date
Sybren A. Stüvel
367cceaab8 Anim: Make it possible to enter/exit NLA tweak mode on slotted Actions
Properly track Action and Slot assignment when entering/exiting NLA
tweak mode.

This doesn't properly sync the length of the NLA strip when exiting
tweak mode. This and more NLA work is tracked at #127489.

Pull Request: https://projects.blender.org/blender/blender/pulls/127498
2024-09-12 16:48:02 +02:00
Jacques Lucke
5ca7aa1cf3 Cleanup: Geometry Nodes: extract reusable functions for node tree zones 2024-09-12 16:12:13 +02:00
Pablo Vazquez
32a2c9ea32 UI: Add missing ellipsis to File menu items
As per the writing style guidelines, add ellipsis to labels of
operators that do not run immediately but open settings or require
further steps.

Pull Request: https://projects.blender.org/blender/blender/pulls/127475
2024-09-12 15:48:41 +02:00
Aras Pranckevicius
649cde421b Fix #127468: VSE thumbnail cache related crash when quitting blender
Do not try to kill thumbnail generation job when destroying the cache
(which happens as part of destroying the scene) -- all the code
paths that destroy a scene already cancel outstanding WM jobs. And WM
itself might be gone at that point, so accessing a stale pointer to it
can lead to a crash.

Instead, fix the problem of "refresh sequencer can cause a crash" by
not destroying the thumbnail cache, but merely clearing it in
sequencer_refresh_all_exec.

Pull Request: https://projects.blender.org/blender/blender/pulls/127485
2024-09-12 14:48:20 +02:00
Hans Goudey
36a196a738 Fix: Assert in sculpt symmetrize poll 2024-09-12 08:29:29 -04:00
Jacques Lucke
2ca5a65add Fix #127434: copying node does not work in many cases
The issue was that the ctrl+C event was consumed by a uiBut that did not even support copying.
The old behavior was broken in 749433f20b.

Pull Request: https://projects.blender.org/blender/blender/pulls/127460
2024-09-12 14:21:33 +02:00
Falk David
c07c9d5729 GPv3: Change "use_locked_material" option
This option is meant to ignore any material locking when it
comes to editing strokes that might use locked materials.

There were some issues with the current implementation.
* The name did not reflect what it was supposed to do, so it
   was renamed to `ignore_locked_materials`.
* The description of the option has been updated to better
   reflect the behavior.
* Some util functions have been refactored

Pull Request: https://projects.blender.org/blender/blender/pulls/127423
2024-09-12 14:20:16 +02:00
Sybren A. Stüvel
3417934eff Anim: add Action Slot assignment to NLA strip
For an NLA strip to use a slotted Action, it needs to specify which slot
to use in that action. This is now handled by two new properties on the
strip in DNA & RNA: `action_slot_handle` and `action_slot_name`.

These serve the same purpose as their counterparts on the `AnimData`
struct.

Note that this commit does NOT add NLA evaluation support for slotted
Actions. It merely allows assigning them. Evaluation, tweak mode
support, etc. will be implemented in future commits.

Pull Request: https://projects.blender.org/blender/blender/pulls/127359
2024-09-12 14:08:16 +02:00
Sybren A. Stüvel
20ba3bd530 Anim: Add RNA function Slot.debug_log_users()
Add an RNA function that can log the users of an Action Slot. It's
available in debug builds only, as it is purely a debug tool for C++
developers at the moment.

Eventually it's likely that the list of Action Slot users will be
exposed to RNA/Python directly, but I'll only write code for that once
we actually need it for non-debugging functionality. For now this is
enough.
2024-09-12 14:08:14 +02:00
Pratik Borhade
d2091b4b15 Fix #126513: VSE: Handle tweaking does not work with Select Box tool
Select handles of strip available below the cursor when
`selection.seq1/seq2` exists in `sequencer_box_select_invoke`.
Also fixed the condition in `sequencer_main_cursor` so the new
WM_CURSOR_HANDLE is visible.

Pull Request: https://projects.blender.org/blender/blender/pulls/126548
2024-09-12 13:43:13 +02:00
Clément FOUCAULT
e067bf7cf6 Overlay-Next: Paint Overlay
Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/127455
2024-09-12 12:29:09 +02:00
Falk David
0cfc4b197f Fix: GPv3: retrieve_editable_fill_strokes function
The function was not behaving correctly.
Instead of reimplementing getting the editable strokes,
it calls `retrieve_editable_strokes` directly now.
Then an index mask of the fill strokes is built and
the result is intersected with the editable strokes mask.
2024-09-12 11:29:22 +02:00
Philipp Oeser
6f781481c1 Fix #127399: Sculpt temporary Smooth brush ignores some settings
If the Smooth brush (which is switched to from other brushes holding
`Shift`) had the following settings (possibly others as well)
- Stabilize Stroke
- Airbrush
- Line
These were ignored (not drawing their correct cursor, airbrush not
working because the timer wasnt started).

Problem here is that `smooth_brush_toggle_on` (called via stroke->
test_start) changes the brush, this was ignored in following code (and
in case of the `Stabilize Stroke` is called only after the code that was
checking if this was ON).

So to resolve, get the brush again after `stroke->test_start` has run
(and also move the check `Stabilize Stroke` a bit (to  place that
actually fits much better since similar things like line visualization
are handled there as well)

Pull Request: https://projects.blender.org/blender/blender/pulls/127412
2024-09-12 11:16:40 +02:00
YimingWu
52d3426cf5 Fix #127480: Tag geometry recalc when adding new frames in GPv3
`rna_Frames_frame_new` did not `DEG_id_tag_update` when it's
done so this lead users to believe that the new frame is
duplicated. The frame is correctly created, just display needs
refreshing.
2024-09-12 17:11:32 +08:00
Campbell Barton
941fb02646 Fix typo in recent cleanup (ref #118145) 2024-09-12 15:04:06 +10:00
Aras Pranckevicius
c41bb20008 Fix #124549: can't customize overlay text color
Improvements to how text colors and shadows are determined for the
3D View overlays. Starting with the theme's text highlight color, it
is lightened or darkened if necessary to give contrast with the
background. Then a black or white shadow is used depending on text
color.

Pull Request: https://projects.blender.org/blender/blender/pulls/127389
2024-09-12 04:24:53 +02:00
Aras Pranckevicius
1bf1ad8e52 Fix: VSE framerate text color is not visible unless it is too slow
When playback framerate is too slow, then text was red and visible.
Otherwise it was black text on normally black background though, which
is not very useful.

Pull Request: https://projects.blender.org/blender/blender/pulls/127394
2024-09-12 03:01:05 +02:00
Sean Kim
8b3794514b Fix #127279: Various brushes do not work on multires
Introduced with 347ec1acd7.

Various brushes use the `calc_area_normal_and_center_node_grids`
function to determine their displacment. Prior to this commit, the
calculation of this plane normal was not iterating over the `IndexMask`
correctly.

This manifested on the default cube at multires levels greater than 6,
because at that point the number of PBVH nodes was greater than 1,
leading to the wrong nodes being used to calculate this effect.

Pull Request: https://projects.blender.org/blender/blender/pulls/127474
2024-09-12 01:46:12 +02:00
Harley Acheson
4d88c18e8b UI: Don't Show Drag Cursors on Non-Floating Menus
PR ##127465 accidentally removed a check for is_floating, which means
that you get a drag cursor near the top of dropdown menus. This fixes
that dumb mistake.

Pull Request: https://projects.blender.org/blender/blender/pulls/127472
2024-09-11 23:41:58 +02:00
Hans Goudey
b2d201cbea Cleanup: Remove outdated SubdivCCG masks assert
Missed in 1618448abd.
2024-09-11 16:35:14 -04:00
Hans Goudey
2fc82f8f3f Cleanup: Sculpt: Specialize face sets automasking precalculation
Part of #118145.
2024-09-11 16:08:48 -04:00
Hans Goudey
8d08701a68 Cleanup: Tweaks to SubdivCCG range utilities
Allow retrieving a face's range without a CCGKey
2024-09-11 16:08:27 -04:00
Jesse Yurkovich
cbdc7d7636 Cleanup: Remove old USD version guards
Remove old version guards relating to USD versions prior to 2111 which
released in Nov 2021.

The oldest supported version of Blender, 3.3 LTS which goes end of life
this month, was already using USD version 2203 released in March 2022.
Additionally, these guards give the illusion that compiling with old
versions prior to 2111 might work, which is neither guaranteed nor
tested for at this point.

Pull Request: https://projects.blender.org/blender/blender/pulls/127380
2024-09-11 21:45:22 +02:00
Sean Kim
86c3ca0914 Fix: Crash when canceling expand operator
Pull Request: https://projects.blender.org/blender/blender/pulls/127430
2024-09-11 21:38:59 +02:00
Harley Acheson
0c1d8ad8a5 UI: Status Bar During Non-Operator UI Interaction
This PR clears the status bar when popovers, confirmations, and dialogs
open. Also while editing text, entering numbers, or dragging on sliders

Pull Request: https://projects.blender.org/blender/blender/pulls/127005
2024-09-11 21:02:39 +02:00
Harley Acheson
442fd1925e Fix #127438: Don't Show Menu Drag Cursor Over Content
Some popup menus have content at the very top, within the title bounds.
In this case don't show the drag cursor if there is a button under the
mouse location.

Pull Request: https://projects.blender.org/blender/blender/pulls/127465
2024-09-11 20:26:02 +02:00
Hans Goudey
2a0c332776 Fix: Sculpt automask occlusion crash 2024-09-11 13:50:23 -04:00
Sean Kim
ab5ce3061a Fix #127357: Expand operator crashes when cursor is not on mesh
Prior to 0df133559c, the `active_vert_` property was only ever
invalidated if the entire `SculptSession` was refreshed, even if the
cursor moved off of the mesh or if the underlying mesh type changed.

The Sculpt Expand operator was dependent on this value not being cleared
to still behave in a reasonable way from a user perspective

This commit introduces a new variable, `last_active_vert_` and
corresponding accessor methods to `SculptSession` to specifically fix
this usecase. When the active vert is cleared, if it had a valid value,
we store it in the new `last_active_vert_` variable.

Pull Request: https://projects.blender.org/blender/blender/pulls/127433
2024-09-11 19:48:31 +02:00
Hans Goudey
f1f0f2daaa Refactor: Sculpt: Move cached automask factor out of attribute system
Part of #118145.
The attribute system should be used to store user-edited data, not
temporary caches during a stroke. It's simpler and more obvious to
just store this as part of the cache created for every brush stroke.

Pull Request: https://projects.blender.org/blender/blender/pulls/127463
2024-09-11 19:25:13 +02:00
Sean Kim
be4205b824 Fix #127396: Invert Mask doesn't apply to entire mesh
Missed in 347ec1acd7

Pull Request: https://projects.blender.org/blender/blender/pulls/127435
2024-09-11 19:16:58 +02:00
Clément Foucault
b4005b73ba Overlay-Next: UV: Fix facedots affected by object matrix 2024-09-11 18:52:12 +02:00
Clément Foucault
8b66d65c44 Cleanup: Overlay-Next: Remove enum keyword in front of enum types 2024-09-11 18:51:10 +02:00
Clément Foucault
f0742d2a42 Overlay-Next: Fix broken shaders 2024-09-11 18:51:10 +02:00
Hans Goudey
71578879b9 Refactor: Sculpt: Simplify automask stroke ID update
Replace the convoluted "automasking end" pattern with a
function that actually says what it does in its name.
2024-09-11 12:40:20 -04:00
Hans Goudey
bf12274d5e Cleanup: Sculpt: Pass automasking by const reference
Part of #118145.
2024-09-11 12:40:20 -04:00
Clément Foucault
79e7749557 Overlay-Next: Add DebugScope for selection and drawing
Allows to selectively capture between
- selection drawing
or
- viewport drawing.
2024-09-11 18:37:44 +02:00
Clément Foucault
4021a517a8 GPU: Add DebugScope class
This class allows to define capture scopes
that can be chosen during gpu work capture.

This reduces the amount of command captured
and allow for faster replay and easier
navigation inside the debug tools like Xcode
or RenderDoc.
2024-09-11 18:37:42 +02:00
Clément Foucault
7f559799e1 Overlay-Next: Fix compilation error after merge 2024-09-11 18:37:37 +02:00
Clément Foucault
c82ddedb9b Overlay-Next: Image Space
Port all Image editor overlays.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/127366
2024-09-11 18:26:34 +02:00
Laurynas Duburas
bae268c57f Overlay-Next: Grid 2D
Overlay-Next version of Grid 2D

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/127285
2024-09-11 18:10:00 +02:00
Aras Pranckevicius
30dbb7820d Cleanup: VSE effects never have 3 inputs, remove seq3 handling
"seq3" input for VSE effect strips has been there ever since
"initial revision" commit in 2002, with comment "pointers voor effecten"
even. But it has never been used, so remove all code that pretends
to do something with it.

Pull Request: https://projects.blender.org/blender/blender/pulls/127401
2024-09-11 17:56:22 +02:00
Laurynas Duburas
30724ddecd Overlay-Next: Fade
Overlay-Next version of  Fade in Mesh edit mode and Fade geometry in armature pose mode.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/127247
2024-09-11 17:29:26 +02:00
Jacques Lucke
7fc7462890 Fix #127448: mesh boolean node stops gizmos from working
The issue is that the boolean node did not propagate edit data and thus lost
information about gizmos. Now the boolean node propagates edit data from
all geometry inputs.

Pull Request: https://projects.blender.org/blender/blender/pulls/127457
2024-09-11 17:20:51 +02:00
Miguel Pozo
a602e5530a Fix #127437: Crash with parallel shader compilation
Avoid race conditions and handle pending async compilations
when compiling synchronously.
2024-09-11 16:34:57 +02:00
Jacques Lucke
8182f684be Fix #127054: crash due to integer overflow in Resample Curves node
This adds a variant of `accumulate_counts_to_offsets` which checks for
overflows. The hot loop stays essentially the same, it just uses a `int64_t`
instead of `int` for the counter now. For now the error state is returned by
using an `std::optional`. Alternatives could be to throw `std::overflow_error`
or to use some Result/Expected type in the future.

Obviously, there are more places that should handle this kind of error. It's
also not obvious how to propagate that error further up yet so that we can
display e.g. a warning in the node. That decision should be applicable to other
nodes too. For now, there is no warning on the node.

Pull Request: https://projects.blender.org/blender/blender/pulls/127184
2024-09-11 16:12:47 +02:00
Hans Goudey
1618448abd Sculpt: Store multires grids data in separate arrays
For `SubdivCCG`, replace the dynamic array-of-struct data with separate
arrays for positions, normals, and masks. This decreases memory
bandwidth requirements for loops that only access one of these arrays.
It also significantly simplifies data access, making it more similar
to mesh data where it can just be accessed with indices.

In a simple test this change speeds up the multires sculpt brush
benchmark by 32%. It also slightly reduced BVH build time by about 12%.

In practice this means completely replacing usage of `CCGElem` for
`SubdivCCG`. The struct is still used in the older subsurf baking code
though. Removing that is a much trickier task that doesn't have short
term benefits.

Part of #118145.

Pull Request: https://projects.blender.org/blender/blender/pulls/127262
2024-09-11 15:54:46 +02:00
Jacques Lucke
4c2718e318 Fix #126821: compress saving option gets removed when recovering from autosave
Before efb511a76d this was not necessary, because the G_FILE_COMPRESS option
was not disabled when writing memfile undo steps. However, compression is
generally disabled when writing quit.blend or autosave files.
2024-09-11 15:11:42 +02:00
Jacques Lucke
e18aa65973 Fix: quit.blend is not saved as recovery file
This was broken in efb511a76d. The memfile-undo step always had
this flag set, but the non-memfile file-write did not.
2024-09-11 14:38:04 +02:00
Jacques Lucke
2d93671778 Fix: unnecessary node updates
It looks like the check introduced in e071288ab2 is the
wrong way around.

Pull Request: https://projects.blender.org/blender/blender/pulls/127426
2024-09-11 13:59:16 +02:00
Philipp Oeser
d7bdfe39a3 Fix: Movieclip Editor opening a file mem allocation mismatch
Oversight in 9506fed905

This would give: "Attempt to use C-style MEM_freeN on a pointer created
with CPP-style MEM_new" (and crash in my local builds)

Pull Request: https://projects.blender.org/blender/blender/pulls/127347
2024-09-11 13:29:57 +02:00