made scripts pass the pep8 test (though not fully pep8 yet)
[blender-staging.git] / release / scripts / ui / space_filebrowser.py
1 # This software is distributable under the terms of the GNU
2 # General Public License (GPL) v2, the text of which can be found at
3 # http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
4 # using this module constitutes acceptance of the terms of this License.
5
6 # <pep8 compliant>
7 import bpy
8
9
10 class FILEBROWSER_HT_header(bpy.types.Header):
11     bl_space_type = 'FILE_BROWSER'
12
13     def draw(self, context):
14         layout = self.layout
15
16         st = context.space_data
17         params = st.params
18
19         layout.template_header(menus=False)
20
21         row = layout.row()
22         row.itemS()
23
24         row = layout.row(align=True)
25         row.itemO("file.previous", text="", icon='ICON_BACK')
26         row.itemO("file.next", text="", icon='ICON_FORWARD')
27         row.itemO("file.parent", text="", icon='ICON_FILE_PARENT')
28         row.itemO("file.refresh", text="", icon='ICON_FILE_REFRESH')
29
30         row = layout.row()
31         row.itemS()
32
33         row = layout.row(align=True)
34         row.itemO("file.directory_new", text="", icon='ICON_NEWFOLDER')
35
36         layout.itemR(params, "display", expand=True, text="")
37         layout.itemR(params, "sort", expand=True, text="")
38
39         layout.itemR(params, "hide_dot", text="Hide Invisible")
40         layout.itemR(params, "do_filter", text="", icon='ICON_FILTER')
41
42         row = layout.row(align=True)
43         row.active = params.do_filter
44
45         row.itemR(params, "filter_folder", text="")
46         row.itemR(params, "filter_blender", text="")
47         row.itemR(params, "filter_image", text="")
48         row.itemR(params, "filter_movie", text="")
49         row.itemR(params, "filter_script", text="")
50         row.itemR(params, "filter_font", text="")
51         row.itemR(params, "filter_sound", text="")
52         row.itemR(params, "filter_text", text="")
53
54 bpy.types.register(FILEBROWSER_HT_header)