Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_filebrowser.py')
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py51
1 files changed, 42 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index 0d900a41f25..d7b93dc36f0 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -40,22 +40,23 @@ class FILEBROWSER_HT_header(Header):
row.operator("file.parent", text="", icon='FILE_PARENT')
row.operator("file.refresh", text="", icon='FILE_REFRESH')
- row = layout.row()
- row.separator()
-
- row = layout.row(align=True)
+ layout.separator()
layout.operator_context = 'EXEC_DEFAULT'
- row.operator("file.directory_new", icon='NEWFOLDER')
+ layout.operator("file.directory_new", icon='NEWFOLDER', text="")
+ layout.separator()
layout.operator_context = 'INVOKE_DEFAULT'
params = st.params
# can be None when save/reload with a file selector open
if params:
+ is_lib_browser = params.use_library_browsing
+
+ layout.prop(params, "recursion_level", text="")
+
layout.prop(params, "display_type", expand=True, text="")
- if params.display_type == 'FILE_IMGDISPLAY':
- layout.prop(params, "thumbnail_size", text="")
+ layout.prop(params, "display_size", text="")
layout.prop(params, "sort_method", expand=True, text="")
@@ -68,8 +69,8 @@ class FILEBROWSER_HT_header(Header):
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="")
+ # 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="")
@@ -81,9 +82,17 @@ 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_category", 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):
@@ -214,5 +223,29 @@ class FILEBROWSER_PT_recent_folders(Panel):
col.operator("file.reset_recent", icon='X', text="")
+class FILEBROWSER_PT_advanced_filter(Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'TOOLS'
+ bl_category = "Filter"
+ bl_label = "Advanced Filter"
+
+ @classmethod
+ def poll(cls, context):
+ # only useful in append/link (library) context currently...
+ return context.space_data.params.use_library_browsing
+
+ def draw(self, context):
+ layout = self.layout
+ space = context.space_data
+ params = space.params
+
+ if params and params.use_library_browsing:
+ layout.prop(params, "use_filter_blendid")
+ if params.use_filter_blendid:
+ layout.separator()
+ col = layout.column()
+ col.prop(params, "filter_id")
+
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)