Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/bl_ui/space_stats.py7
-rw-r--r--source/blender/editors/space_stats/space_stats.c11
-rw-r--r--source/blender/makesdna/DNA_space_types.h8
-rw-r--r--source/blender/makesrna/intern/rna_space.c13
-rw-r--r--source/blender/windowmanager/WM_types.h3
5 files changed, 38 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_stats.py b/release/scripts/startup/bl_ui/space_stats.py
index 72a4ae61917..e8fb29735af 100644
--- a/release/scripts/startup/bl_ui/space_stats.py
+++ b/release/scripts/startup/bl_ui/space_stats.py
@@ -26,7 +26,14 @@ class LAYERS_HT_header(Header):
def draw(self, context):
layout = self.layout
+
+ space = context.space_data
+
layout.template_header()
+ layout.separator()
+
+ layout.prop(space, "logging_type", expand=True)
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/source/blender/editors/space_stats/space_stats.c b/source/blender/editors/space_stats/space_stats.c
index 86659661357..bc79231d976 100644
--- a/source/blender/editors/space_stats/space_stats.c
+++ b/source/blender/editors/space_stats/space_stats.c
@@ -124,9 +124,16 @@ static void stats_header_region_draw(const bContext *C, ARegion *ar)
ED_region_header(C, ar);
}
-static void stats_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn))
+static void stats_main_region_listener(bScreen *UNUSED(sc), ScrArea *sa, ARegion *UNUSED(ar), wmNotifier *wmn)
{
- /* context changes */
+ switch(wmn->category) {
+ case NC_SPACE: {
+ if (wmn->data == ND_SPACE_STATS) {
+ ED_area_tag_redraw(sa);
+ }
+ break;
+ }
+ }
}
/* only called once, from space/spacetypes.c */
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index bdcd6a9c1db..d990f8813bc 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -1339,9 +1339,15 @@ typedef struct SpaceStats {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- int pad;
+ int logging_type;
} SpaceStats;
+typedef enum eSpaceStats_Logging_Type {
+ LOG_OPERATORS = 0,
+ LOG_RENDERING = 1,
+ LOG_DEPSGRAPH = 2,
+} eSpaceStats_Logging_Type;
+
/* **************** SPACE DEFINES ********************* */
/* space types, moved from DNA_screen_types.h */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 00280749c9f..a422707c69e 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -4741,10 +4741,23 @@ static void rna_def_space_clip(BlenderRNA *brna)
static void rna_def_space_stats(BlenderRNA *brna)
{
StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem logging_display_items[] = {
+ {LOG_OPERATORS, "LOG_OPERATORS", ICON_POSE_DATA, "Operators", "Show operator logging output"},
+ {LOG_RENDERING, "LOG_RENDERING", ICON_RENDER_STILL, "Rendering", "Show render logging output"},
+ {LOG_DEPSGRAPH, "LOG_DEPSGRAPH", ICON_SCENE_DATA, "Dependency Graph", "Show dependency graph logging output"},
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "SpaceStatsEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceStats");
RNA_def_struct_ui_text(srna, "Space Stats Editor", "Stats Editor space data");
+
+ prop = RNA_def_property(srna, "logging_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, logging_display_items);
+ RNA_def_property_ui_text(prop, "Logging Mode", "Display mode for logging list");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_STATS, NULL);
}
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 0fe3e8a0fcf..7fae061c6ea 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -361,7 +361,8 @@ typedef struct wmNotifier {
#define ND_SPACE_NODE_VIEW (17<<16)
#define ND_SPACE_CHANGED (18<<16) /*sent to a new editor type after it's replaced an old one*/
#define ND_SPACE_CLIP (19<<16)
-#define ND_SPACE_FILE_PREVIEW (20<<16)
+#define ND_SPACE_FILE_PREVIEW (20<<16)
+#define ND_SPACE_STATS (21<<16)
/* subtype, 256 entries too */
#define NOTE_SUBTYPE 0x0000FF00