Merge branch 'blender-v3.4-release'

This commit is contained in:
Bastien Montagne
2022-11-15 16:04:35 +01:00
2 changed files with 13 additions and 7 deletions

View File

@@ -686,7 +686,7 @@ ID *ui_template_id_liboverride_hierarchy_make(
* NOTE: do not attempt to perform such hierarchy override at all cost, if there is not enough
* context, better to abort than create random overrides all over the place. */
if (!ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(id)) {
RNA_warning("The data-block %s is not overridable", id->name);
WM_reportf(RPT_ERROR, "The data-block %s is not overridable", id->name);
return NULL;
}
@@ -838,22 +838,27 @@ 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:
case ID_IM:
RNA_warning("The type of data-block %s could not yet implemented", id->name);
WM_reportf(RPT_WARNING, "The type of data-block %s is not yet implemented", id->name);
break;
case ID_WO:
RNA_warning("The type of data-block %s could not yet implemented", id->name);
WM_reportf(RPT_WARNING, "The type of data-block %s is not yet implemented", id->name);
break;
case ID_PA:
RNA_warning("The type of data-block %s could not yet implemented", id->name);
WM_reportf(RPT_WARNING, "The type of data-block %s is not yet implemented", id->name);
break;
default:
RNA_warning("The type of data-block %s could not yet implemented", id->name);
WM_reportf(RPT_WARNING, "The type of data-block %s is not yet implemented", id->name);
break;
}
if (id_override != NULL) {
id_override->override_library->flag &= ~IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED;
*r_undo_push_label = "Make Library Override Hierarchy";
@@ -897,7 +902,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_ERROR, "The data-block %s could not be overridden", id->name);
}
}

View File

@@ -893,7 +893,8 @@ static void wm_add_reports(ReportList *reports)
void WM_report(eReportType type, const char *message)
{
ReportList reports;
BKE_reports_init(&reports, RPT_STORE);
BKE_reports_init(&reports, RPT_STORE | RPT_PRINT);
BKE_report_print_level_set(&reports, RPT_WARNING);
BKE_report(&reports, type, message);
wm_add_reports(&reports);