Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-11-02 18:32:31 +0300
committerAntonioya <blendergit@gmail.com>2018-11-02 18:35:53 +0300
commitf3ffb4e0499d23df127f316f3767a35e551e7ed1 (patch)
treea97b41e64acaf968a79d0704cb42d4791ec3bdb0 /source/blender/makesrna/intern/rna_ui_api.c
parentd3ade457745023af22ec1bb09e94e334f06208ad (diff)
Add new factor parameter to layout.separator()
The new parameter allows to define the scale of the space.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 84673029eb9..7f956233012 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -760,8 +760,12 @@ void RNA_api_ui_layout(StructRNA *srna)
parm = RNA_def_string(func, "category", NULL, 0, "", "panel type category");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- func = RNA_def_function(srna, "separator", "uiItemS");
+ func = RNA_def_function(srna, "separator", "uiItemS_ex");
RNA_def_function_ui_description(func, "Item. Inserts empty space into the layout between items");
+ RNA_def_float(
+ func, "factor", 0.0f, 0.0f, FLT_MAX, "Percentage",
+ "Percentage of width to space (leave unset for default space)",
+ 0.0f, FLT_MAX);
func = RNA_def_function(srna, "separator_spacer", "uiItemSpacer");
RNA_def_function_ui_description(func, "Item. Inserts horizontal spacing empty space into the layout between items");