From 5bcb0c9935033d9d9983838bd4f5ed226627c2e9 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 25 Nov 2019 19:41:30 +0100 Subject: UI: Allow label for Template-ID (respecting property split layout) Adds a `text` parameter to `bpy.types.uiLayout.template_ID()` which causes a label to be added, as usual. Adding the label also makes the template respect the `bpy.types.uiLayout.use_property_split` option. Also fixes wrong layout being used in the template-ID, although I think that didn't cause issues in practice. Sergey requested this for usage in the Movie Clip Editor. --- source/blender/editors/space_image/image_buttons.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 64e1c02590e..270fe0c59dc 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -813,7 +813,8 @@ void uiTemplateImage(uiLayout *layout, "IMAGE_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, - false); + false, + NULL); if (ima != NULL) { uiItemS(layout); -- cgit v1.2.3