Fix T102495: Fix UI-invisible warning and failing liboverride creation in IDTemplate in some cases.

Replace `RNA_warning` uage by `WM_report`.

And allow creating liboverrides of linked obdata used by purely local
objects.
This commit is contained in:
Bastien Montagne 2022-11-15 15:48:30 +01:00
parent 0ecf6f2abb
commit 4d1a88e374
Notes: blender-bot 2023-02-14 06:00:47 +01:00
Referenced by issue #102495, Library override creation fails silently
1 changed files with 5 additions and 1 deletions

View File

@ -838,6 +838,10 @@ ID *ui_template_id_liboverride_hierarchy_make(
bmain, scene, view_layer, NULL, id, &object_active->id, NULL, &id_override, false);
}
}
else {
BKE_lib_override_library_create(
bmain, scene, view_layer, NULL, id, id, NULL, &id_override, false);
}
break;
case ID_MA:
case ID_TE:
@ -897,7 +901,7 @@ static void template_id_liboverride_hierarchy_make(bContext *C,
}
}
else {
RNA_warning("The data-block %s could not be overridden", id->name);
WM_reportf(RPT_WARNING, "The data-block %s could not be overridden", id->name);
}
}