2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
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()
|
2009-11-23 00:27:30 +00:00
|
|
|
row.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2009-12-10 10:23:53 +00:00
|
|
|
row.operator("file.previous", text="", icon='BACK')
|
|
|
|
row.operator("file.next", text="", icon='FORWARD')
|
|
|
|
row.operator("file.parent", text="", icon='FILE_PARENT')
|
|
|
|
row.operator("file.refresh", text="", icon='FILE_REFRESH')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
row = layout.row()
|
2009-11-23 00:27:30 +00:00
|
|
|
row.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2009-12-10 10:23:53 +00:00
|
|
|
row.operator("file.directory_new", text="", icon='NEWFOLDER')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(params, "display", expand=True, text="")
|
|
|
|
layout.prop(params, "sort", expand=True, text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(params, "hide_dot", text="Hide Invisible")
|
2009-12-10 10:23:53 +00:00
|
|
|
layout.prop(params, "do_filter", text="", icon='FILTER')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.active = params.do_filter
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
row.prop(params, "filter_folder", text="")
|
|
|
|
row.prop(params, "filter_blender", text="")
|
|
|
|
row.prop(params, "filter_image", text="")
|
|
|
|
row.prop(params, "filter_movie", text="")
|
|
|
|
row.prop(params, "filter_script", text="")
|
|
|
|
row.prop(params, "filter_font", text="")
|
|
|
|
row.prop(params, "filter_sound", text="")
|
|
|
|
row.prop(params, "filter_text", text="")
|
2009-06-29 20:23:40 +00:00
|
|
|
|
2010-02-14 11:21:21 +00:00
|
|
|
|
|
|
|
classes = [
|
|
|
|
FILEBROWSER_HT_header]
|
|
|
|
|
|
|
|
|
|
|
|
def register():
|
|
|
|
register = bpy.types.register
|
|
|
|
for cls in classes:
|
|
|
|
register(cls)
|
|
|
|
|
2010-02-22 23:32:58 +00:00
|
|
|
|
2010-02-14 11:21:21 +00:00
|
|
|
def unregister():
|
|
|
|
unregister = bpy.types.unregister
|
|
|
|
for cls in classes:
|
|
|
|
unregister(cls)
|
2010-02-16 09:55:07 +00:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
register()
|