From fd10ac9acaa0788ef5e73677a97e5cff27978d0c Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 24 Apr 2020 11:05:40 -0700 Subject: UI: Move Scene Statistics to the 3D Viewport Removes statistics from footer and to an (optional) overlay in 3DView. Differential Revision: https://developer.blender.org/D7410 Reviewed by Campbell Barton --- source/blender/makesrna/intern/rna_scene.c | 6 +++--- source/blender/makesrna/intern/rna_space.c | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 4ea90aef931..58602cc939f 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -924,11 +924,11 @@ static void rna_Scene_volume_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_VOLUME | ID_RECALC_SEQUENCER_STRIPS); } -static const char *rna_Scene_statistics_string_get(Scene *scene, - Main *bmain, +static const char *rna_Scene_statistics_string_get(Scene *UNUSED(scene), + Main *UNUSED(bmain), ViewLayer *view_layer) { - return ED_info_stats_string(bmain, scene, view_layer); + return ED_info_footer_string(view_layer); } static void rna_Scene_framelen_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 266bf1334ba..d0a126cd115 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3604,6 +3604,11 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Text", "Display overlay text"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_stats", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_STATS); + RNA_def_property_ui_text(prop, "Show Statistics", "Display scene statistics overlay text"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_extras", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna( prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_OBJECT_XTRAS); -- cgit v1.2.3