[Bf-blender-cvs] [39a1d452795] blender2.8: WM: correct description for header/status_text_set

Campbell Barton noreply at git.blender.org
Mon Oct 29 22:56:57 CET 2018


Commit: 39a1d4527950fe32b9a421ce366b012a5fe1fa79
Author: Campbell Barton
Date:   Tue Oct 30 08:55:36 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB39a1d4527950fe32b9a421ce366b012a5fe1fa79

WM: correct description for header/status_text_set

Make text a required argument for both.

===================================================================

M	source/blender/makesrna/intern/rna_screen.c
M	source/blender/makesrna/intern/rna_workspace_api.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 5220d0ef4fb..fdfbdfa4b39 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -332,7 +332,7 @@ 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, no argument clears the text");
+	parm = RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, empty string clears the text");
 	RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
 }
 
diff --git a/source/blender/makesrna/intern/rna_workspace_api.c b/source/blender/makesrna/intern/rna_workspace_api.c
index 93da4a91738..398da78d7f9 100644
--- a/source/blender/makesrna/intern/rna_workspace_api.c
+++ b/source/blender/makesrna/intern/rna_workspace_api.c
@@ -171,11 +171,13 @@ static PointerRNA rna_WorkspaceTool_gizmo_group_properties(
 void RNA_api_workspace(StructRNA *srna)
 {
 	FunctionRNA *func;
+	PropertyRNA *parm;
 
 	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");
-	RNA_def_string(func, "text", NULL, 0, "Text", "New string for the status bar, no argument clears the text");
+	parm = RNA_def_string(func, "text", NULL, 0, "Text", "New string for the status bar, empty string clears the text");
+	RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
 }
 
 void RNA_api_workspace_tool(StructRNA *srna)



More information about the Bf-blender-cvs mailing list