#include <assetmanagerinterface.h>
Helper class to control the Asset Manager.
Public Types | |
using | Filter = Delegate< Bool(const AssetDescription &desc)> |
Static Public Member Functions | |
static MAXON_METHOD void | SetActiveManager (MASTERFILTER masterFilter, const GraphModelPresenterRef &presenter=GetZeroRef< GraphModelPresenterRef >(), const nodes::NodesGraphModelRef &model=GetZeroRef< nodes::NodesGraphModelRef >()) |
static MAXON_METHOD Result< Bool > | OpenPopup (ASSETPOPUPOPTIONS flags, MASTERFILTER masterFilter, const String &filterString, const AssetDescription &smartFilter=GetZeroRef< AssetDescription >(), const GraphModelPresenterRef &presenter=GetZeroRef< GraphModelPresenterRef >(), const nodes::NodesGraphModelRef &model=GetZeroRef< nodes::NodesGraphModelRef >(), const String &title=String(), const HashSet< Id > &inSelection=HashSet< Id >(), Delegate< void(const DragAndDropDataAssetArray &)> &&outSelection={}) |
static MAXON_METHOD Result< Bool > | CheckDownloadAssetWithModalProgressDialog (const AssetDescription &asset, const AssetRepositoryRef &lookupRepository) |
static MAXON_METHOD Tuple< Bool, Id, Url, AssetDescription, String > | GetAssetFilenameFromDragData (const void *dragData, Bool updateUsage, Bool showDownloadDialog, const Filter &filter=GetZeroRef< Filter >()) |
static MAXON_METHOD Result< void > | RevealAsset (const Block< AssetDescription > &assets) |
static MAXON_METHOD Result< Bool > | LoadAssets (const AssetRepositoryRef &searchRepository, const HashMap< Id, String > &selectionAndFilterString, const GraphModelPresenterRef &presenter=GetZeroRef< GraphModelPresenterRef >(), const nodes::NodesGraphModelRef &graphModelRef=GetZeroRef< nodes::NodesGraphModelRef >()) |
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (AssetManagerInterface, MAXON_REFERENCE_NONE, "net.maxon.mvp.assetmanager.interface") | |
|
private |
|
static |
SetActiveManager sets the active asset manager mode.
[in] | masterFilter | see MASTERFILTER. |
[in] | presenter | Optional parameter to pass a NodeGraph presenter. |
[in] | model | Optional parameter to pass a NodeGraph. |
|
static |
OpenPopup opens an asset selection popup.
[in] | flags | see ASSETPOPUPOPTIONS. |
[in] | masterFilter | see MASTERFILTER. |
[in] | filterString | see FilterString. |
[in] | smartFilter | SmartFilter to select. |
[in] | presenter | Optional parameter to pass a NodeGraph presenter. |
[in] | model | Optional parameter to pass a NodeGraph. |
[in] | title | Optional Window Title. |
[out] | inSelection | Returns the selected elements. |
[out] | outSelection | Delegate. |
|
static |
CheckDownloadAssetWithModalProgressDialog checks if an asset is already cached and if not it will download the asset with a modal progress dialog which can be canceled. Canceling the dialog will continue the download but returns false. Dependencies will be added to the download queue as well.
[in] | asset | Asset to inspect/download. |
[in] | lookupRepository | Repository to check dependencies for. |
|
static |
GetAssetFilenameFromDragData extracts the filename/url from the legacy d&d message. If filter is null, this will only return assets of type AssetTypes::File, otherwise only assets which pass the given filter.
[in] | dragData | DragData containing the asset filename. |
|
static |
RevealAsset opens the asset browser to show the given assets in the browser.
[in] | assets | Assets to show. |
|
static |
LoadAssets executes the load asset command from the asset browser (e.g. double click or open).
[in] | searchRepository | Search repository. |
[in] | selectionAndFilterString | HashMap which contains the search terms to switch modes in the newly created node/object. |
[in] | presenter | Optional presenter to use when creating nodes. |
[in] | graphModelRef | Optional parameter to pass the node graph where to insert nodes. |