[Bf-blender-cvs] [dc8a487f28c] soc-2020-info-editor: Merge branch 'D8105-text-search' into soc-2020-info-editor
Mateusz GrzeliÅski
noreply at git.blender.org
Tue Jun 30 17:24:58 CEST 2020
Commit: dc8a487f28cb92093c9ee5caba2c307f73bd474a
Author: Mateusz Grzeliński
Date: Tue Jun 30 17:05:10 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rBdc8a487f28cb92093c9ee5caba2c307f73bd474a
Merge branch 'D8105-text-search' into soc-2020-info-editor
# Conflicts:
# source/blender/editors/space_info/info_report.c
# source/blender/makesdna/DNA_space_types.h
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_info.py
index 2497e007610,eeef4170818..be907cb01a6
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@@ -26,14 -26,13 +26,18 @@@ class INFO_HT_header(Header)
def draw(self, context):
layout = self.layout
layout.template_header()
+ sinfo = context.space_data
INFO_MT_editor_menus.draw_collapsible(context, layout)
+ row = layout.row(align=True)
+ row.prop(sinfo, "filter_text", text="")
+ layout.separator_spacer()
+ layout.separator_spacer()
+
+ row = layout.row(align=True)
+ row.popover(panel="INFO_PT_report_type_visibility", text="", icon="FILTER")
+
class INFO_MT_editor_menus(Menu):
bl_idname = "INFO_MT_editor_menus"
diff --cc source/blender/editors/space_info/info_report.c
index 7fa9c557114,8b6b5234ec0..666aee829ec
--- a/source/blender/editors/space_info/info_report.c
+++ b/source/blender/editors/space_info/info_report.c
@@@ -41,9 -42,16 +41,15 @@@
#include "info_intern.h"
+#define REPORT_INDEX_INVALID -1
+
- static void reports_select_all(ReportList *reports, int report_mask, int action)
+ /* return true if substring is found */
+ bool info_filter_text(const Report *report, const char *search_string)
+ {
+ return strstr(report->message, search_string) != NULL;
+ }
+
-static void reports_select_all(ReportList *reports,
- int report_mask,
- const char *search_string,
- int action)
++static void reports_select_all(ReportList *reports, int report_mask, const char *search_string, int action)
{
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
diff --cc source/blender/makesdna/DNA_space_types.h
index 58a68217733,198372dfc5a..b5698f3cc6b
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@@ -111,12 -111,12 +111,13 @@@ typedef struct SpaceInfo
char _pad0[6];
/* End 'SpaceLink' header. */
- char rpt_mask;
- char _pad[7];
+ char report_mask_exclude;
+ char _pad[3];
+ int active_report_index;
+ char search_string[64];
} SpaceInfo;
-/* SpaceInfo.rpt_mask */
+/* SpaceInfo.report_mask_exclude */
typedef enum eSpaceInfo_RptMask {
INFO_RPT_DEBUG = (1 << 0),
INFO_RPT_INFO = (1 << 1),
diff --cc source/blender/makesrna/intern/rna_space.c
index a1aac77f799,d5b3d69afe9..9b054f1d7fc
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@@ -6089,16 -6085,16 +6089,23 @@@ static void rna_def_space_info(BlenderR
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
prop = RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_ERR);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "report_mask_exclude", INFO_RPT_ERR);
RNA_def_property_ui_text(prop, "Show Error", "Display error text");
+ RNA_def_property_ui_icon(prop, ICON_CANCEL, 0);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
+
+ prop = RNA_def_property(srna, "show_report_property", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "report_mask_exclude", INFO_RPT_PROP);
+ RNA_def_property_ui_text(prop, "Show Property", "Display property change");
+ RNA_def_property_ui_icon(prop, ICON_PROPERTIES, 0);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
+
+ prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "search_string");
+ RNA_def_property_ui_text(prop, "Log Filter", "Live filtering string");
+ RNA_def_property_flag(prop, PROP_TEXTEDIT_UPDATE);
+ RNA_def_property_ui_icon(prop, ICON_VIEWZOOM, 0);
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, NULL);
}
static void rna_def_space_userpref(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list