2009-10-31 20:16:59 +00:00
|
|
|
# This software is distributable under the terms of the GNU
|
|
|
|
# General Public License (GPL) v2, the text of which can be found at
|
|
|
|
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
|
|
|
|
# using this module constitutes acceptance of the terms of this License.
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-06-29 20:23:40 +00:00
|
|
|
import bpy
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-06-29 20:23:40 +00:00
|
|
|
class FILEBROWSER_HT_header(bpy.types.Header):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'FILE_BROWSER'
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
st = context.space_data
|
|
|
|
params = st.params
|
|
|
|
|
|
|
|
layout.template_header(menus=False)
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.itemS()
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.itemO("file.previous", text="", icon='ICON_BACK')
|
|
|
|
row.itemO("file.next", text="", icon='ICON_FORWARD')
|
|
|
|
row.itemO("file.parent", text="", icon='ICON_FILE_PARENT')
|
|
|
|
row.itemO("file.refresh", text="", icon='ICON_FILE_REFRESH')
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.itemS()
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.itemO("file.directory_new", text="", icon='ICON_NEWFOLDER')
|
|
|
|
|
|
|
|
layout.itemR(params, "display", expand=True, text="")
|
|
|
|
layout.itemR(params, "sort", expand=True, text="")
|
|
|
|
|
|
|
|
layout.itemR(params, "hide_dot", text="Hide Invisible")
|
|
|
|
layout.itemR(params, "do_filter", text="", icon='ICON_FILTER')
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.active = params.do_filter
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
row.itemR(params, "filter_folder", text="")
|
|
|
|
row.itemR(params, "filter_blender", text="")
|
|
|
|
row.itemR(params, "filter_image", text="")
|
|
|
|
row.itemR(params, "filter_movie", text="")
|
|
|
|
row.itemR(params, "filter_script", text="")
|
|
|
|
row.itemR(params, "filter_font", text="")
|
|
|
|
row.itemR(params, "filter_sound", text="")
|
|
|
|
row.itemR(params, "filter_text", text="")
|
2009-06-29 20:23:40 +00:00
|
|
|
|
2009-06-29 22:16:48 +00:00
|
|
|
bpy.types.register(FILEBROWSER_HT_header)
|