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
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
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
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
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.
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
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.
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
`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.
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
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
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
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
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
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
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
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
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.
"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
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
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
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
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.