[Bf-blender-cvs] [b62220921b0] soc-2020-info-editor: Convert print to report

Mateusz Grzeliński noreply at git.blender.org
Fri Jul 31 15:52:18 CEST 2020


Commit: b62220921b031ff95fd8e3e403cc67258387a22b
Author: Mateusz Grzeliński
Date:   Fri Jul 31 14:10:53 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rBb62220921b031ff95fd8e3e403cc67258387a22b

Convert print to report

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

M	source/blender/blenloader/intern/versioning_290.c

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

diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index b6caa018756..87e91f42143 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -23,6 +23,7 @@
 #include "BLI_listbase.h"
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
+#include <BKE_report.h>
 
 #include "DNA_brush_types.h"
 #include "DNA_constraint_types.h"
@@ -45,7 +46,7 @@
 /* Make preferences read-only, use versioning_userdef.c. */
 #define U (*((const UserDef *)&U))
 
-void do_versions_after_linking_290(Main *bmain, ReportList *UNUSED(reports))
+void do_versions_after_linking_290(Main *bmain, ReportList *reports)
 {
   if (!MAIN_VERSION_ATLEAST(bmain, 290, 1)) {
     /* Patch old grease pencil modifiers material filter. */
@@ -198,10 +199,11 @@ void do_versions_after_linking_290(Main *bmain, ReportList *UNUSED(reports))
   {
     LISTBASE_FOREACH (Collection *, collection, &bmain->collections) {
       if (BKE_collection_cycles_fix(bmain, collection)) {
-        printf(
-            "WARNING: Cycle detected in collection '%s', fixed as best as possible.\n"
-            "You may have to reconstruct your View Layers...\n",
-            collection->id.name);
+        BKE_reportf(reports,
+                    RPT_WARNING,
+                    "WARNING: Cycle detected in collection '%s', fixed as best as possible.\n"
+                    "You may have to reconstruct your View Layers...",
+                    collection->id.name);
       }
     }
     /* Keep this block, even when empty. */



More information about the Bf-blender-cvs mailing list