maxon.DataDescriptionPresetStorageInterface

Description

Helper class to handle loading and saving of presets.

Inheritance diagram

Inheritance

Methods Signature

DeletePreset(repository, presetIdentifier, …)

Deletes a preset from the database.

GetPresetAttributes(repository, presetIdentifier)

Returns all stored attribute ids of a given preset identifier database.

GetPresetIdentifiers(repository)

Returns all preset identifiers registered under the given scope.

GetPresetName(repository, presetIdentifier, …)

Returns the localized string of the preset name.

GetPresets(repository, presetIdentifier)

Returns all stored preset ids.

LoadPreset(repository, presetIdentifier, …)

Reads a preset from the database.

SetPresetName(assetDescription, …)

Sets the localized string of the preset name.

StorePreset(repository, presetIdentifier, …)

Stores a preset under the given scope and id in the database.

Methods Definition

static DataDescriptionPresetStorageInterface.DeletePreset(repository, presetIdentifier, presetName)

Deletes a preset from the database.

Parameters
  • repository (maxon.AssetRepositoryRef) – Repository to search for presets (including it’s bases).

  • presetIdentifier (maxon.Id) – Identifier to check.

  • presetName (maxon.Id) – Name of the preset.

Returns

True if the preset could be deleted. False if the repository which stores the asset is write protected.

Return type

bool

static DataDescriptionPresetStorageInterface.GetPresetAttributes(repository, presetIdentifier)

Returns all stored attribute ids of a given preset identifier database.

Parameters
Returns

Array of attribute ids on success.

Return type

tuple( maxon.Id)

static DataDescriptionPresetStorageInterface.GetPresetIdentifiers(repository)

Returns all preset identifiers registered under the given scope.

Parameters

repository (maxon.AssetRepositoryRef) – Repository to search for presets (including it’s bases).

Returns

Array of maxon.Id on success.

Return type

maxon.BaseArray [maxon.Id]

static DataDescriptionPresetStorageInterface.GetPresetName(repository, presetIdentifier, presetName, language)

Returns the localized string of the preset name.

Parameters
Returns

Localized String on success.

Return type

str

static DataDescriptionPresetStorageInterface.GetPresets(repository, presetIdentifier)

Returns all stored preset ids.

Parameters
Returns

Array of maxon.Id on success.

Return type

maxon.BaseArray [maxon.Id]

static DataDescriptionPresetStorageInterface.LoadPreset(repository, presetIdentifier, presetName)

Reads a preset from the database.

Parameters
  • repository (maxon.AssetRepositoryRef) – Repository to search for presets (including it’s bases).

  • presetIdentifier (maxon.Id) – Identifier to check.

  • presetName (maxon.Id) – Name of the preset.

Returns

maxon.DataDictionary on success.

Return type

maxon.DataDictionary

static DataDescriptionPresetStorageInterface.SetPresetName(assetDescription, presetIdentifier, presetName, language)

Sets the localized string of the preset name.

Parameters
static DataDescriptionPresetStorageInterface.StorePreset(repository, presetIdentifier, presetName, presetData)

Stores a preset under the given scope and id in the database.

Parameters
Returns

maxon.AssetDescription on success.

Return type

maxon.AssetDescription