blender/release/ui/space_filebrowser.py
Brecht Van Lommel 184ac26dd0 2.5: Headers
* Fix header menu spacing bug, and make it consistent for all headers.
* For consistency, always put menus first in the header, then any enums
  to switch the type of data displayed.
* Node editor header ported to python layout. Still quite a few
  operators missing to make the menus complete.
* RNA wrapped node editor, and added use_nodes property to material
  and scene.
2009-08-19 00:55:30 +00:00

44 lines
1.3 KiB
Python

import bpy
class FILEBROWSER_HT_header(bpy.types.Header):
__space_type__ = "FILE_BROWSER"
def draw(self, context):
st = context.space_data
layout = self.layout
params = st.params
layout.template_header(menus=False)
row = layout.row(align=True)
row.itemO("file.parent", text="", icon='ICON_FILE_PARENT')
row.itemO("file.refresh", text="", icon='ICON_FILE_REFRESH')
row.itemO("file.previous", text="", icon='ICON_PREV_KEYFRAME')
row.itemO("file.next", text="", icon='ICON_NEXT_KEYFRAME')
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")
layout.itemR(params, "do_filter")
row = layout.row(align=True)
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="");
row.active = params.do_filter
bpy.types.register(FILEBROWSER_HT_header)