Asset Browser: Add import settings popover, move import method into it #104733
|
@ -23,7 +23,7 @@ class FILEBROWSER_HT_header(Header):
|
||||||
layout.separator_spacer()
|
layout.separator_spacer()
|
||||||
|
|
||||||
if params.asset_library_ref != 'LOCAL':
|
if params.asset_library_ref != 'LOCAL':
|
||||||
layout.prop(params, "import_type", text="")
|
layout.popover("ASSETBROWSER_PT_import_settings", text="Import Settings")
|
||||||
|
|
||||||
layout.separator_spacer()
|
layout.separator_spacer()
|
||||||
|
|
||||||
|
@ -700,6 +700,23 @@ class ASSETBROWSER_MT_catalog(AssetBrowserMenu, Menu):
|
||||||
layout.operator("asset.catalog_new").parent_path = ""
|
layout.operator("asset.catalog_new").parent_path = ""
|
||||||
|
|
||||||
|
|
||||||
|
class ASSETBROWSER_PT_import_settings(asset_utils.AssetBrowserPanel, Panel):
|
||||||
|
bl_idname = "ASSETBROWSER_PT_import_settings"
|
||||||
|
bl_region_type = 'HEADER'
|
||||||
|
bl_label = "Import Settings"
|
||||||
|
bl_options = {'HIDE_HEADER'}
|
||||||
|
bl_ui_units_x = 12
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
params = context.space_data.params
|
||||||
|
|
||||||
|
layout.use_property_split = True
|
||||||
|
layout.use_property_decorate = False # No animation.
|
||||||
|
|
||||||
|
layout.prop(params, "import_type", text="Import Method")
|
||||||
|
|
||||||
|
|
||||||
class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
|
class ASSETBROWSER_PT_metadata(asset_utils.AssetBrowserPanel, Panel):
|
||||||
bl_region_type = 'TOOL_PROPS'
|
bl_region_type = 'TOOL_PROPS'
|
||||||
bl_label = "Asset Metadata"
|
bl_label = "Asset Metadata"
|
||||||
|
@ -852,6 +869,7 @@ classes = (
|
||||||
ASSETBROWSER_MT_view,
|
ASSETBROWSER_MT_view,
|
||||||
ASSETBROWSER_MT_select,
|
ASSETBROWSER_MT_select,
|
||||||
ASSETBROWSER_MT_catalog,
|
ASSETBROWSER_MT_catalog,
|
||||||
|
ASSETBROWSER_PT_import_settings,
|
||||||
ASSETBROWSER_MT_metadata_preview_menu,
|
ASSETBROWSER_MT_metadata_preview_menu,
|
||||||
ASSETBROWSER_PT_metadata,
|
ASSETBROWSER_PT_metadata,
|
||||||
ASSETBROWSER_PT_metadata_preview,
|
ASSETBROWSER_PT_metadata_preview,
|
||||||
|
|
Loading…
Reference in New Issue