[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37995] branches/soc-2011-pepper/source/ blender/editors/interface/interface_templates.c: Keying Set UI - Icons for Paths in List

Joshua Leung aligorith at gmail.com
Fri Jul 1 05:36:02 CEST 2011


Revision: 37995
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37995
Author:   aligorith
Date:     2011-07-01 03:35:59 +0000 (Fri, 01 Jul 2011)
Log Message:
-----------
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.

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/editors/interface/interface_templates.c

Modified: branches/soc-2011-pepper/source/blender/editors/interface/interface_templates.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/interface/interface_templates.c	2011-07-01 02:37:44 UTC (rev 37994)
+++ branches/soc-2011-pepper/source/blender/editors/interface/interface_templates.c	2011-07-01 03:35:59 UTC (rev 37995)
@@ -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 @@
 		//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... */
 




More information about the Bf-blender-cvs mailing list