After applying fill tool, the `LEGACY_RADIUS_CONVERSION_FACTOR` was not
multiplied back so the value in the brush settings panel will become
smaller and smaller for each execution of the tool. Now fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/130120
The default mouse cursor would show if the user disabled the paint cursor.
This is not ideal, because the default cursor is pretty big and gets in the way,
especially for tablet users.
The fix sets the cursor to `DOT` (which is very small) when the
"Show Paint Cursor" option is disabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/130118
When changing render engine, we discard the persistent data
that could be saved for all the current render instance that
exists. This is to save memory for the new renderer.
When doing so while rendering for F12, `engine_depsgraph_free`
is called after waiting for the render to finish. But this
can be called before the renderer destruction and on the main
thread.
Doing so on the main thread means that the `gpu_context` used
by the renderer cannot be bound for the sake of just receiving
the orphan buffers that the depsgraph holds. This is because
only the worker thread can make the gpu context active.
Binding the draw gpu context in this situation avoid all
possible conflict.
This is basically doing exactly what the
`DRW_render_context_enable/disable` function is doing internally
if the render engine gpu context is null.
Pull Request: https://projects.blender.org/blender/blender/pulls/129982
The issue was that if the `delta_time` attribute didn't exist, the drawing
would appear immediatley.
In case we don't have any drawing speed information, the fix
makes it so that we fallback to use the number of frames
to build the strokes.
Pull Request: https://projects.blender.org/blender/blender/pulls/130035
This seems like a long-standing misuse of the custom vert normal APIs.
It broke, obviously so, in 3.1 but 3.0 was also rather fragile as was
noted in the original bug report.
The `BKE_mesh_set_custom_normals_from_verts` should be the correct API
to use when loading in vert normals from external files. The current
code would yield faceted mesh shading, as-if there were no custom
normals at all.
Pull Request: https://projects.blender.org/blender/blender/pulls/130069
The `_EXCEPTION_POINTERS` structure is valid only within the context of
the `UnhandledExceptionFilter` function.
After the function exits, the memory referenced by the pointer might no
longer be valid or the exception information.
The solution for this was to create `BLI_system_backtrace_with_os_info`
and passing a system-specific data as the second argument.
`BLI_system_backtrace` calls `BLI_system_backtrace_with_os_info` with a
null second argument internally.
Pull Request: https://projects.blender.org/blender/blender/pulls/129999
d2a802d3c6 got overzealous by removing the "tweak" property which was
actually necessary to differentiate box select on click-drag vs. box
select on B. Fix by restoring the tweak property for everything but
preview keymap items (where it doesn't actually do anything).
Main reason this happened is because the original description was a bit
too cryptic, so update it to be clearer.
Pull Request: https://projects.blender.org/blender/blender/pulls/130015
Printf buffer read needs to be inside render boundaries
to work. Since render boundaries can be nested, use a stack.
Fixes assert when quitting blender.
The crash was caused by the texture wrapper being out of date.
This happened after workbench finished rendering AntiAliasing and
going into blit-result-only mode. Doing so was causing a use after
free caught by ASAN.
But this only partially fix the bug as workbench render then becomes
uninitialized (black most likely) after dragging the window to the
second monitor. This is because the TAA texture gets recreated since
the new viewport resolution doesn't match the old one. But this
recreation does not tag as a viewport update so the TAA stays in
blit-result-only mode.
Detecting the viewport resolution change at the engine init level
seems the safest option for now, and it fixes the remaining issue.
To be backported to 4.2.
Pull Request: https://projects.blender.org/blender/blender/pulls/130043
10ef436c8f sets the tooltip callback for asset shelf buttons, causing a
code path to be executed that refreshes tooltips in `UI_block_end()`.
This relied on projection matrices being stored for blocks to position
the tooltips, which were incorrect. I think this would be a general
issue for dynamically sized regions, but keeping the fix minimal for now
to avoid further issues.
Layers and layer groups did not generate message bus callbacks.
This was a regression from 4.2. The fix adds
`WM_msg_publish_rna_prop` to (some) places where the layers/groups
change or the active one changes.
Also resolves#129539.
Note: This does not cover every possible scenario and only fixes
the regressions from 4.2. The message bus is still very unreliable
when it comes to detecting changes of properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/130039
The merge layer operator did not copy the parameters of the original
Grease Pencil meaning that it would e.g. loose onion skinning settings.
This fixes the issue by making sure to copy the parameters.
This was caused by 9a03f283e8.
The change disregarded the `orig_layers_to_apply` mask and
introduced some issues regarding clearing keyframes of deleted layers.
The fix does two things:
* Add a `orig_layers_to_apply` set that contains the pointers of the
original layers that we want to apply.
* Add a `orig_layers_to_clear` set that contains the pointers of original
layers that need their keyframe cleared.
When a layer is removed during modifier execution, we don't want
the layer to be deleted in the original geometry. Instead we clear
the keyframes by deleting all the curves geometry. A layer
can be removed by e.g. using the `Grease Pencil to Curves` node to
get curve instances, then the `Delete Geometry` node to delete
some instances, and finally `Curves to Grease Pencil` to convert back
to Grease Pencil.
Pull Request: https://projects.blender.org/blender/blender/pulls/130028