From 606723b3e2aab3f2aea7ec81504dc1cfe52329da Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Tue, 23 Jan 2024 17:15:50 +0100 Subject: [PATCH] UI: More Defaults for Search Placeholders When looking for automatic placeholder string For UI_BTYPE_SEARCH_MENU, use property UI Name as last resort. Pull Request: https://projects.blender.org/blender/blender/pulls/113792 --- source/blender/editors/interface/interface.cc | 3 +++ source/blender/makesrna/intern/rna_modifier.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc index 1442def04a9..c2a1c903781 100644 --- a/source/blender/editors/interface/interface.cc +++ b/source/blender/editors/interface/interface.cc @@ -5911,6 +5911,9 @@ const char *ui_but_placeholder_get(uiBut *but) else if (type && !STREQ(RNA_struct_identifier(type), "UnknownType")) { placeholder = RNA_struct_ui_name(type); } + else { + placeholder = RNA_property_ui_name(but->rnaprop); + } } else if (but->type == UI_BTYPE_TEXT && but->icon == ICON_VIEWZOOM) { placeholder = CTX_IFACE_(BLT_I18NCONTEXT_ID_WINDOWMANAGER, "Search"); diff --git a/source/blender/makesrna/intern/rna_modifier.cc b/source/blender/makesrna/intern/rna_modifier.cc index d746a42c321..2f7c9382087 100644 --- a/source/blender/makesrna/intern/rna_modifier.cc +++ b/source/blender/makesrna/intern/rna_modifier.cc @@ -5194,7 +5194,7 @@ static void rna_def_modifier_uvwarp(BlenderRNA *brna) prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, nullptr, "uvlayer_name"); - RNA_def_property_ui_text(prop, "UV Layer", "UV Layer name"); + RNA_def_property_ui_text(prop, "UV Map", "UV map name"); RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_UVWarpModifier_uvlayer_name_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update");