Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_filebrowser.py
| Show All 34 Lines | def draw(self, context): | ||||
| row.separator() | row.separator() | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.operator("file.previous", text="", icon='BACK') | row.operator("file.previous", text="", icon='BACK') | ||||
| row.operator("file.next", text="", icon='FORWARD') | row.operator("file.next", text="", icon='FORWARD') | ||||
| row.operator("file.parent", text="", icon='FILE_PARENT') | row.operator("file.parent", text="", icon='FILE_PARENT') | ||||
| row.operator("file.refresh", text="", icon='FILE_REFRESH') | row.operator("file.refresh", text="", icon='FILE_REFRESH') | ||||
| row = layout.row() | layout.separator() | ||||
| row.separator() | |||||
| row = layout.row(align=True) | |||||
| layout.operator_context = 'EXEC_DEFAULT' | 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' | layout.operator_context = 'INVOKE_DEFAULT' | ||||
| params = st.params | params = st.params | ||||
| # can be None when save/reload with a file selector open | # can be None when save/reload with a file selector open | ||||
| if params: | if params: | ||||
| is_lib_browser = params.use_library_browsing | |||||
| layout.prop(params, "recursion_level", text="") | |||||
| 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, "sort_method", expand=True, text="") | layout.prop(params, "sort_method", expand=True, text="") | ||||
| layout.prop(params, "show_hidden", text="", icon='FILE_HIDDEN') | layout.prop(params, "show_hidden", text="", icon='FILE_HIDDEN') | ||||
| layout.prop(params, "use_filter", text="", icon='FILTER') | layout.prop(params, "use_filter", text="", icon='FILTER') | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.active = params.use_filter | row.active = params.use_filter | ||||
| Show All 9 Lines | def draw(self, context): | ||||
| row.prop(params, "use_filter_backup", text="") | row.prop(params, "use_filter_backup", text="") | ||||
| row.prop(params, "use_filter_image", text="") | row.prop(params, "use_filter_image", text="") | ||||
| row.prop(params, "use_filter_movie", text="") | row.prop(params, "use_filter_movie", text="") | ||||
| row.prop(params, "use_filter_script", text="") | row.prop(params, "use_filter_script", text="") | ||||
| row.prop(params, "use_filter_font", text="") | row.prop(params, "use_filter_font", text="") | ||||
| row.prop(params, "use_filter_sound", text="") | row.prop(params, "use_filter_sound", text="") | ||||
| row.prop(params, "use_filter_text", text="") | row.prop(params, "use_filter_text", text="") | ||||
| if is_lib_browser: | |||||
| row.prop(params, "use_filter_blendid", text="") | |||||
| if params.use_filter_blendid: | |||||
campbellbarton: *picky* no need for parens. | |||||
| row.separator() | |||||
| row.prop(params, "filter_id_category", text="") | |||||
| row.separator() | row.separator() | ||||
| row.prop(params, "filter_search", text="", icon='VIEWZOOM') | row.prop(params, "filter_search", text="", icon='VIEWZOOM') | ||||
| layout.template_running_jobs() | |||||
| class FILEBROWSER_UL_dir(bpy.types.UIList): | class FILEBROWSER_UL_dir(bpy.types.UIList): | ||||
| def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): | def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): | ||||
| direntry = item | direntry = item | ||||
| # space = context.space_data | # space = context.space_data | ||||
| icon = 'NONE' | icon = 'NONE' | ||||
| if active_propname == "system_folders_active": | if active_propname == "system_folders_active": | ||||
| icon = 'DISK_DRIVE' | icon = 'DISK_DRIVE' | ||||
| ▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| row = layout.row() | row = layout.row() | ||||
| row.template_list("FILEBROWSER_UL_dir", "recent_folders", space, "recent_folders", | row.template_list("FILEBROWSER_UL_dir", "recent_folders", space, "recent_folders", | ||||
| space, "recent_folders_active", item_dyntip_propname="path", rows=1, maxrows=10) | space, "recent_folders_active", item_dyntip_propname="path", rows=1, maxrows=10) | ||||
| col = row.column(align=True) | col = row.column(align=True) | ||||
| col.operator("file.reset_recent", icon='X', text="") | 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" | |||||
| 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. | if __name__ == "__main__": # only for live edit. | ||||
| bpy.utils.register_module(__name__) | bpy.utils.register_module(__name__) | ||||
*picky* no need for parens.