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
The projection was transformed by the object transform, but it's meant
to be in camera space, not affected by the camera view transform or by
the local object's transform. This fix makes viewport raycasting use
cases work without a manual fix in nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/124610
Currently the node tool operator stores the mouse position from
the first execution because it's not possible to retrieve it again from
the operator redo callback which doesn't have access to the event.
However, other inputs like the region size and the viewport transform
are retrieved again for every redo execution. This creates inconsistency
and generally makes redo less useful for node tools than it should be.
Generally tweaking an input in the redo panel should keep everything
else the same.
This commit adds the rest of the inputs as RNA properties just like
how mouse position is already handled.
Pull Request: https://projects.blender.org/blender/blender/pulls/124557
This allows the draw tool to temporarily enable the eraser.
Adds a new `BrushStrokeMode` called `BRUSH_STROKE_ERASE`.
This is used by the keymap to enable erasing while using
the draw tool with CTRL.
Pull Request: https://projects.blender.org/blender/blender/pulls/124591
Interpolation tool for strokes ported from GPv2.
Adds a new operator that inserts a new frame with interpolated curves.
The source curves are taken from the previous/next keyframe.
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/122155
Previously the spans would be drawn even if you had slid the retiming
keys out of bounds of the strip margins, leading to them being drawn out
side of the strip.
Pull Request: https://projects.blender.org/blender/blender/pulls/123438
Updates the slide operator to be able to do subframe adjustments of
audio strips. If you hold shift while sliding (the S shortcut), it will
start to do subframe adjustments. It is also possible to type in
fractional inputs while in modal mode. (IE start sliding then type 1.5)
Regular sound offsets (based on VSE strip offset) only worked with
negative values even if the waveform was draw correctly. Fix so positive
frame offsets does the correct thing.