maxon.AssetDataBasesInterface

Description

This interface provides helper functions to register asset repositories.

Inheritance diagram

Inheritance

Parent Class:

Methods Signature

ClearAssetDatabaseCache(*args)

Deletes the cache.

FindRepository(repository)

Returns the maxon.url of a asset repository.

GetAssetDatabaseCachePath(*args)

GetAssetDatabaseCachePath returns the path to the cache folder.

GetAssetDatabaseCacheSize(*args)

GetAssetDatabaseCacheSize returns the size of the cached files.

GetDatabases([entry])

Returns all repositories added by the user.

ReloadAssetRepositories(*args)

ReloadDatabases reloads the asset repositories from disk.

SetAssetDatabaseCachePath(*args)

SetAssetDatabaseCachePath sets a new cache path to store temporary downloaded objects.

SetDatabases(newDataBases)

Set the new user repositories.

WaitForDatabaseLoading(*args)

Waits for the execution of the database loading.

WriteGmlDependencies(*args)

Writes the gml file with the dependencies of the given asset repository.

Methods Definition

static AssetDataBasesInterface.ClearAssetDatabaseCache(*args)

Deletes the cache.

static AssetDataBasesInterface.FindRepository(repository)

Returns the maxon.url of a asset repository.

Parameters

repository (Union[maxon.Url, maxon.AssetRepositoryRef]) – Repository to find.

Return type

maxon.Url

Returns

Url of the repository on success.

static AssetDataBasesInterface.GetAssetDatabaseCachePath(*args)

GetAssetDatabaseCachePath returns the path to the cache folder.

Returns

The path to the cache folder.

Return type

maxon.Url

static AssetDataBasesInterface.GetAssetDatabaseCacheSize(*args)

GetAssetDatabaseCacheSize returns the size of the cached files.

Returns

The size of the cached files.

Return type

maxon.Int64

static AssetDataBasesInterface.GetDatabases(entry=None)

Returns all repositories added by the user.

Parameters

entry (Optional[Union[list, Callable[[maxon.AssetDatabaseStruct], bool]]]) – ValueReceiver to receive the entries.

Returns

If callback is None or a list then a list of maxon.AssetDatabaseStruct otherwise False if callback cancelled further evaluation, True otherwise.

Return type

Union[List[maxon.AssetDatabaseStruct], bool]

static AssetDataBasesInterface.ReloadAssetRepositories(*args)

ReloadDatabases reloads the asset repositories from disk.

static AssetDataBasesInterface.SetAssetDatabaseCachePath(*args)

SetAssetDatabaseCachePath sets a new cache path to store temporary downloaded objects.

Parameters

cachePath (maxon.Url) – Path to set.

static AssetDataBasesInterface.SetDatabases(newDataBases)

Set the new user repositories.

Parameters

newDataBases (Union[maxon.AssetDatabaseStruct, List[maxon.AssetDatabaseStruct], maxon.Block [maxon.AssetDatabaseStruct]]) – Block with tuples of the new urls and activation states.

static AssetDataBasesInterface.WaitForDatabaseLoading(*args)

Waits for the execution of the database loading.

Since this is async now during the startup and modification of database lists it gives the developer a chance to wait for that end.

Returns

True if loading is finished. False if canceled.

Return type

bool

static AssetDataBasesInterface.WriteGmlDependencies(*args)

Writes the gml file with the dependencies of the given asset repository.