maxon.DataDescriptionPresetStorageInterface

Description

Helper class to handle loading and saving of presets.

Inheritance diagram

Inheritance

Methods Signature

DeletePreset(*args)

Deletes a preset from the database.

GetPresetAttributes(repository, presetIdentifier)

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

GetPresetIdentifiers(*args)

Returns all preset identifiers registered under the given scope.

GetPresetName(*args)

Returns the localized string of the preset name.

GetPresets(*args)

Returns all stored preset ids.

LoadPreset(*args)

Reads a preset from the database.

SetPresetName(*args)

Sets the localized string of the preset name.

StorePreset(*args)

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

Methods Definition

static DataDescriptionPresetStorageInterface.DeletePreset(*args)

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(*args)

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(*args)

Returns the localized string of the preset name.

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.

  • language (maxon.LanguageRef) – Language to find.

Returns

Localized String on success.

Return type

str

static DataDescriptionPresetStorageInterface.GetPresets(*args)

Returns all stored preset ids.

Parameters
Returns

Array of maxon.Id on success.

Return type

maxon.BaseArray [maxon.Id]

static DataDescriptionPresetStorageInterface.LoadPreset(*args)

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(*args)

Sets the localized string of the preset name.

Parameters
  • assetDescription (maxon.AssetDescription) – Asset to modify.

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

  • presetName (maxon.Id) – Localized String for the given language.

  • language (maxon.LanguageRef) – Language to find.

static DataDescriptionPresetStorageInterface.StorePreset(*args)

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

Parameters
Returns

maxon.AssetDescription on success.

Return type

maxon.AssetDescription