[Bf-blender-cvs] [d7b0bc9] asset-experiments: Merge branch 'master' into asset-experiments
Bastien Montagne
noreply at git.blender.org
Tue Jan 13 16:51:09 CET 2015
Commit: d7b0bc9522442cd14a0a318f54488d54d2172a59
Author: Bastien Montagne
Date: Tue Jan 13 16:44:36 2015 +0100
Branches: asset-experiments
https://developer.blender.org/rBd7b0bc9522442cd14a0a318f54488d54d2172a59
Merge branch 'master' into asset-experiments
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_filebrowser.py
index 2b4b553,6fe50c7..202845e
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@@ -80,133 -77,9 +80,133 @@@ class FILEBROWSER_HT_header(Header)
row.prop(params, "use_filter_sound", text="")
row.prop(params, "use_filter_text", text="")
+ if is_lib_browser:
+ row.prop(params, "use_filter_blendid", text="")
+ if (params.use_filter_blendid) :
+ row.separator()
+ row.prop(params, "filter_id", text="")
+
row.separator()
- row.prop(params, "filter_search", text="")
+ row.prop(params, "filter_search", text="", icon='VIEWZOOM')
+ layout.template_running_jobs()
+
+
+
+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 = '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 self.layout_type in {'DEFAULT', 'COMPACT'}:
+ row = layout.row(align=True)
+ row.prop(direntry, "name", text="", emboss=False, icon=icon)
+
+ elif self.layout_type in {'GRID'}:
+ layout.alignment = 'CENTER'
+ layout.prop(direntry, "path", text="")
+
+
+class FILEBROWSER_PT_system_folders(Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'CHANNELS'
+ bl_label = "System"
+
+ def draw(self, context):
+ layout = self.layout
+ space = context.space_data
+
+ if space.system_folders:
+ row = layout.row()
+ row.template_list("FILEBROWSER_UL_dir", "system_folders", space, "system_folders",
+ space, "system_folders_active", rows=1, maxrows=6)
+
+
+class FILEBROWSER_PT_system_bookmarks(Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'CHANNELS'
+ bl_label = "System Bookmarks"
+
+ @classmethod
+ def poll(cls, context):
+ return not context.user_preferences.filepaths.hide_system_bookmarks
+
+ def draw(self, context):
+ layout = self.layout
+ space = context.space_data
+
+ if space.system_bookmarks:
+ row = layout.row()
+ row.template_list("FILEBROWSER_UL_dir", "system_bookmarks", space, "system_bookmarks",
+ space, "system_bookmarks_active", rows=1, maxrows=6)
+
+
+class FILEBROWSER_MT_bookmarks_specials(Menu):
+ bl_label = "Bookmarks Specials"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("file.bookmark_move", icon='TRIA_UP_BAR', text="Move To Top").direction = 'TOP'
+ layout.operator("file.bookmark_move", icon='TRIA_DOWN_BAR', text="Move To Bottom").direction = 'BOTTOM'
+
+
+class FILEBROWSER_PT_bookmarks(Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'CHANNELS'
+ bl_label = "Bookmarks"
+
+ def draw(self, context):
+ layout = self.layout
+ space = context.space_data
+
+ if space.bookmarks:
+ row = layout.row()
+ num_rows = len(space.bookmarks)
+ row.template_list("FILEBROWSER_UL_dir", "bookmarks", space, "bookmarks",
+ space, "bookmarks_active", rows=(2 if num_rows < 2 else 4), maxrows=6)
+
+ col = row.column(align=True)
+ col.operator("file.bookmark_add", icon='ZOOMIN', text="")
+ col.operator("file.bookmark_delete", icon='ZOOMOUT', text="")
+ col.menu("FILEBROWSER_MT_bookmarks_specials", icon='DOWNARROW_HLT', text="")
+
+ if num_rows > 1:
+ col.separator()
+ col.operator("file.bookmark_move", icon='TRIA_UP', text="").direction = 'UP'
+ col.operator("file.bookmark_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
+
+
+class FILEBROWSER_PT_recent_folders(Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'CHANNELS'
+ bl_label = "Recent"
+
+ @classmethod
+ def poll(cls, context):
+ return not context.user_preferences.filepaths.hide_recent_locations
+
+ def draw(self, context):
+ layout = self.layout
+ space = context.space_data
+
+ if space.recent_folders:
+ row = layout.row()
+ row.template_list("FILEBROWSER_UL_dir", "recent_folders", space, "recent_folders",
+ space, "recent_folders_active", rows=1, maxrows=6)
+
+ col = row.column(align=True)
+ col.operator("file.reset_recent", icon='X', text="")
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
More information about the Bf-blender-cvs
mailing list