maxon.DataDescriptionPresetStorageInterface¶
Description¶
Helper class to handle loading and saving of presets.
Inheritance diagram¶
Methods Signature¶
|
Deletes a preset from the database. |
|
Returns all stored attribute ids of a given preset identifier database. |
|
Returns all preset identifiers registered under the given scope. |
|
Returns the localized string of the preset name. |
|
Returns all stored preset ids. |
|
Reads a preset from the database. |
|
Sets the localized string of the preset name. |
|
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
repository (
maxon.AssetRepositoryRef
) – Repository to search for presets (including it’s bases).presetIdentifier (
maxon.Id
) – Identifier to check.
- 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
-
static
DataDescriptionPresetStorageInterface.
GetPresetName
(repository, presetIdentifier, presetName, language)¶ 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
(repository, presetIdentifier)¶ Returns all stored preset ids.
- Parameters
repository (
maxon.AssetRepositoryRef
) – Repository to search for presets (including it’s bases).presetIdentifier (
maxon.Id
) – Identifier to check.
- Returns
Array of
maxon.Id
on success.- Return type
-
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
-
static
DataDescriptionPresetStorageInterface.
SetPresetName
(assetDescription, presetIdentifier, presetName, language)¶ 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
(repository, presetIdentifier, presetName, presetData)¶ Stores a preset under the given scope and id in 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.presetData (
maxon.DataDictionary
) – Data to store.
- Returns
maxon.AssetDescription
on success.- Return type