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
 

Private Member Functions

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

Member Function Documentation

◆ MAXON_INTERFACE()

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

◆ Apply()

MAXON_METHOD Result<void> Apply ( ) const

Apply loads the asset/preset.

Returns
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.

Parameters
[in]previewSizeDesired preview size.
[in]progressRefProgress object to use.
[in]progressIndexProgress Index to use.
Returns
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.

Parameters
[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.
Returns
OK on success.

◆ Serialize()

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

Serialize implements the serialization of the data to disk.

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