diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 973f92c6575..046e68a5738 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -452,8 +452,12 @@ static int rna_ui_get_enum_icon(bContext *C, PointerRNA *ptr, const char *propna static void api_ui_item_common_text(FunctionRNA *func) { - RNA_def_string(func, "text", NULL, 0, "", "Override automatic text of the item"); - RNA_def_string(func, "text_ctxt", NULL, 0, "", "Override automatic translation context of the given text"); + PropertyRNA *prop; + + prop = RNA_def_string(func, "text", NULL, 0, "", "Override automatic text of the item"); + RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); + prop = RNA_def_string(func, "text_ctxt", NULL, 0, "", "Override automatic translation context of the given text"); + RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); RNA_def_boolean(func, "translate", true, "", "Translate the given text, when UI translation is enabled"); } |