Fix: Crash renaming modifier in Outliner and then toggling a property
If a modifier gets renamed elsewhere (through the UI in the Properties Editor, python, ...) this ends up calling `rna_Modifier_name_update` -- which went fine because it does the neccessary depsgraph relations update. Doing the same from the Outliner missed that which then lead to crashes in depsgraph modifier evaluation. To resolve, add a case for `TSE_MODIFIER` in the Outliners `namebutton_fn` that adds the required depsgraph relations update. Also adds an appropriate notifier, so the name changes appear immediately elsewhere in the UI. Fixes #130536 Pull Request: https://projects.blender.org/blender/blender/pulls/130587
This commit is contained in:
committed by
Philipp Oeser
parent
15cdeae620
commit
ba92a25e1c
@@ -779,6 +779,12 @@ static void namebutton_fn(bContext *C, void *tsep, char *oldname)
|
||||
undo_str = "Rename NLA Track";
|
||||
break;
|
||||
}
|
||||
case TSE_MODIFIER: {
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER | NA_RENAME, nullptr);
|
||||
DEG_relations_tag_update(bmain);
|
||||
undo_str = "Rename Modifier";
|
||||
break;
|
||||
}
|
||||
case TSE_EBONE: {
|
||||
bArmature *arm = (bArmature *)tselem->id;
|
||||
if (arm->edbo) {
|
||||
|
||||
Reference in New Issue
Block a user