Commit: 6f603ea0d2be8868d86b27fec6fdda769852b1bb
Author: Bastien Montagne
Date:   Wed Feb 11 10:47:03 2015 +0100
Branches: asset-experiments
https://developer.blender.org/rB6f603ea0d2be8868d86b27fec6fdda769852b1bb

Merge branch 'master' into asset-experiments

Conflicts:
        source/blender/blenloader/intern/versioning_270.c
        source/blender/editors/include/ED_fileselect.h
        source/blender/editors/interface/interface_intern.h
        source/blender/editors/interface/interface_templates.c
        source/blender/editors/space_file/file_ops.c
        source/blender/editors/space_file/fsmenu.c
        source/blender/editors/space_file/space_file.c
        source/blender/makesrna/intern/rna_space.c

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



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

diff --cc release/scripts/startup/bl_ui/space_filebrowser.py
index 6e85b1e,cda3dfe..039282c
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@@ -89,128 -80,129 +89,251 @@@ class FILEBROWSER_HT_header(Header)
              row.separator()
              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 = 'TOOLS'
 +    bl_category = "Bookmarks"
 +    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 = 'TOOLS'
 +    bl_category = "Bookmarks"
 +    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 = 'TOOLS'
 +    bl_category = "Bookmarks"
 +    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 = 'TOOLS'
 +    bl_category = "Bookmarks"
 +    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="")
 +
  
+ 
+ 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 = 'TOOLS'
+     bl_category = "Bookmarks"
+     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", 
item_dyntip_propname="path", rows=1, maxrows=6)
+ 
+ 
+ class FILEBROWSER_PT_system_bookmarks(Panel):
+     bl_space_type = 'FILE_BROWSER'
+     bl_region_type = 'TOOLS'
+     bl_category = "Bookmarks"
+     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", 
item_dyntip_propname="path", 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 = 'TOOLS'
+     bl_category = "Bookmarks"
+     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", 
item_dyntip_propname="path",
+                               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'
+         else:
+             layout.operator("file.bookmark_add", icon='ZOOMIN')
+ 
+ 
+ class FILEBROWSER_PT_recent_folders(Panel):
+     bl_space_type = 'FILE_BROWSER'
+     bl_region_type = 'TOOLS'
+     bl_category = "Bookmarks"
+     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", 
item_dyntip_propname="path", 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__)
diff --cc source/blender/editors/space_file/file_ops.c
index 6640a7d,a0e312e..208da83
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@@ -1037,22 -983,17 +991,22 @@@ int file_parent_exec(bContext *C, wmOpe
                        BLI_cleanup_dir(G.main->name, sfile->params->dir);
                        /* if not browsing in .blend file, we still want to 
check whether the path is a directory */
                        if (sfile->params->type == FILE_LOADLIB) {
 -                              char tdir[FILE_MAX], tgroup[FILE_MAX];
 -                              if (BLO_is_a_library(sfile->params->dir, tdir, 
tgroup)) {
 +                              char tdir[FILE_MAX];
 +                              if (BLO_library_path_explode(sfile->params->dir,

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to