[Bf-blender-cvs] [cfc61a9] asset-experiments: Filebrowser uilist bookmarks: add icons as expected.

Bastien Montagne noreply at git.blender.org
Tue Dec 23 12:30:11 CET 2014


Commit: cfc61a9337ec6eea46712837328ef6e4fc7c3041
Author: Bastien Montagne
Date:   Mon Dec 22 14:46:49 2014 +0100
Branches: asset-experiments
https://developer.blender.org/rBcfc61a9337ec6eea46712837328ef6e4fc7c3041

Filebrowser uilist bookmarks: add icons as expected.

===================================================================

M	release/scripts/startup/bl_ui/space_filebrowser.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index 8f5c2ed..739e7d1 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -97,7 +97,15 @@ class FILEBROWSER_UL_dir(bpy.types.UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
         direntry = item
         space = context.space_data
-        icon = 'DISK_DRIVE' if active_propname == "system_folders_active" else 'NONE'
+        icon = 'NONE'
+        if active_propname == "system_folders_active":
+            icon = 'DISK_DRIVE'
+        if active_propname == "system_bookmarks_active":
+            icon = 'BOOKMARKS'
+        if active_propname == "bookmarks_active":
+            icon = 'BOOKMARKS'
+        if active_propname == "recent_folders_active":
+            icon = 'FILE_FOLDER'
 
         #~ if (space.params.directory == direntry.path):
             #~ setattr(active_data, active_propname, index)




More information about the Bf-blender-cvs mailing list