[Bf-blender-cvs] [6ac0a9012ce] soc-2020-info-editor: Add comments and todos

Mateusz Grzeliński noreply at git.blender.org
Mon Jul 6 16:48:46 CEST 2020


Commit: 6ac0a9012ced65f56bc78b2515b715258b6f3383
Author: Mateusz Grzeliński
Date:   Mon Jul 6 15:48:42 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rB6ac0a9012ced65f56bc78b2515b715258b6f3383

Add comments and todos

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

M	source/blender/makesdna/DNA_windowmanager_types.h
M	source/blender/python/intern/bpy_interface.c
M	source/blender/python/intern/bpy_interface_inoutwrapper.c
M	source/blender/windowmanager/intern/wm_event_system.c

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

diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 85be74bc921..d9471edbd07 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -59,7 +59,7 @@ struct wmTimer;
 
 /* keep in sync with 'rna_enum_wm_report_items' in rna_wm.c */
 typedef enum ReportType {
-//  RPT_DEBUG = (1 << 0), // unused
+  /* RPT_DEBUG = (1 << 0), // unused, replaced with logs */
   RPT_INFO = (1 << 1),
   RPT_OPERATOR = (1 << 2),
   RPT_PROPERTY = (1 << 3),
@@ -79,8 +79,8 @@ typedef enum ReportType {
   (RPT_ERROR | RPT_ERROR_INVALID_INPUT | RPT_ERROR_INVALID_CONTEXT | RPT_ERROR_OUT_OF_MEMORY)
 
 enum ReportListFlags {
-//  RPT_PRINT = (1 << 0), // unused
-//  RPT_STORE = (1 << 1), // usused
+  /* RPT_PRINT = (1 << 0), unused, replaced with logs */
+  /* RPT_STORE = (1 << 1), usused, replaced with logs */
   RPT_FREE = (1 << 2),
   RPT_OP_HOLD = (1 << 3), /* don't move them into the operator global list (caller will use) */
 };
@@ -103,9 +103,9 @@ typedef struct Report {
 typedef struct ReportList {
   ListBase list;
   /** ReportType. */
-  int printlevel;
+  int printlevel; /* the 'printing' means showing popup in UI */
   /** ReportType. */
-  int storelevel; // unused
+  int storelevel; /* unused, after introducing logs, this is unnecessary */
   int flag;
   char _pad[4];
   struct wmTimer *reporttimer;
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 5b949c7d1a5..2525c72d71f 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -554,6 +554,7 @@ static bool python_script_exec(
 
         fclose(fp);
 
+        // TODO (grzelins) catch python evaluation logs
         py_result = PyRun_String(pystring, Py_file_input, py_dict, py_dict);
       }
 #else
diff --git a/source/blender/python/intern/bpy_interface_inoutwrapper.c b/source/blender/python/intern/bpy_interface_inoutwrapper.c
index e0d7bb75ec4..61fae8f05e2 100644
--- a/source/blender/python/intern/bpy_interface_inoutwrapper.c
+++ b/source/blender/python/intern/bpy_interface_inoutwrapper.c
@@ -36,6 +36,7 @@ PyObject *stderr_backup = NULL;
 PyObject *string_io_buf = NULL;
 PyObject *string_io_getvalue = NULL;
 
+/* TODO (grzelins) move this whole implementation to bpy_capi_utils? */
 PyObject *BPY_intern_init_io_wrapper()
 {
   PyImport_ImportModule("sys");
@@ -62,6 +63,7 @@ PyObject *BPY_intern_init_io_wrapper()
     return NULL;
   }
 
+  // TODO (grzelins) fix return warning
   return 1;
 }
 
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 572e77fa87f..5504b2679f8 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1118,6 +1118,7 @@ bool WM_operator_is_repeat(const bContext *C, const wmOperator *op)
   return (op_prev && (op->type == op_prev->type));
 }
 
+/* TODO (grzelins) investigate usages with NULL as reports */
 static wmOperator *wm_operator_create(wmWindowManager *wm,
                                       wmOperatorType *ot,
                                       PointerRNA *properties,



More information about the Bf-blender-cvs mailing list