Commit: 3745062bf93dfd6e1267b4cf2ddbd98379d94100
Author: Bastien Montagne
Date:   Tue May 5 17:21:55 2015 +0200
Branches: asset-engine
https://developer.blender.org/rB3745062bf93dfd6e1267b4cf2ddbd98379d94100

Merge branch 'asset-experiments' into asset-engine

Conflicts:
        release/scripts/startup/bl_ui/space_filebrowser.py

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



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

diff --cc release/scripts/startup/bl_ui/space_filebrowser.py
index dd5a611,2d7f1f1..bc080b9
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@@ -44,62 -43,57 +44,61 @@@ class FILEBROWSER_HT_header(Header)
          row = layout.row()
          row.separator()
  
 -        row = layout.row(align=True)
 -        layout.operator_context = 'EXEC_DEFAULT'
 -        row.operator("file.directory_new", icon='NEWFOLDER')
 +        if st.asset_engine:
 +            draw_header = getattr(st.asset_engine, "draw_header", None)
 +            if draw_header:
 +                draw_header(row, context)
 +        else:
 +            row = layout.row(align=True)
 +            layout.operator_context = 'EXEC_DEFAULT'
 +            row.operator("file.directory_new", icon='NEWFOLDER')
 +            layout.operator_context = 'INVOKE_DEFAULT'
  
 -        layout.operator_context = 'INVOKE_DEFAULT'
 -        params = st.params
 +            params = st.params
  
 -        # can be None when save/reload with a file selector open
 -        if params:
 -            is_lib_browser = params.use_library_browsing
 +            # can be None when save/reload with a file selector open
 +            if params:
 +                is_lib_browser = params.use_library_browsing
  
 -            layout.prop(params, "display_type", expand=True, text="")
 +                layout.prop(params, "display_type", expand=True, text="")
  
-                 if params.display_type == 'FILE_IMGDISPLAY':
-                     layout.prop(params, "thumbnail_size", text="")
 -            layout.prop(params, "thumbnail_size", text="")
++                layout.prop(params, "thumbnail_size", text="")
  
 -            layout.prop(params, "sort_method", expand=True, text="")
 +                layout.prop(params, "sort_method", expand=True, text="")
  
 -            layout.prop(params, "recursion_level")
 -            layout.prop(params, "show_hidden", text="", icon='FILE_HIDDEN')
 -            layout.prop(params, "use_filter", text="", icon='FILTER')
 +                layout.prop(params, "recursion_level")
 +                layout.prop(params, "show_hidden", text="", 
icon='FILE_HIDDEN')
 +                layout.prop(params, "use_filter", text="", icon='FILTER')
  
 -            row = layout.row(align=True)
 -            row.active = params.use_filter
 -
 -            row.prop(params, "use_filter_folder", text="")
 -
 -            if params.filter_glob:
 -                #if st.active_operator and hasattr(st.active_operator, 
"filter_glob"):
 -                #    row.prop(params, "filter_glob", text="")
 -                row.label(params.filter_glob)
 -            else:
 -                row.prop(params, "use_filter_blender", text="")
 -                row.prop(params, "use_filter_backup", text="")
 -                row.prop(params, "use_filter_image", text="")
 -                row.prop(params, "use_filter_movie", text="")
 -                row.prop(params, "use_filter_script", text="")
 -                row.prop(params, "use_filter_font", text="")
 -                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="", icon='VIEWZOOM')
 +                row = layout.row(align=True)
 +                row.active = params.use_filter
  
 -        layout.template_running_jobs()
 +                row.prop(params, "use_filter_folder", text="")
  
 +                if params.filter_glob:
 +                    #if st.active_operator and hasattr(st.active_operator, 
"filter_glob"):
 +                    #    row.prop(params, "filter_glob", text="")
 +                    row.label(params.filter_glob)
 +                else:
 +                    row.prop(params, "use_filter_blender", text="")
 +                    row.prop(params, "use_filter_backup", text="")
 +                    row.prop(params, "use_filter_image", text="")
 +                    row.prop(params, "use_filter_movie", text="")
 +                    row.prop(params, "use_filter_script", text="")
 +                    row.prop(params, "use_filter_font", text="")
 +                    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="", 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):
diff --cc source/blender/editors/space_file/file_intern.h
index 9172a08,41e8f9d..ddf2091
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@@ -96,9 -98,11 +98,8 @@@ void file_filename_enter_handle(bContex
  
  int file_highlight_set(struct SpaceFile *sfile, struct ARegion *ar, int mx, 
int my);
  
 -void file_sfile_to_operator(struct wmOperator *op, struct SpaceFile *sfile, 
char *filepath);
 -void file_operator_to_sfile(struct SpaceFile *sfile, struct wmOperator *op);
 -
  
  /* filesel.c */
- float file_shorten_string(char *string, float w, int front);
  float file_string_width(const char *str);
  
  float file_font_pointsize(void);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to