diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-07-01 07:35:59 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-07-01 07:35:59 +0400 |
commit | 3eec91f4d7864366b0cb05fead395d8fbfa711c6 (patch) | |
tree | a7fbf2a5dc99e86473b4686cf2a0f1db0ccdc167 /source/blender/editors/interface | |
parent | 77dbc5c9141558ec2cfb08772857cf2048f9c58c (diff) |
Keying Set UI - Icons for Paths in List
The Keying Set paths list now shows the icon of the type of ID-block
that a path item refers to. This make it easier to make snese of the
paths shown in the list.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 39abcecbb6b..c4a07a004d2 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -33,6 +33,7 @@ #include "MEM_guardedalloc.h" +#include "DNA_anim_types.h" #include "DNA_scene_types.h" #include "DNA_userdef_types.h" @@ -55,6 +56,7 @@ #include "ED_render.h" #include "RNA_access.h" +#include "RNA_enum_types.h" #include "WM_api.h" #include "WM_types.h" @@ -2106,6 +2108,15 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe //uiItemR(row, itemptr, "mute", 0, "", ICON_MUTE_IPO_OFF); uiBlockSetEmboss(block, UI_EMBOSS); } + else if(itemptr->type == &RNA_KeyingSetPath) { + KS_Path *ksp = (KS_Path*)itemptr->data; + + /* icon needs to be the type of ID which is currently active */ + RNA_enum_icon_from_value(id_type_items, ksp->idtype, &icon); + + /* nothing else special to do... */ + uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */ + } else uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */ |