diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-30 08:16:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-30 08:20:38 +0300 |
commit | f907eb4268ccea96869fc36c8aa1045507c066e8 (patch) | |
tree | dbbc3602b85d369365dc601ac60f984fbe09bea7 /source | |
parent | f711c44b8dc8e10b37b387cefabb7236ae77decd (diff) |
PyAPI: Use 'None' arg to clear header text
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_screen.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace_api.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index fdfbdfa4b39..f4311f820ce 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -332,8 +332,9 @@ static void rna_def_area_api(StructRNA *srna) func = RNA_def_function(srna, "header_text_set", "ED_area_status_text"); RNA_def_function_ui_description(func, "Set the header status text"); - parm = RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, empty string clears the text"); + parm = RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, None clears the text"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + RNA_def_property_clear_flag(parm, PROP_NEVER_NULL); } static void rna_def_area(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_workspace_api.c b/source/blender/makesrna/intern/rna_workspace_api.c index 398da78d7f9..83ee5195fd8 100644 --- a/source/blender/makesrna/intern/rna_workspace_api.c +++ b/source/blender/makesrna/intern/rna_workspace_api.c @@ -176,8 +176,9 @@ void RNA_api_workspace(StructRNA *srna) 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 key shortcuts for modal operators"); - parm = RNA_def_string(func, "text", NULL, 0, "Text", "New string for the status bar, empty string clears the text"); + parm = RNA_def_string(func, "text", NULL, 0, "Text", "New string for the status bar, None clears the text"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + RNA_def_property_clear_flag(parm, PROP_NEVER_NULL); } void RNA_api_workspace_tool(StructRNA *srna) |