| 
									
										
										
										
											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 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         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') | 
					
						
							| 
									
										
										
										
											2010-09-07 15:17:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-01 02:25:49 +00:00
										 |  |  |         params = st.params | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-01 02:25:49 +00:00
										 |  |  |         # can be None when save/reload with a file selector open | 
					
						
							| 
									
										
										
										
											2010-09-07 15:17:42 +00:00
										 |  |  |         if params: | 
					
						
							| 
									
										
										
										
											2010-09-01 02:25:49 +00:00
										 |  |  |             layout.prop(params, "display_type", expand=True, text="") | 
					
						
							|  |  |  |             layout.prop(params, "sort_method", expand=True, text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             layout.prop(params, "show_hidden") | 
					
						
							|  |  |  |             layout.prop(params, "use_filter", text="", icon='FILTER') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row(align=True) | 
					
						
							|  |  |  |             row.active = params.use_filter | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             row.prop(params, "use_filter_folder", text="") | 
					
						
							|  |  |  |             row.prop(params, "use_filter_blender", text="") | 
					
						
							|  |  |  |             row.prop(params, "use_filter_image", text="") | 
					
						
							|  |  |  |             row.prop(params, "use_filter_movie", text="") | 
					
						
							|  |  |  |             row.prop(params, "use_filter_script", text="") | 
					
						
							|  |  |  |             row.prop(params, "use_filter_font", text="") | 
					
						
							|  |  |  |             row.prop(params, "use_filter_sound", text="") | 
					
						
							|  |  |  |             row.prop(params, "use_filter_text", text="") | 
					
						
							| 
									
										
										
										
											2009-06-29 20:23:40 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | def register(): | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |     pass | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | def unregister(): | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |     pass | 
					
						
							| 
									
										
										
										
											2010-02-16 09:55:07 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__": | 
					
						
							|  |  |  |     register() |