From df02675e21736bd79acb0e34bb410efe748a86bc Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 26 Jun 2018 17:19:25 +0200 Subject: UI: move modal operator text from headers to status bar. Python API is context.workspace.status_text_set() --- source/blender/makesrna/intern/rna_workspace_api.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_workspace_api.c') diff --git a/source/blender/makesrna/intern/rna_workspace_api.c b/source/blender/makesrna/intern/rna_workspace_api.c index 81606dfba4a..1f3930c7259 100644 --- a/source/blender/makesrna/intern/rna_workspace_api.c +++ b/source/blender/makesrna/intern/rna_workspace_api.c @@ -41,6 +41,8 @@ #ifdef RNA_RUNTIME +#include "ED_screen.h" + static void rna_WorkspaceTool_setup( ID *id, bToolRef *tref, @@ -80,10 +82,14 @@ static PointerRNA rna_WorkspaceTool_operator_properties( #else -void RNA_api_workspace(StructRNA *UNUSED(srna)) +void RNA_api_workspace(StructRNA *srna) { - /* FunctionRNA *func; */ - /* PropertyRNA *parm; */ + FunctionRNA *func; + + func = RNA_def_function(srna, "status_text_set", "ED_workspace_status_text"); + RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); + RNA_def_function_ui_description(func, "Set the status bar text, typically for modal operators"); + RNA_def_string(func, "text", NULL, 0, "Text", "New string for the status bar, no argument clears the text"); } void RNA_api_workspace_tool(StructRNA *srna) -- cgit v1.2.3