blender-v3.6-release backports #111977

Merged
Philipp Oeser merged 17 commits from lichtwerk/blender:blender-v3.6-release into blender-v3.6-release 2023-09-05 15:50:28 +02:00

17 Commits

Author SHA1 Message Date
Philipp Oeser af7df55c7d Fix #111490: paint radius set to 1 (shift-smoothing but brush missing)
buildbot/vexp-code-patch-coordinator Build done. Details
This affected sculpt, vertex- and weightpaint.

So attempting to (temporarily) switching to the smooth/blur tools from
another tool using the "Shift" shortcut can fail if the corresponding
smooth/blur brush is not found/missing [which was the case in the report
because the brush was deleted].

In this case, brushes dont really get switched, but blender would still
try to cache the size (because the smooth/blur brush temporarily uses
the same size as the previous brush) of the smooth brush in
`StrokeCache` (see `smooth_brush_toggle_on`). Then in
`smooth_brush_toggle_off` it was assumed brushes were actually switched
and the (non-existing) size of the (missing) smooth brush was applied to
the **actual** brush.

Now restructure code a bit so in the case of a missing brush we can
early out (without affecting the **actual** brush then).

Pull Request: #111516
2023-09-05 15:05:06 +02:00
YimingWu 6d0d07f0d8 Fix #111607: Do not unregister internal nodes
Registering a node with a `bl_idname` same as a built-in node will lead
to crash because `rna_Node_unregister` does not check `nt->rna_ext.data`
to see whether it's not null (which indicates whether this node is
registered with python or not). Now fixed.

Pull Request: #111615
2023-09-05 14:41:37 +02:00
Campbell Barton c3689c4235 Fix dangling pointer while scrubbing in the sequencer
SeqCache::last_key could be set to freed memory while scrubbing
two images in the sequencer.
2023-09-05 14:40:49 +02:00
Philipp Oeser 8dd151debc Fix: missing update when library override editable is toggled
If this is not a system override, this leads to the override actually
being reset (which might affect the 3Dview and most probably affects the
Properties Editor).

Now use the same modifiers as used elsewhere for resetting a library
override.

Pull Request: #111469
2023-09-05 14:37:17 +02:00
YimingWu c655db6185 Fix #111601: VSE strip modifier copy ensure unique name
Previously `SEQ_modifier_list_copy` in append mode does not ensure
unique strip name, which will result in duplicated names in target
modifier list, then `strip_modifier_remove(name="something")` can remove
the wrong one later on. Now fixed using `BLI_uniquename`.

Pull Request: #111602
2023-09-05 14:36:21 +02:00
Christoph Lendenfeld eb77eaa7d8 Fix: Memory leak in Graph editor keyframe jump
Introduced with #108549
Simply forgot to free the AnimData list

Pull Request: #111464
2023-09-05 13:49:26 +02:00
Bastien Montagne 282038ea03 Fix #111439: liboverride object cannot be made local from 3DView, if it has a local parent.
The code ensuring that an object (or obdata) is not made local if it is
used by linked data that is not tagged to be made local was blatantly
buggy, leading to over-detecting such cases.

Note that this code remains fairly fragile imho, think the whole Main
data-base of IDs should be checked, other data-types than Objects can
use objects! But this is for another day.
2023-09-05 13:44:23 +02:00
Campbell Barton 93cc31ab85 Cleanup: remove unused set callbacks from readonly RNA properties
Oversight in 8d9422cfe3.
2023-09-05 13:30:47 +02:00
Harley Acheson b9f78a0fcf Fix #110508: Text Object Select Attributes in Object Mode
Status of selected bold, italics, underline, and small caps requires
that the curve have an editfont object. Not checking for this works
interactively but can cause errors in Python. This PR adds explicit
getters and setters that check for editfont.

Pull Request: #110513
2023-09-05 13:23:48 +02:00
Philipp Oeser 557d3d7953 Fix #109427: Shortcut missing in animation editors channel context menu
Specifying the correct operator context (`INVOKE_REGION_CHANNELS` in
this case) is mandatory, otherwise looking up the shortcut in
`wm_keymap_item_find_props` will fetch the wrong region
(`RGN_TYPE_WINDOW` not `RGN_TYPE_CHANNELS`) and thus wont find the keymap
item in that region keymap.

This was already done for the other menus, not for the context menu
though.

Pull Request: #111376
2023-09-05 13:10:25 +02:00
Philipp Oeser 5f2ead7db0 Fix #94129: Unable to remove added keying set from context menu
Mistake in (7-year-old) f6c09eadf0.

The operator was just cancelled if the right button was found, instead
it should only cancel if the button is _not_ found.

Pull Request: #111373
2023-09-05 13:09:34 +02:00
Philipp Oeser 1aceeac984 Fix #111238: Arrow keys in some menus work in the opposite direction
Since menus are created flipped (from event handling point of view), the
root layout block needs to be flagged `UI_BLOCK_IS_FLIP`.
This was missing for a couple of `uiMenuCreateFunc`, namely:
- creating worspaces menu
- modifiers extra ops
- constraints extra ops
- GP modifiers extra ops
- GP Shader FX extra ops

Same fix as f51de2246c.

Not crtitcal, but could go into LTS I guess.

Pull Request: #111341
2023-09-05 13:05:52 +02:00
Harley Acheson dd7f974936 UI: Error Logging for Some Screen Operations
WM_report on the unlikely event when an area (smaller than minimums) is
within the combined operation bounds (close or join) and interferes.

Pull Request: #111280
2023-09-05 12:59:04 +02:00
Alaska ec1b417263 Fix #111277: NaN in Vector Displacement leading to render errors
Fixes NaN in Vector Displacement node caused by the normalization of
0, 0, 0 vectors.

This fixes both visual rendering issues and an "illegal address" error
on the GPU. The "illegal address" error came from the Light Tree
Sampling code not handling the NaN normals well, leading to weird code
paths being taken, eventually leading to a kernel_assert and a
user facing illegal address error.

Pull Request: #111294
2023-09-05 12:47:44 +02:00
Julian Eisel f420dabf8e Correction to b1b8091667: Use utility function
Avoid duplicated query.
2023-09-05 12:46:28 +02:00
Julian Eisel 63cad96833 Fix 106976: Crash when setting custom asset preview
When the temporary File Browser uses a maximized editor, it reuses the
File/Asset Browser under the cursor. When the file browsing action is
confirmed, the old editor state is restored but the file-list cleared,
so it fails to find the active asset and the ID it represents in
context.

Work around this by getting the ID before spawning the File Browser from
the operator.
2023-09-05 12:45:54 +02:00
Christoph Lendenfeld 3234da45a2 Fix #110053: Crash on linked animation data with drivers
When copying (CTRL+L->Animation Data) a driver between two objects
that are linked with library overrides, `AnimData` was not created.
This did crash Blender when it tried to use the `nullptr`

The reason it crashed is because the function
`DEG_id_tag_update()`
was never called.

Fix it by restructuring the code so the function gets called

Pull Request: #110795
2023-09-05 12:44:49 +02:00