Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotifications Class Reference

Bus for interaction with asset browser widget. More...

#include <AssetBrowserBus.h>

Inherits AZ::EBusTraits.

Public Types

using Bus = AZ::EBus< AssetBrowserInteractionNotifications >
 
typedef AZStd::recursive_mutex MutexType
 

Public Member Functions

virtual AZ::s32 GetPriority () const
 Override this to get first attempt at handling these messages. Higher priority goes first.
 
virtual void AddContextMenuActions (QWidget *, QMenu *, const AZStd::vector< const AssetBrowserEntry * > &)
 Notification that a context menu is about to be shown and offers an opportunity to add actions.
 
virtual void AddSourceFileOpeners (const char *, const AZ::Uuid &, SourceFileOpenerList &)
 
virtual void AddSourceFileCreators (const char *, const AZ::Uuid &, SourceFileCreatorList &)
 
virtual void OpenAssetInAssociatedEditor (const AZ::Data::AssetId &, bool &)
 
virtual SourceFileDetails GetSourceFileDetails (const char *)
 
virtual void SelectAsset (QWidget *caller, const AZStd::string &fullFilePath)
 Selects the asset identified by the path in the AzAssetBrowser identified by caller.
 
virtual void SelectFolderAsset (QWidget *caller, const AZStd::string &fullFolderPath)
 Selects the folder identified by the path in the AzAssetBrowser identified by caller.
 
bool Compare (const AssetBrowserInteractionNotifications *other) const
 required in order to sort the busses.
 

Detailed Description

Bus for interaction with asset browser widget.

Member Function Documentation

◆ AddSourceFileCreators()

virtual void AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotifications::AddSourceFileCreators ( const char *  ,
const AZ::Uuid &  ,
SourceFileCreatorList &   
)
inlinevirtual

Implement AddSourceFilereators to provide your own creator for source files This gets called to collect the list of available creators for a file. Add your detail(s) to the creators list if you would like to be one of the options available to create the file. You can also add more than one to the list, or check the existing list to determine your behavior. If there is more than one in the list, the user will be given the choice of creators to use. If nobody responds (nobody adds their entry into the creators list), then the default operating system handler will be called (whatever that kind of file is associated with).

◆ AddSourceFileOpeners()

virtual void AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotifications::AddSourceFileOpeners ( const char *  ,
const AZ::Uuid &  ,
SourceFileOpenerList &   
)
inlinevirtual

Implement AddSourceFileOpeners to provide your own editor for source files This gets called to collect the list of available openers for a file. Add your detail(s) to the openers list if you would like to be one of the options available to open the file. You can also add more than one to the list, or check the existing list to determine your behavior. If there is more than one in the list, the user will be given the choice of openers to use. If nobody responds (nobody adds their entry into the openers list), then the default operating system handler will be called (whatever that kind of file is associated with).

◆ GetSourceFileDetails()

virtual SourceFileDetails AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotifications::GetSourceFileDetails ( const char *  )
inlinevirtual

Allows you to recognise the source files that your plugin cares about and provide information about the source file for display in the Asset Browser. This allows you to override the default behavior if you wish to. note that you'll get SourceFileDetails for every file in view, and you should only return something if its YOUR kind of file that you have details to provide.

◆ OpenAssetInAssociatedEditor()

virtual void AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotifications::OpenAssetInAssociatedEditor ( const AZ::Data::AssetId &  ,
bool &   
)
inlinevirtual

If you have an Asset Entry and would like to try to open it using the associated editor, you can use this bus to do so. Note that you can override this bus with a higher-than-zero priorit handler, and set alreadyHandled to true in your handler to prevent the default behavior from occuring. The default behavior is to call the above function for all handlers of that asset type, to gather the openers that can open it. following that, it either opens it with the opener (if there is only one) or prompts the user for which one to use. If no opener is present it tries to open it using the asset editor. finally, if its not a generic asset, it tries the operating system.


The documentation for this class was generated from the following file: