BasePresetAssetInterface Class Reference

#include <base_preset_asset.h>

Inheritance diagram for BasePresetAssetInterface:

Detailed Description

BasePresetAssetInterface allows to implement details for preset assets.

Public Member Functions

MAXON_METHOD Result< void > Apply () const
MAXON_METHOD Result< UrlGeneratePreview (Int previewSize, const ProgressRef &progressRef, Int progressIndex) const
MAXON_METHOD Result< void > ConvertFromLegacyBrowser (Int32 pluginId, const Block< const Char > &memBlock, const BaseContainer &settings, const String &name, DataDictionary &metaProperties, AddAssetMetaData &additionalMetaData, AddAssetDepencendyStruct &addDependencyStruct, ResolveAssetDependenciesStruct &resolveAssets)
MAXON_METHOD Result< void > Serialize (const OutputStreamRef &outputStream) const
MAXON_METHOD Result< ConstDataPtrGetPresetInternalConstDataPtr () const
MAXON_METHOD Result< DataGetPresetInternalData () const

Private Member Functions

 MAXON_INTERFACE (BasePresetAssetInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.asset.preset.base")

Member Function Documentation


MAXON_INTERFACE ( BasePresetAssetInterface  ,

◆ Apply()

MAXON_METHOD Result<void> Apply ( ) const

Apply loads the asset/preset.

OK on success.

◆ GeneratePreview()

MAXON_METHOD Result<Url> GeneratePreview ( Int  previewSize,
const ProgressRef &  progressRef,
Int  progressIndex 
) const

GeneratePreview implements the preview calculation of this preset type.

[in]previewSizeDesired preview size.
[in]progressRefProgress object to use.
[in]progressIndexProgress Index to use.
Image wrapped into a url on success.

◆ ConvertFromLegacyBrowser()

MAXON_METHOD Result<void> ConvertFromLegacyBrowser ( Int32  pluginId,
const Block< const Char > &  memBlock,
const BaseContainer settings,
const String name,
DataDictionary &  metaProperties,
AddAssetMetaData additionalMetaData,
AddAssetDepencendyStruct addDependencyStruct,
ResolveAssetDependenciesStruct resolveAssets 

ConvertFromLegacyBrowser implements the conversion from the old c4d content browser.

[in]pluginIdOld c4d plugin id.
[in]memBlockOriginal browser data.
[in]settingsOriginal browser settings.
[in]namePreset/Asset name.
[in]metaPropertiesAdditional meta properties.
[in]additionalMetaDataAdditional meta data.
[in]addDependencyStructAsset dependencies.
[in]resolveAssetsResolve asset helper struct.
OK on success.

◆ Serialize()

MAXON_METHOD Result<void> Serialize ( const OutputStreamRef &  outputStream) const

Serialize implements the serialization of the data to disk.

[in]outputStreamStream to store the data.
OK on success.

◆ GetPresetInternalConstDataPtr()

MAXON_METHOD Result<ConstDataPtr> GetPresetInternalConstDataPtr ( ) const

Reads the content of a preset asset. DataType and content will depend on the preset type and implementation. Returned typed might differ from GetPresetInternalData.

The preset's exposed data. Valid only as long as the loaded preset is in scope.

◆ GetPresetInternalData()

MAXON_METHOD Result<Data> GetPresetInternalData ( ) const

Reads the copied content of a preset asset. DataType and content will depend on the preset type and implementation.

The preset's exposed data (copied).