Fix #111067: NLA tracks cannot be renamed from Outliner #111110

Merged
Philipp Oeser merged 1 commits from lichtwerk/blender:111067 into main 2023-08-14 15:27:25 +02:00
2 changed files with 6 additions and 2 deletions

View File

@ -757,6 +757,10 @@ static void namebutton_fn(bContext *C, void *tsep, char *oldname)
DEG_id_tag_update(tselem->id, ID_RECALC_COPY_ON_WRITE);
break;
}
case TSE_NLA_TRACK: {
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_RENAME, nullptr);
break;
}
case TSE_EBONE: {
bArmature *arm = (bArmature *)tselem->id;
if (arm->edbo) {

View File

@ -336,10 +336,10 @@ static void do_item_rename(ARegion *region,
else if (ELEM(tselem->type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) {
BKE_report(reports, RPT_WARNING, "Cannot edit sequence name");
}
else if (ID_IS_LINKED(tselem->id)) {
else if (TSE_IS_REAL_ID(tselem) && ID_IS_LINKED(tselem->id)) {
BKE_report(reports, RPT_WARNING, "Cannot edit external library data");
}
else if (ID_IS_OVERRIDE_LIBRARY(tselem->id)) {
else if (TSE_IS_REAL_ID(tselem) && ID_IS_OVERRIDE_LIBRARY(tselem->id)) {
BKE_report(reports, RPT_WARNING, "Cannot edit name of an override data-block");
}
else if (outliner_is_collection_tree_element(te)) {