Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_filebrowser.py
| Show All 29 Lines | |||||
| class FILEBROWSER_HT_header(Header): | class FILEBROWSER_HT_header(Header): | ||||
| bl_space_type = 'FILE_BROWSER' | bl_space_type = 'FILE_BROWSER' | ||||
| def draw_asset_browser_buttons(self, context): | def draw_asset_browser_buttons(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| space_data = context.space_data | space_data = context.space_data | ||||
| params = space_data.params | params = space_data.params | ||||
| is_local_library = params.asset_library_ref == 'LOCAL' | |||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.prop(params, "asset_library_ref", text="") | row.prop(params, "asset_library_ref", text="") | ||||
| # External libraries don't auto-refresh, add refresh button. | # External libraries don't auto-refresh, add refresh button. | ||||
| if params.asset_library_ref != 'LOCAL': | if not is_local_library: | ||||
| row.operator("file.refresh", text="", icon='FILE_REFRESH') | row.operator("file.refresh", text="", icon='FILE_REFRESH') | ||||
| layout.separator_spacer() | layout.separator_spacer() | ||||
| if not is_local_library: | |||||
| layout.prop(params, "import_type", text="") | layout.prop(params, "import_type", text="") | ||||
| layout.separator_spacer() | layout.separator_spacer() | ||||
| # Uses prop_with_popover() as popover() only adds the triangle icon in headers. | # Uses prop_with_popover() as popover() only adds the triangle icon in headers. | ||||
| layout.prop_with_popover( | layout.prop_with_popover( | ||||
| params, | params, | ||||
| "display_type", | "display_type", | ||||
| panel="ASSETBROWSER_PT_display", | panel="ASSETBROWSER_PT_display", | ||||
| ▲ Show 20 Lines • Show All 757 Lines • Show Last 20 Lines | |||||