From 8cbfc4c76ed7747111e387863ad511939d389d87 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 19 Aug 2020 11:55:45 +0200 Subject: Fix T79816: Restore scene.statistics() BPY function This RNA/BPY function was removed in c08d84748804. For understandable reasons really-- getting scene statistics from a string displayed in the status bar is not exactly the best design. But we have committed to not changing the RNA API too much for the 2.90 release, so we would like to keep this functionality. Differential Revision: https://developer.blender.org/D8604 Reviewd by: Julian Eisel --- source/blender/makesrna/intern/rna_screen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_screen.c') diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index fb2a60db0fd..ab84dcb0aba 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -288,9 +288,11 @@ static void rna_View2D_view_to_region( } } -static const char *rna_Screen_statusbar_info_get(struct bScreen *screen, Main *bmain, bContext *C) +static const char *rna_Screen_statusbar_info_get(struct bScreen *UNUSED(screen), + Main *bmain, + bContext *C) { - return ED_info_statusbar_string(bmain, screen, C); + return ED_info_statusbar_string(bmain, CTX_data_scene(C), CTX_data_view_layer(C)); } #else -- cgit v1.2.3