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:
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_texture.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index abfefba02b9..935b15f3cd8 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -358,7 +358,17 @@ static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUS
}
/* create button */
- BLI_snprintf(name, UI_MAX_NAME_STR, " %s", user->name);
+ if (user->prop) {
+ PointerRNA texptr = RNA_property_pointer_get(&user->ptr, user->prop);
+ Tex *tex = texptr.data;
+
+ if (tex)
+ BLI_snprintf(name, UI_MAX_NAME_STR, " %s - %s", user->name, tex->id.name + 2);
+ else
+ BLI_snprintf(name, UI_MAX_NAME_STR, " %s", user->name);
+ }
+ else
+ BLI_snprintf(name, UI_MAX_NAME_STR, " %s", user->name);
but = uiDefIconTextBut(block, BUT, 0, user->icon, name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, "");