maxon.AssetManagerInterface

Description

Helper class to control the Asset Manager.

Inheritance diagram

Inheritance

Methods Signature

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.

LoadAssets(searchRepository, …[, …])

LoadAssets executes the load asset command from the asset browser (e.g.

OpenPopup(flags, masterFilter, filterString)

Opens an asset selection popup.

RevealAsset(assets)

Opens the asset browser to show the given assets in the browser.

SetActiveManager(masterFilter[, presenter, …])

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
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