[Bf-blender-cvs] [4e3c6988b09] soc-2020-info-editor: changes from patch D6926 with resolved conflicts
Mateusz GrzeliÅski
noreply at git.blender.org
Mon Jun 8 12:30:44 CEST 2020
Commit: 4e3c6988b097993f4ba71b7d5c3f612dd83aa000
Author: Mateusz Grzeliński
Date: Sun Jun 7 12:05:45 2020 +0200
Branches: soc-2020-info-editor
https://developer.blender.org/rB4e3c6988b097993f4ba71b7d5c3f612dd83aa000
changes from patch D6926 with resolved conflicts
===================================================================
M release/scripts/startup/bl_ui/space_info.py
M source/blender/blenloader/intern/versioning_250.c
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/editors/space_info/info_report.c
M source/blender/editors/space_info/space_info.c
M source/blender/makesdna/DNA_space_types.h
M source/blender/makesdna/DNA_windowmanager_types.h
M source/blender/makesdna/intern/dna_rename_defs.h
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index cd65980fc0d..5f6dfba1a53 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -27,8 +27,19 @@ class INFO_HT_header(Header):
layout = self.layout
layout.template_header()
+ sinfo = context.space_data
+
INFO_MT_editor_menus.draw_collapsible(context, layout)
+ layout.separator_spacer()
+
+ row = layout.row(align=True)
+ row.prop(sinfo,"show_report_debug", icon_only=True)
+ row.prop(sinfo,"show_report_info", icon_only=True)
+ row.prop(sinfo,"show_report_operator", icon_only=True)
+ row.prop(sinfo,"show_report_warning", icon_only=True)
+ row.prop(sinfo,"show_report_error", icon_only=True)
+ row.prop(sinfo,"show_report_property", icon_only=True)
class INFO_MT_editor_menus(Menu):
bl_idname = "INFO_MT_editor_menus"
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index eaeef0d52c1..48da4fb0be1 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -1860,7 +1860,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
SpaceInfo *sinfo = (SpaceInfo *)sl;
ARegion *region;
- sinfo->rpt_mask = INFO_RPT_OP;
+ sinfo->report_mask_exclude = 0;
for (region = area->regionbase.first; region; region = region->next) {
if (region->regiontype == RGN_TYPE_WINDOW) {
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 91d89254c90..1d305426b72 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -176,6 +176,10 @@ static void blo_update_defaults_screen(bScreen *screen,
SpaceSeq *seq = area->spacedata.first;
seq->flag |= SEQ_SHOW_MARKERS | SEQ_SHOW_FCURVES;
}
+ else if (area->spacetype == SPACE_INFO) {
+ SpaceInfo *sinfo = area->spacedata.first;
+ sinfo->report_mask_exclude = 0;
+ }
else if (area->spacetype == SPACE_TEXT) {
/* Show syntax and line numbers in Script workspace text editor. */
SpaceText *stext = area->spacedata.first;
diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c
index adc6391a0f6..ca3a3708c6f 100644
--- a/source/blender/editors/space_info/info_report.c
+++ b/source/blender/editors/space_info/info_report.c
@@ -72,32 +72,30 @@ static void reports_select_all(ReportList *reports, int report_mask, int action)
}
}
-int info_report_mask(const SpaceInfo *UNUSED(sinfo))
+int info_report_mask(const SpaceInfo *sinfo)
{
-#if 0
int report_mask = 0;
- if (sinfo->rpt_mask & INFO_RPT_DEBUG) {
+ if (!(sinfo->report_mask_exclude & INFO_RPT_DEBUG)) {
report_mask |= RPT_DEBUG_ALL;
}
- if (sinfo->rpt_mask & INFO_RPT_INFO) {
+ if (!(sinfo->report_mask_exclude & INFO_RPT_INFO)) {
report_mask |= RPT_INFO_ALL;
}
- if (sinfo->rpt_mask & INFO_RPT_OP) {
+ if (!(sinfo->report_mask_exclude & INFO_RPT_OP)) {
report_mask |= RPT_OPERATOR_ALL;
}
- if (sinfo->rpt_mask & INFO_RPT_WARN) {
+ if (!(sinfo->report_mask_exclude & INFO_RPT_WARN)) {
report_mask |= RPT_WARNING_ALL;
}
- if (sinfo->rpt_mask & INFO_RPT_ERR) {
+ if (!(sinfo->report_mask_exclude & INFO_RPT_ERR)) {
report_mask |= RPT_ERROR_ALL;
}
+ if (!(sinfo->report_mask_exclude & INFO_RPT_PROP)) {
+ report_mask |= RPT_PROPERTY_ALL;
+ }
return report_mask;
-#endif
-
- return RPT_DEBUG_ALL | RPT_INFO_ALL | RPT_OPERATOR_ALL | RPT_PROPERTY_ALL | RPT_WARNING_ALL |
- RPT_ERROR_ALL;
}
// TODO, get this working again!
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 04df0f0d4f0..1ba12c4c954 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -61,7 +61,7 @@ static SpaceLink *info_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
sinfo = MEM_callocN(sizeof(SpaceInfo), "initinfo");
sinfo->spacetype = SPACE_INFO;
- sinfo->rpt_mask = INFO_RPT_OP;
+ sinfo->report_mask_exclude = 0;
/* header */
region = MEM_callocN(sizeof(ARegion), "header for info");
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 31a8d967ccf..ad0b95aeffc 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -111,17 +111,18 @@ typedef struct SpaceInfo {
char _pad0[6];
/* End 'SpaceLink' header. */
- char rpt_mask;
+ char report_mask_exclude;
char _pad[7];
} SpaceInfo;
-/* SpaceInfo.rpt_mask */
+/* SpaceInfo.report_mask_exclude */
typedef enum eSpaceInfo_RptMask {
INFO_RPT_DEBUG = (1 << 0),
INFO_RPT_INFO = (1 << 1),
INFO_RPT_OP = (1 << 2),
INFO_RPT_WARN = (1 << 3),
INFO_RPT_ERR = (1 << 4),
+ INFO_RPT_PROP = (1 << 5),
} eSpaceInfo_RptMask;
/** \} */
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index e1e8d808c60..909b7204bd7 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -57,7 +57,7 @@ struct wmTimer;
#define OP_MAX_TYPENAME 64
#define KMAP_MAX_NAME 64
-/* keep in sync with 'rna_enum_wm_report_items' in wm_rna.c */
+/* keep in sync with 'rna_enum_wm_report_items' in rna_wm.c */
typedef enum ReportType {
RPT_DEBUG = (1 << 0),
RPT_INFO = (1 << 1),
diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h
index aabc16c4111..75f91a6be53 100644
--- a/source/blender/makesdna/intern/dna_rename_defs.h
+++ b/source/blender/makesdna/intern/dna_rename_defs.h
@@ -84,6 +84,7 @@ DNA_STRUCT_RENAME_ELEM(Object, size, scale)
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dup_group, instance_collection)
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dup_ob, instance_object)
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dupliweights, instance_weights)
+DNA_STRUCT_RENAME_ELEM(SpaceInfo, rpt_mask, report_mask_exclude)
DNA_STRUCT_RENAME_ELEM(ThemeSpace, scrubbing_background, time_scrub_background)
DNA_STRUCT_RENAME_ELEM(ThemeSpace, show_back_grad, background_type)
DNA_STRUCT_RENAME_ELEM(View3D, far, clip_end)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index df0d514fabf..6baacb8f091 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -6075,28 +6075,39 @@ static void rna_def_space_info(BlenderRNA *brna)
/* reporting display */
prop = RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_DEBUG);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "report_mask_exclude", INFO_RPT_DEBUG);
RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info");
+ RNA_def_property_ui_icon(prop, ICON_SYSTEM, 0);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
prop = RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_INFO);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "report_mask_exclude", INFO_RPT_INFO);
RNA_def_property_ui_text(prop, "Show Info", "Display general information");
+ RNA_def_property_ui_icon(prop, ICON_INFO, 0);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
prop = RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_OP);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "report_mask_exclude", INFO_RPT_OP);
RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log");
+ RNA_def_property_ui_icon(prop, ICON_CHECKMARK, 0);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL);
prop = RNA_def_property(srna, "show_report_warning", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_WARN);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "report_mask_exclude", INFO_RPT_WARN);
RNA_def_property_ui_text(prop, "Show Warn", "Display warnings");
+ RNA_def_property_ui_icon(prop, ICON_ERROR, 0);
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);
}
More information about the Bf-blender-cvs
mailing list