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::RootAssetBrowserEntry Class Reference

RootAssetBrowserEntry is a root node for Asset Browser tree view, it's not related to any asset path. More...

#include <RootAssetBrowserEntry.h>

Inherits AzToolsFramework::AssetBrowser::AssetBrowserEntry.

Public Member Functions

 AZ_RTTI (RootAssetBrowserEntry, "{A35CA80E-E1EB-420B-8BFE-B7792E3CCEDB}")
 
 AZ_CLASS_ALLOCATOR (RootAssetBrowserEntry, AZ::SystemAllocator)
 
AssetEntryType GetEntryType () const override
 
void Update (const char *enginePath)
 Update root node to new engine location.
 
void AddScanFolder (const AssetDatabase::ScanFolderDatabaseEntry &scanFolderDatabaseEntry)
 
void AddFile (const AssetDatabase::FileDatabaseEntry &fileDatabaseEntry)
 
bool RemoveFile (const AZ::s64 &fileId) const
 
bool AddSource (const SourceWithFileID &sourceWithFileIdEntry) const
 
void RemoveSource (const AZ::Uuid &sourceUuid) const
 
bool AddProduct (const ProductWithUuid &productWithUuidEntry)
 
void RemoveProduct (const AZ::Data::AssetId &assetId) const
 
SharedThumbnailKey CreateThumbnailKey () override
 
bool IsInitialUpdate () const
 
void SetInitialUpdate (bool newValue)
 
- Public Member Functions inherited from AzToolsFramework::AssetBrowser::AssetBrowserEntry
 AZ_RTTI (AssetBrowserEntry, "{67679F9E-055D-43BE-A2D0-FB4720E5302A}")
 
virtual QVariant data (int column) const
 
int row () const
 
virtual AssetEntryType GetEntryType () const =0
 
const AZStd::string & GetName () const
 Actual name of the asset or folder.
 
const QString & GetDisplayName () const
 Display name represents how entry is shown in asset browser.
 
const QString & GetDisplayPath () const
 
const AZStd::string & GetRelativePath () const
 Return path relative to scan folder.
 
const AZStd::string & GetVisiblePath () const
 Return path visible to asset browser.
 
const AZStd::string GetFullPath () const
 
const size_t GetDiskSize () const
 Return the size on disk of the asset.
 
const AZ::u64 GetModificationTime () const
 Return the time the file was last modified.
 
const AZ::Vector3 & GetDimension () const
 Returns the dimension of the model.
 
const uint32_t GetNumVertices () const
 Returns the number of vertices in the model.
 
const QString & GetEntryTypeAsString () const
 
template<typename EntryType >
void GetChildren (AZStd::vector< const EntryType * > &entries) const
 Get immediate children of specific type.
 
template<typename EntryType >
void GetChildrenRecursively (AZStd::vector< const EntryType * > &entries) const
 Recurse through the tree down to get all entries of specific type.
 
const AssetBrowserEntryGetChild (int index) const
 Get child by index.
 
AssetBrowserEntryGetChild (int index)
 
int GetChildCount () const
 Get number of children.
 
AssetBrowserEntryGetParent () const
 Get immediate parent.
 
virtual SharedThumbnailKey GetThumbnailKey () const
 
void SetThumbnailKey (SharedThumbnailKey thumbnailKey)
 
virtual SharedThumbnailKey CreateThumbnailKey ()=0
 
void SetDisplayName (const QString name)
 
void SetIconPath (const AZ::IO::Path path)
 
AZ::IO::Path GetIconPath () const
 
bool lessThan (const AssetBrowserEntry *other, const AssetBrowserEntry::AssetEntrySortMode sortColumn, const QCollator &collator) const
 
void SetFullPath (const AZ::IO::Path &fullPath)
 

Protected Member Functions

void UpdateChildPaths (AssetBrowserEntry *child) const override
 When child is added, its paths are updated relative to this entry.
 
- Protected Member Functions inherited from AzToolsFramework::AssetBrowser::AssetBrowserEntry
virtual void AddChild (AssetBrowserEntry *child)
 
void RemoveChild (AssetBrowserEntry *child)
 
void RemoveChildren ()
 
virtual void UpdateChildPaths (AssetBrowserEntry *child) const
 When child is added, its paths are updated relative to this entry.
 
virtual void PathsUpdated ()
 

Additional Inherited Members

- Public Types inherited from AzToolsFramework::AssetBrowser::AssetBrowserEntry
enum class  AssetEntrySortMode {
  Name , FileType , LastModified , Size ,
  Vertices , Dimensions
}
 
enum class  AssetEntryType { Root , Folder , Source , Product }
 
enum class  Column {
  Name , Path , SourceID , Fingerprint ,
  Guid , ScanFolderID , ProductID , JobID ,
  SubID , AssetType , ClassID , DisplayName ,
  Type , DiskSize , Vertices , ApproxSize ,
  SourceControlStatus , Count
}
 
- Static Public Member Functions inherited from AzToolsFramework::AssetBrowser::AssetBrowserEntry
static QString AssetEntryTypeToString (AssetEntryType assetEntryType)
 
static bool FromMimeData (const QMimeData *mimeData, AZStd::vector< const AssetBrowserEntry * > &entries)
 
static QString GetMimeType ()
 
static const AZStd::string ExtensionToType (AZStd::string_view str)
 
template<typename EntryType >
static void ForEachEntryInMimeData (const QMimeData *mimeData, AZStd::function< void(const EntryType *)> callbackFunction)
 ! Utility function: Given a Qt QMimeData pointer, your callbackFunction will be called for each entry of that type it finds in there.
 
- Static Public Attributes inherited from AzToolsFramework::AssetBrowser::AssetBrowserEntry
static const char * m_columnNames [static_cast< int >(Column::Count)]
 
- Protected Slots inherited from AzToolsFramework::AssetBrowser::AssetBrowserEntry
virtual void ThumbnailUpdated ()
 
- Protected Attributes inherited from AzToolsFramework::AssetBrowser::AssetBrowserEntry
AZStd::string m_name
 
QString m_displayName
 
QString m_displayPath
 
QString m_entryType
 
AZ::IO::Path m_relativePath
 
AZ::IO::Path m_visiblePath
 
AZ::IO::Path m_fullPath
 
AZ::IO::Path m_iconPath
 
AZ::u64 m_modificationTime
 
size_t m_diskSize
 
AZ::Vector3 m_dimension { NAN, NAN, NAN }
 
uint32_t m_vertices { 0 }
 
AZStd::vector< AssetBrowserEntry * > m_children
 
AssetBrowserEntrym_parentAssetEntry = nullptr
 

Detailed Description

RootAssetBrowserEntry is a root node for Asset Browser tree view, it's not related to any asset path.

Member Function Documentation

◆ CreateThumbnailKey()

SharedThumbnailKey AzToolsFramework::AssetBrowser::RootAssetBrowserEntry::CreateThumbnailKey ( )
overridevirtual

◆ GetEntryType()

AssetEntryType AzToolsFramework::AssetBrowser::RootAssetBrowserEntry::GetEntryType ( ) const
overridevirtual

◆ UpdateChildPaths()

void AzToolsFramework::AssetBrowser::RootAssetBrowserEntry::UpdateChildPaths ( AssetBrowserEntry child) const
overrideprotectedvirtual

When child is added, its paths are updated relative to this entry.

Reimplemented from AzToolsFramework::AssetBrowser::AssetBrowserEntry.


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