If a strip had effect strips applied on it, and using the reset
retiming operator caused the strips to increase in length, the effect
strips would become overlapped with any strips they hit, unless the
"Expand" overlap mode was used.
This is because the "effect chain" strips weren't included
in #strips.
Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124750
This was originally fixed in 8ecccddf1c but for some reason
the merge to main didn't include those changes
merge commit: 2e03ca4a5b
The issue was that the wire width was not passed to the shader when using curve objects.
This PR is just the cherry picked changes from the original commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/124774
For very small hotspot regions when trying to select handles on adjacent
strips, selection can sometimes jump to the strip farthest away from the
current mouse cursor position. This happens regardless of "Tweak
Handles" setting, but is most noticeable when it is off.
In the case that two strips are selected at once (which is possible
because internally strip handles are shifted away from the strip body by
a third of the handle size), `mouseover_strips_sorted_get` attempts to
sort these strips to maintain priority, but the logic was backwards --
fix the glitch by sorting strips such that the first strip in the
`Vector` is always the strip closest to the mouse cursor.
Pull Request: https://projects.blender.org/blender/blender/pulls/124708
Was using the old, not the modified name of the brush to build the brush
asset reference, that is used to identify the active brush asset.
The new brush was actually activated, but some of the UI like the asset
shelf would display it as such.
The fix contains two parts:
1. Grease Pencil v3 now stores stroke `init_time` as a float attribute,
it's not enough precisiton for unix timestamp. Now the time value is
truncated to allow better precision. It's still stored in seconds.
2. The previous logic for calculating stroke gap time of the build
modifier isn't correct, it used to only count two starting times as
gap time. Now it's fixed with correct delta time.
Pull Request: https://projects.blender.org/blender/blender/pulls/124350
This commit removes the extra initial_pivot_position variable from
SculptBoundary as well as the PBVHVertRef in favor of a single float3.
This value is effectively const for the lifetime of the struct in the
current state, as this value is only calculated and used at the
beginning of the brush stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/124755
This commit replaces the PBVHVertRef with specific float3 positions for
the edges. To ensure data is displayed correctly, we also remove the
conditional check on updating this data when drawing the cursor to
force recaculating the edge positions on the start of every brush
stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/124754
Issue happened in very old files only (pre 2.38), where versioning would
allocate tool-settings, without calling initialize logic for painting.
This should be fine, just handle the case properly where initialization
happens later, once the paint mode is actually entered.
Also adds missing default brush setting for this corner-case, where
texture paint data gets initialized only when entering the mode.
Part of #118145.
This brush first stores an array of translations for each vertex and
then reuses those translations for the rest of the stroke. I added
a few utilities to simplify storing the data for all vertices for the
multires and BMesh implementations. Compared to the old code,
computing the translations is skipped for completely hidden or
masked nodes. Also we don't skip hidden neighbors since that gives
better results. That wasn't as easy with the old API.
Pull Request: https://projects.blender.org/blender/blender/pulls/124569
Unions make handling of non-trivial data 'members'... non-trivial.
Since `PointerRNA` is going to become non-trivial, this commit replaces
the Union storing delta, min and max values of editied RNA properties
in `ui_selectcontext_apply`, into a `std::variant`.
It also adds a new accessor to RNA string properties, returning a
`std::string` data, and uses this type to store string properties values
in `ui_selectcontext_apply`.
Pull Request: https://projects.blender.org/blender/blender/pulls/124727
There was a case where we wouldn't convert edit curves correctly,
specifically when the user created an edit curve
(using "Curve Editing") and then changes the stroke outside of
curve editing. This invalidates the edit curve, but does not
deallocate it.
The conversion assumed that any allocated edit curve is valid.
Now we check for the `GP_CURVE_NEEDS_STROKE_UPDATE` flag
to skip invalid edit curves (and use the stroke instead).
color was not taken into consideration when picking a closure using
reservoir sampling, giving closures with dark color much higher weights
than they should have.
This fix multiplies the weight by the average color when picking the
closure, similar as what has been done in principled BSDF.
Pull Request: https://projects.blender.org/blender/blender/pulls/124730
This commit moves generated `RNA_blender.h`, `RNA_prototype.h` and
`RNA_blender_cpp.h` headers to become C++ header files.
It also removes the now useless `RNA_EXTERN_C` defines, and just
directly use the `extern` keyword. We do not need anymore `extern "C"`
declarations here.
Pull Request: https://projects.blender.org/blender/blender/pulls/124469
This PR will share render graphs between all contexts that run in
the same thread. This allows the draw manager commands to be added
to the same render graph as the UI.
- Fixes debug groups hiearchy. Draw manager would restart a hierarchy as
it wasn't aware of the debug groups already added by the UI
- Removes cpu sync when switching between contexts.
In a future change this is needed to improve discarding resources.
Pull Request: https://projects.blender.org/blender/blender/pulls/124715
Should be no functional changes on user level.
Incidentally, this change fixes memory leak in grease pencil.
For the ease of detecting memory leaks in the future we might
consider adding MEM_CXX_CLASS_ALLOC_FUNCS to the PaintModeData.
But maybe look into this as a separate follow-up.
Pull Request: https://projects.blender.org/blender/blender/pulls/124612
Blender was crashing when sculpting on a frame that had no keyframe
under the playhead.
Use brush from correct context with the help of `BKE_paint_get_active`.
Pull Request: https://projects.blender.org/blender/blender/pulls/124397
Since 7b0ea0f1b4, brushes use the asset system and previews are stored
in the asset source blend files. The bundled ones are part of the
essentials asset library, see
`release/datafiles/assets/publis/brushes/essentials_brushes.blend`.
Note that this doesn't remove the toolbar icons for these brushes yet.
Initially reviewed in (but this commit contains further changes missing
in the PR):
https://projects.blender.org/blender/blender/pulls/123842
Make sure the code that alters the VSE thumbnail to add transparency
(for disabled strips) works on a copy of the image, so that the extra
transparency does not get "stored" into the thumbnail cache.
Pull Request: https://projects.blender.org/blender/blender/pulls/124689
Previous code would declare properties as `extern PropertyRNA`, but
implement them as type-refined data (e.g. `FloatPropertyRNA`).
This is fully illegal thing, it happened to work 'fine' so far for two
main reasons:
* C-linking does not do type-checks on extern data.
* Code using these publicly exposed data would always use them as
`PorpertyRNA *` pointers, and pass them to RNA API.
However, this (finally !) breaks when trying to move generated
`RNA_property.h` header to C++, since at least MSVC2022 does mangle the
type in the extern'ed symbol name, which makes linking fails epically.
This commit fixes the issue by only declaring `PointerRNA *` pointers in
the headers. These pointers are then defined in each implementation file
(the `rna_xxx_gen.cc` ones), and assinged to the address of a matching
local static variable. These static variables are type-refined, and
actually contain the property definition data.
Pull Request: https://projects.blender.org/blender/blender/pulls/124603
Deleting keys via the right-click menu on property buttons failed to do anything
when the keys were part of a layered action.
The root cause was simply that the code for that hadn't been updated to support
layered actions yet. This updates that code to support Baklava phase-1 layered
actions.
Pull Request: https://projects.blender.org/blender/blender/pulls/124598
The problem was basically that, after efd3c4b3c9, `test_cagep` started
to be used without being calculated.
`test_cagep` represents the closest 3D point on an edge.
The solution was to edit the `knife_snap_edge_constrained` function to
calculate the `test_cagep` instead of the `closest_ss` (which is the
projected point).
Calculating `test_cagep`(3D) instead of `closest_ss`(2D) is
advantageous as we avoid matrix transformations and achieve more
precision.
We also deduplicate the code a bit since `closest_ss` can be obtained
by projecting `test_cagep`.
This commit also adds comments to the code, and renamed some variables
and functions for more clarity.
Pull Request: https://projects.blender.org/blender/blender/pulls/124701
This adds a new mode to the Color Balance node, which applies a white point
transformation similar to the one applied in the view transform.
Unlike the view transform, the compositor node allows specifying both the
source and the destination white point for more flexibility. Both default
to the D65 white point, so just leaving the destination alone achieves the
same behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/124110