UContentBrowserAssetDataSource

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ContentBrowserAssetDataSource

Header

/Engine/Plugins/Editor/ContentBrowser/ContentBrowserAssetDataSource/Source/ContentBrowserAssetDataSource/Public/ContentBrowserAssetDataSource.h

Include

#include "ContentBrowserAssetDataSource.h"

Syntax

UCLASS()
class UContentBrowserAssetDataSource : public UContentBrowserDataSource

Variables

Name Description

Public variable

param OutCompil...

 

assets

Public variable

param Filter Th...

 

Filter

Public variable

param OutCompil...

 

folders

Public variable

param Filter Th...

 

InItem

Public variable

param OutCompil...

 

requested

Public variable

param OutCompil...

 

set

Functions

Name Description

Public function

param OutCom...

 

CompileFilter()

Call in CompileFilter() after CreatePathFilter() to fill OutCompiledFilter with an FContentBrowserCompiledAssetDataFilter capable of filtering assets

Public function

param OutCom...

 

CompileFilter()

Call in CompileFilter() after PopulateAssetFilterInputParams() to fill OutCompiledFilter with an FContentBrowserCompiledAssetDataFilter capable of filtering folders

Public function

param OutCom...

 

CompileFilter()

Call in CompileFilter() to populate an FAssetFilterInputParams for use in CreatePathFilter and CreateAssetFilter.

Public function Static

param OutCom...

 

CreateAssetFilter

(
    FAssetFilterInputParams& Params,
    FName InPath,
    const FContentBrowserDataFilter& I...,
    FContentBrowserDataCompiledFilter&...,
    FCompileARFilterFunc CreateCompiled...
)

Public function Static

param OutCom...

 

CreatePathFilter

(
    FAssetFilterInputParams& Params,
    FName InPath,
    const FContentBrowserDataFilter& I...,
    FContentBrowserDataCompiledFilter&...,
    FSubPathEnumerationFunc SubPathEnum...
)

Public function

param Filter...

 

DoesItemPassFilter()

Call in DoesItemPassFilter() to check if a folder passes the compiled asset data filter.

Public function Static

void

 

EnumerateFoldersMatchingFilter

(
    UContentBrowserDataSource* Dat...,
    const FContentBrowserCompiledAssetD...,
    TFunctionRef< bool...,
    FSubPathEnumerationFunc SubPathEnum...,
    FCreateFolderItemFunc CreateFolderI...
)

Call in EnumerateItemsMatchingFilter() to generate a list of folders that match the compiled filter.

Public function

void

 

Initialize

(
    const bool InAutoRegister
)

Public function Static

bool

 

PathPassesCompiledDataFilter

(
    const FContentBrowserCompiledAssetD...,
    const FName InPath
)

Public function Static

param OutCom...

 

PopulateAssetFilterInputParams

(
    FAssetFilterInputParams& Params,
    UContentBrowserDataSource* Dat...,
    IAssetRegistry* InAssetRegistr...,
    const FContentBrowserDataFilter& I...,
    FContentBrowserDataCompiledFilter&...,
    ICollectionManager* Collection...
)

Overridden from UContentBrowserDataSource

Name Description

Public function Virtual

bool

 

AppendItemReference

(
    const FContentBrowserItemData& InI...,
    FString& InOutStr
)

Attempt to append any path references for the given item to the given string.

Protected function Virtual

void

 

BuildRootPathVirtualTree()

Rebuilds the tree of virtual paths that ends with internal roots

Public function Virtual

bool

 

BulkCopyItems

(
    TArrayView< const FContentBrowserIt...,
    const FName InDestPath
)

Attempt to copy the given items to the given virtual path.

Public function Virtual

bool

 

BulkDeleteItems

(
    TArrayView< const FContentBrowserIt...
)

Attempt to delete the given items.

Public function Virtual

bool

 

BulkDuplicateItems

(
    TArrayView< const FContentBrowserIt...,
    TArray< FContentBrowserItemData >&...
)

Attempt to synchronously duplicate the given items.

Public function Virtual

bool

 

BulkEditItems

(
    TArrayView< const FContentBrowserIt...
)

Attempt to open the given item for editing.

Public function Virtual

bool

 

BulkMoveItems

(
    TArrayView< const FContentBrowserIt...,
    const FName InDestPath
)

Attempt to move the given items to the given virtual path.

Public function Virtual

bool

 

BulkPreviewItems

(
    TArrayView< const FContentBrowserIt...
)

Attempt to preview the given items.

Public function Virtual

bool

 

BulkSaveItems

(
    TArrayView< const FContentBrowserIt...,
    const EContentBrowserItemSaveFlags ...
)

Attempt to save the given items.

Public function Virtual

bool

 

CanCopyItem

(
    const FContentBrowserItemData& InI...,
    const FName InDestPath,
    FText* OutErrorMsg
)

Query whether the given item is can be copied, optionally providing error information if it cannot.

Public function Virtual

bool

 

CanCreateFolder

(
    const FName InPath,
    FText* OutErrorMsg
)

Query whether a folder can be created at the given virtual path, optionally providing error information if it cannot.

Public function Virtual

bool

 

CanDeleteItem

(
    const FContentBrowserItemData& InI...,
    FText* OutErrorMsg
)

Query whether the given item is can be deleted, optionally providing error information if it cannot.

Public function Virtual

bool

 

CanDuplicateItem

(
    const FContentBrowserItemData& InI...,
    FText* OutErrorMsg
)

Query whether the given item is can be duplicated, optionally providing error information if it cannot.

Public function Virtual

bool

 

CanEditItem

(
    const FContentBrowserItemData& InI...,
    FText* OutErrorMsg
)

Query whether the given item is can be edited, optionally providing error information if it cannot.

Public function Virtual

bool

 

CanMoveItem

(
    const FContentBrowserItemData& InI...,
    const FName InDestPath,
    FText* OutErrorMsg
)

Query whether the given item is can be moved, optionally providing error information if it cannot.

Public function Virtual

bool

 

CanPreviewItem

(
    const FContentBrowserItemData& InI...,
    FText* OutErrorMsg
)

Query whether the given item is can be previewed, optionally providing error information if it cannot.

Public function Virtual

bool

 

CanRenameItem

(
    const FContentBrowserItemData& InI...,
    const FString* InNewName,
    FText* OutErrorMsg
)

Query whether the given item is can be renamed, optionally providing error information if it cannot.

Public function Virtual

bool

 

CanSaveItem

(
    const FContentBrowserItemData& InI...,
    const EContentBrowserItemSaveFlags ...,
    FText* OutErrorMsg
)

Query whether the given item is can be saved, optionally providing error information if it cannot.

Public function Virtual

void

 

CompileFilter

(
    const FName InPath,
    const FContentBrowserDataFilter& I...,
    FContentBrowserDataCompiledFilter&...
)

Given a path and a data filter, produce an optimized filter that can be used to efficiently enumerate items that match it, and also query whether an item would pass it.

Public function Virtual

bool

 

CopyItem

(
    const FContentBrowserItemData& InI...,
    const FName InDestPath
)

Attempt to copy the given item to the given virtual path.

Public function Virtual

bool

 

CreateFolder

(
    const FName InPath,
    FContentBrowserItemDataTemporaryCon...
)

Attempt to begin the process of asynchronously creating a folder at the given virtual path, populating a temporary item that can be finalized or canceled by the user.

Public function Virtual

bool

 

DeleteItem

(
    const FContentBrowserItemData& InI...
)

Attempt to delete the given item.

Public function Virtual

bool

 

DoesItemPassFilter

(
    const FContentBrowserItemData& InI...,
    const FContentBrowserDataCompiledFi...
)

Query whether the given item passes the given compiled filter.

Public function Virtual

bool

 

DuplicateItem

Attempt to begin the process of asynchronously duplicating the given item, populating a temporary item that can be finalized or canceled by the user.

Public function Virtual

bool

 

EditItem

(
    const FContentBrowserItemData& InI...
)

Attempt to open the given item for editing.

Public function Virtual

void

 

EnumerateItemsAtPath

(
    const FName InPath,
    const EContentBrowserItemTypeFilter...,
    TFunctionRef< bool...
)

Enumerate items that have the given virtual path, optionally filtering by type, and invoking the callback for each matching item.

Public function Virtual

bool

 

EnumerateItemsAtPaths

(
    const TArrayView< FContentBrowserIt...,
    const EContentBrowserItemTypeFilter...,
    TFunctionRef< bool...
)

Enumerate the items (folders and/or files) that exist at the given content browser paths.

Public function Virtual

void

 

EnumerateItemsMatchingFilter

(
    const FContentBrowserDataCompiledFi...,
    TFunctionRef< bool...
)

Enumerate items that match the given compiled filter, invoking the callback for each matching item.

Public function Virtual

bool

 

GetItemAttribute

(
    const FContentBrowserItemData& InI...,
    const bool InIncludeMetaData,
    const FName InAttributeKey,
    FContentBrowserItemDataAttributeVal...
)

Query the value of the given attribute on the given item.

Public function Virtual

bool

 

GetItemAttributes

(
    const FContentBrowserItemData& InI...,
    const bool InIncludeMetaData,
    FContentBrowserItemDataAttributeVal...
)

Query the values of all attributes on the given item.

Public function Virtual

bool

 

GetItemPhysicalPath

(
    const FContentBrowserItemData& InI...,
    FString& OutDiskPath
)

Query the physical (on-disk) path of the given item.

Public function Virtual

bool

 

HandleDragDropOnItem

(
    const FContentBrowserItemData& InI...,
    const FDragDropEvent& InDragDropEv...
)

Called to provide custom drag and drop handling when a drag event is dropped on an item.

Public function Virtual

bool

 

HandleDragEnterItem

(
    const FContentBrowserItemData& InI...,
    const FDragDropEvent& InDragDropEv...
)

Called to provide custom drag and drop handling when a drag event enters an item, such as performing validation and reporting error information.

Public function Virtual

bool

 

HandleDragLeaveItem

(
    const FContentBrowserItemData& InI...,
    const FDragDropEvent& InDragDropEv...
)

Called to provide custom drag and drop handling when a drag event leaves an item, such as clearing any error information set during earlier validation.

Public function Virtual

bool

 

HandleDragOverItem

(
    const FContentBrowserItemData& InI...,
    const FDragDropEvent& InDragDropEv...
)

Called to provide custom drag and drop handling while a drag event is over an item, such as performing validation and reporting error information.

Public function Virtual

bool

 

IsDiscoveringItems

(
    FText* OutStatus
)

Query whether this data source instance is currently discovering content, and retrieve an optional status message that can be shown in the UI.

Public function Virtual

bool

 

IsFolderVisibleIfHidingEmpty

(
    const FName InPath
)

Query whether the given virtual folder should be visible if the UI is asking to hide empty content folders.

Public function Virtual

bool

 

IsItemDirty

(
    const FContentBrowserItemData& InI...
)

Query whether the given item is considered dirty (ie, has unsaved changes).

Public function Virtual

bool

 

Legacy_TryConvertAssetDataToVirtualPath

(
    const FAssetData& InAssetData,
    const bool InUseFolderPaths,
    FName& OutPath
)

Attempt to convert the given asset data to a virtual path associated with this data source.

Public function Virtual

bool

 

Legacy_TryConvertPackagePathToVirtualPath

(
    const FName InPackagePath,
    FName& OutPath
)

Attempt to convert the given package path to a virtual path associated with this data source.

Public function Virtual

bool

 

Legacy_TryGetAssetData

(
    const FContentBrowserItemData& InI...,
    FAssetData& OutAssetData
)

Attempt to retrieve the asset data associated with the given item.

Public function Virtual

bool

 

Legacy_TryGetPackagePath

(
    const FContentBrowserItemData& InI...,
    FName& OutPackagePath
)

Attempt to retrieve the package path associated with the given item.

Public function Virtual

bool

 

MoveItem

(
    const FContentBrowserItemData& InI...,
    const FName InDestPath
)

Attempt to move the given item to the given virtual path.

Public function Virtual

bool

 

PreviewItem

(
    const FContentBrowserItemData& InI...
)

Attempt to preview the given item.

Public function Virtual

bool

 

PrioritizeSearchPath

(
    const FName InPath
)

If possible, attempt to prioritize content discovery for the given virtual path.

Public function Virtual

bool

 

RenameItem

(
    const FContentBrowserItemData& InI...,
    const FString& InNewName,
    FContentBrowserItemData& OutNewIte...
)

Attempt to rename the given item.

Public function Virtual

bool

 

SaveItem

(
    const FContentBrowserItemData& InI...,
    const EContentBrowserItemSaveFlags ...
)

Attempt to save the given item.

Public function Virtual

void

 

Shutdown()

Shutdown this data source instance.

Public function Virtual

bool

 

TryGetCollectionId

(
    const FContentBrowserItemData& InI...,
    FName& OutCollectionId
)

Attempt to retrieve the identifier that should be used when storing a reference to the given item within a collection.

Public function Virtual

bool

 

UpdateThumbnail

(
    const FContentBrowserItemData& InI...,
    FAssetThumbnail& InThumbnail
)

Attempt to update the thumbnail associated with the given item.

Classes

Name

Description

Public struct

FAssetFilterInputParams

All of the data necessary to generate a compiled filter for folders and assets

Typedefs