[Bf-blender-cvs] [cdcbf05ea88] master: BLI: Make Report Missing Files display message when no files are missing

Colin Basnett noreply at git.blender.org
Wed Nov 23 01:49:13 CET 2022


Commit: cdcbf05ea884978c23e38912edda93b15dd0949c
Author: Colin Basnett
Date:   Tue Nov 22 16:44:57 2022 -0800
Branches: master
https://developer.blender.org/rBcdcbf05ea884978c23e38912edda93b15dd0949c

BLI: Make Report Missing Files display message when no files are missing

Before this, if there were no missing files, the operator would run
successfully but there would be no user feedback at all, making the
user wonder if the operator was even run.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D16585

===================================================================

M	source/blender/blenkernel/intern/bpath.c

===================================================================

diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c
index 61893ca25ed..95d6121fc13 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -236,6 +236,10 @@ void BKE_bpath_missing_files_check(Main *bmain, ReportList *reports)
       .flag = BKE_BPATH_FOREACH_PATH_ABSOLUTE | BKE_BPATH_FOREACH_PATH_SKIP_PACKED |
               BKE_BPATH_FOREACH_PATH_RESOLVE_TOKEN | BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES,
       .user_data = reports});
+
+  if (BLI_listbase_is_empty(&reports->list)) {
+    BKE_reportf(reports, RPT_INFO, "No missing files");
+  }
 }
 
 /** \} */



More information about the Bf-blender-cvs mailing list