maxon.AssetManagerInterface¶
Description¶
Helper class to control the Asset Manager.
Inheritance diagram¶
Methods Signature¶
Checks if an asset is already cached and if not it will download the asset with a modal progress dialog which can be canceled. |
|
|
LoadAssets executes the load asset command from the asset browser (e.g. |
|
Opens an asset selection popup. |
|
Opens the asset browser to show the given assets in the browser. |
|
Sets the active asset manager mode. |
Methods Definition¶
-
static
AssetManagerInterface.
CheckDownloadAssetWithModalProgressDialog
(asset, lookupRepository)¶ 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.
- Parameters
asset (
maxon.AssetDescription
) – Asset to inspect/download.lookupRepository (
maxon.AssetRepositoryRef
) – Repository to check dependencies for.
- Returns
True if done. False if cancelled.
- Return type
bool
-
static
AssetManagerInterface.
LoadAssets
(searchRepository, selectionAndFilterString, presenter=None, graphModelRef=None)¶ LoadAssets executes the load asset command from the asset browser (e.g. double click or open).
- Parameters
searchRepository (
maxon.AssetRepositoryRef
) – Search repository.selectionAndFilterString (list[Union[Tuple[
maxon.Id
, str], list[maxon.Id
, str]]]) – A list which contains the search terms to switch modes in the newly created node/object.presenter (None) – Not yet implemented, pass None.
graphModelRef (
maxon.NodesGraphModelRef
) – Optional parameter to pass the node graph where to insert nodes.
- Returns
True if loaded. False indicates another error state.
- Return type
bool
-
static
AssetManagerInterface.
OpenPopup
(flags, masterFilter, filterString, smartFilter=None, presenter=None, model=None, title='', inSelection=(), outSelection=None)¶ Opens an asset selection popup.
- Parameters
flags (
maxon.ASSETPOPUPOPTIONS
) – see ASSETPOPUPOPTIONS.masterFilter (
maxon.MASTERFILTER
) – see MASTERFILTER.filterString (str) – see FilterString.
smartFilter (
maxon.AssetDescription
) – SmartFilter to select.presenter (None) – Not yet implemented, pass None.
model (None) – Not yet implemented, pass None.
title (str) – Window Title.
inSelection (list(
maxon.Id
)) – Define the selected elements and returns the selected elements (value being changed by the OpenPopup method).outSelection (Callable[[
maxon.DragAndDropDataAssetArray
], None]) – Delegate.
-
static
AssetManagerInterface.
RevealAsset
(assets)¶ Opens the asset browser to show the given assets in the browser.
- Parameters
assets (Union[
maxon.AssetDescription
, Collection[maxon.AssetDescription
],maxon.BaseArray
[maxon.AssetDescription
]]) – Assets to show.
-
static
AssetManagerInterface.
SetActiveManager
(masterFilter, presenter=None, model=None)¶ Sets the active asset manager mode.
- Parameters
masterFilter (
maxon.MASTERFILTER
) – see MASTERFILTER.presenter (None) – Optional parameter to pass a NodeGraph presenter.
model (
maxon.NodesGraphModelRef
) – Optional parameter to pass a NodeGraph.