AssetCreationInterface Class Reference

#include <asset_creation.h>

Inheritance diagram for AssetCreationInterface:

Static Public Member Functions

static MAXON_METHOD Result< IdGetNewAssetIdFromIdAndVersion (const String &prefix, const IdAndVersion &idAndVersion)
 
static MAXON_METHOD Result< void > UpdateMetaData (const AssetDescription &asset)
 
static MAXON_METHOD Result< void > UpdateMetaData (BaseDocument *doc, DataDictionary &metaProperties, Bool calcBoundingBox, const Matrix &objectMatrix, const Id &subType)
 
static MAXON_METHOD Result< BoolSaveBaseDocumentAsAsset (BaseDocument *doc, const Filename &c4dRootPath, Filename &saveFileName, AddAssetDepencendyStruct &addDependencyStruct, ResolveAssetDependenciesStruct &resolveAssets, DataDictionary &metaProperties, Bool calcBoundingBox, const Matrix &objectMatrix, const Id &subType)
 
static MAXON_METHOD Result< Tuple< AssetDescription, Bool > > SaveMemFileAsAssetWithCopyAsset (const Url &depResultUrl, const StoreAssetStruct &storeAssetStruct, const InternedId &subType, const HashSet< AssetDependencyStruct > &dependencies, const String &assetName, Bool addAssetsIfNotInThisRepository)
 
static MAXON_METHOD Result< Tuple< AssetDescription, UpdatableAssetRepositoryRef > > SaveMemFileAsAsset (const Url &saveFileName, const Id &parentCategory, const InternedId &subType, Bool calculateMetaData, const DataDictionary &metaProperties, const HashSet< AssetDependencyStruct > &dependencies, const BaseArray< Url > &previews, Float animFps, const String &assetName, const HashMap< Id, String > &localizedNames, const HashMap< Id, String > &localizedAnnotations, const AssetMetaData &copyMetaData)
 
static MAXON_METHOD Result< Tuple< AssetDescription, UpdatableAssetRepositoryRef > > SaveMemFileAsAssetAlone (const Url &saveFileName, const AssetMetaData &copyMetaData)
 
static MAXON_METHOD Result< void > SaveMetaDataForAsset (const AssetDescription &asset, const Id &parentCategory, const InternedId &subType, Bool calculateMetaData, const DataDictionary &metaProperties, const HashSet< AssetDependencyStruct > &dependencies, const BaseArray< Url > &previews, Float animFps, const String &assetName, const HashMap< Id, String > &localizedNames, const HashMap< Id, String > &localizedAnnotations)
 
static MAXON_METHOD Result< AssetDescription > SaveDocumentAsset (BaseDocument *assetDoc, InternedId subType, Id newAssetId, const StoreAssetStruct &storeAssetStruct, const String &assetName, const String &versionString, const Delegate< Result< BaseBitmap * >()> &createPreviewBitmapDelegate, const AssetMetaData &copyMetaData, Bool addAssetsIfNotInThisRepository)
 
static MAXON_METHOD Result< Tuple< AssetDescription, Bool > > SaveTextureAsset (const Url &imageUrl, const String &assetName, const StoreAssetStruct &storeAssetStruct, const HashSet< AssetDependencyStruct > &dependencies, Bool addAssetsIfNotInThisRepository)
 
static MAXON_METHOD Result< void > GenerateImagePreview (const Url &imageUrl, const ValueReceiver< const Url & > &previews, Int32 previewW, Int32 previewH)
 
static MAXON_METHOD Result< void > GenerateScenePreviewImage (BaseDocument *doc, BaseBitmap *preview, GENERATESCENEPREVIEWIMAGEFLAGS flags, Int32 previewW, Int32 previewH)
 
static MAXON_METHOD Result< AssetDescription > CreateMaterialAsset (BaseDocument *activeDoc, BaseMaterial *mat, const StoreAssetStruct &storeAssetStruct, const Id &assetId, const String &assetName, const String &assetVersion, const AssetMetaData &copyMetaData, Bool addAssetsIfNotInThisRepository)
 
static MAXON_METHOD Result< AssetDescription > CreateObjectAsset (BaseObject *op, BaseDocument *activeDoc, const StoreAssetStruct &storeAssetStruct, const Id &assetId, const String &assetName, const String &assetVersion, const AssetMetaData &copyMetaData, Bool addAssetsIfNotInThisRepository)
 
static MAXON_METHOD Result< AssetDescription > CreateSceneAsset (BaseDocument *activeDoc, const StoreAssetStruct &storeAssetStruct, const Id &assetId, const String &assetName, const String &assetVersion, const AssetMetaData &copyMetaData, Bool addAssetsIfNotInThisRepository)
 
static MAXON_METHOD Result< AssetDescription > SaveActiveDocumentAsNewVersion (BaseDocument *activeDoc, Bool addAssetsIfNotInThisRepository)
 
static MAXON_METHOD Result< void > CreateObjectsOnDrag (BaseDocument *doc, const Url &url, const AssetDescription &asset, Bool allowPreviewCube, Bool overwriteMatrix, const Matrix &overwriteMatrixMg, Float placementScale, BaseObject *parent=nullptr, BaseObject *prev=nullptr)
 
static MAXON_METHOD Result< void > CheckObjectsOnDrop (BaseDocument *doc, const Url &url, const AssetDescription &asset, Float placementScale)
 
static MAXON_METHOD Result< BaseArray< BaseMaterial * > > CreateMaterialsOnDrag (BaseDocument *doc, BaseList2D *objectOrTag, const Url &url, Bool allowMultiple, const Id &subType, Bool noManagerUpdate, Bool startUndo)
 
static MAXON_METHOD Result< void > AddPreviewRenderAsset (const Block< AssetDescription > &assetsToPreviewRender)
 
static MAXON_METHOD Result< BoolOpenSaveAssetDialog (OPENSAVEASSETDIALOGFLAGS flags, const String &presetTypeName, Id &id, String &name, String &version, const AssetRepositoryRef &lookupRepository, Id &category, AssetRepositoryRef &selectedRepository, Bool &setAsDefault)
 
static MAXON_METHOD Result< UrlRenderDocumentAsset (BaseDocument *renderDoc, const MediaSessionProgressRef &progressRef, Int progressIndex, Int polygonCount, Int32 previewW, Int32 previewH, GENERATESCENEPREVIEWIMAGEFLAGS flags)
 
static MAXON_METHOD Result< ResolveAssetDependenciesStruct::ResolveDelegateGetAddDependencyDelegate (const Filename &documentPath, Bool addAssetsIfNotInThisRepository)
 
static MAXON_METHOD Bool GetDefaultSettings (const AssetDescription &asset, Block< const Int32 > &resId, BaseContainer &resData)
 
static MAXON_METHOD BaseList2DGetDefaultObject (const Block< const Int32 > &id, BaseDocument *doc)
 
static MAXON_METHOD BaseList2DGetDefaultObject (const AssetDescription &asset)
 
static MAXON_METHOD Bool SetDefaultObject (const Block< const Int32 > &defaultsType, Bool partial, const BaseContainer &bc, Bool setAsDefault, Bool allowMakeDefault)
 
static MAXON_METHOD Result< void > BrowseDescriptionForDefaults (Description &desc, const Delegate< Result< void >(const DescID &key, DescCompareEntry &&value)> &add, Bool isPartial)
 
static MAXON_METHOD Result< void > SaveDefaultPresetFromObject (GeListNode *l, Bool makeDefault, Bool allowMakeDefault=true)
 
static MAXON_METHOD Result< AssetDescription > SaveBrowserPreset (const BasePresetAssetType &assetType, const PresetSaveArgs &sourceData, const String &presetTypeName, const String &presetNameA, Bool showMakeDefault, Bool setAsDefault, Bool allowSceneRepository)
 
static MAXON_METHOD Tuple< Bool, BoolSupportDefaultPresets (C4DAtomGoal *l)
 

Private Member Functions

 MAXON_INTERFACE (AssetCreationInterface, MAXON_REFERENCE_NORMAL, "net.maxon.mvp.assetcreationinterface")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( AssetCreationInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.mvp.assetcreationinterface"   
)
private

◆ GetNewAssetIdFromIdAndVersion()

static MAXON_METHOD Result<Id> GetNewAssetIdFromIdAndVersion ( const String prefix,
const IdAndVersion idAndVersion 
)
static

◆ UpdateMetaData() [1/2]

static MAXON_METHOD Result<void> UpdateMetaData ( const AssetDescription &  asset)
static

◆ UpdateMetaData() [2/2]

static MAXON_METHOD Result<void> UpdateMetaData ( BaseDocument doc,
DataDictionary &  metaProperties,
Bool  calcBoundingBox,
const Matrix objectMatrix,
const Id subType 
)
static

◆ SaveBaseDocumentAsAsset()

static MAXON_METHOD Result<Bool> SaveBaseDocumentAsAsset ( BaseDocument doc,
const Filename c4dRootPath,
Filename saveFileName,
AddAssetDepencendyStruct addDependencyStruct,
ResolveAssetDependenciesStruct resolveAssets,
DataDictionary &  metaProperties,
Bool  calcBoundingBox,
const Matrix objectMatrix,
const Id subType 
)
static

◆ SaveMemFileAsAssetWithCopyAsset()

static MAXON_METHOD Result<Tuple<AssetDescription, Bool> > SaveMemFileAsAssetWithCopyAsset ( const Url depResultUrl,
const StoreAssetStruct storeAssetStruct,
const InternedId subType,
const HashSet< AssetDependencyStruct > &  dependencies,
const String assetName,
Bool  addAssetsIfNotInThisRepository 
)
static

◆ SaveMemFileAsAsset()

static MAXON_METHOD Result<Tuple<AssetDescription, UpdatableAssetRepositoryRef> > SaveMemFileAsAsset ( const Url saveFileName,
const Id parentCategory,
const InternedId subType,
Bool  calculateMetaData,
const DataDictionary &  metaProperties,
const HashSet< AssetDependencyStruct > &  dependencies,
const BaseArray< Url > &  previews,
Float  animFps,
const String assetName,
const HashMap< Id, String > &  localizedNames,
const HashMap< Id, String > &  localizedAnnotations,
const AssetMetaData &  copyMetaData 
)
static

◆ SaveMemFileAsAssetAlone()

static MAXON_METHOD Result<Tuple<AssetDescription, UpdatableAssetRepositoryRef> > SaveMemFileAsAssetAlone ( const Url saveFileName,
const AssetMetaData &  copyMetaData 
)
static

◆ SaveMetaDataForAsset()

static MAXON_METHOD Result<void> SaveMetaDataForAsset ( const AssetDescription &  asset,
const Id parentCategory,
const InternedId subType,
Bool  calculateMetaData,
const DataDictionary &  metaProperties,
const HashSet< AssetDependencyStruct > &  dependencies,
const BaseArray< Url > &  previews,
Float  animFps,
const String assetName,
const HashMap< Id, String > &  localizedNames,
const HashMap< Id, String > &  localizedAnnotations 
)
static

◆ SaveDocumentAsset()

static MAXON_METHOD Result<AssetDescription> SaveDocumentAsset ( BaseDocument assetDoc,
InternedId  subType,
Id  newAssetId,
const StoreAssetStruct storeAssetStruct,
const String assetName,
const String versionString,
const Delegate< Result< BaseBitmap * >()> &  createPreviewBitmapDelegate,
const AssetMetaData &  copyMetaData,
Bool  addAssetsIfNotInThisRepository 
)
static

◆ SaveTextureAsset()

static MAXON_METHOD Result<Tuple<AssetDescription, Bool> > SaveTextureAsset ( const Url imageUrl,
const String assetName,
const StoreAssetStruct storeAssetStruct,
const HashSet< AssetDependencyStruct > &  dependencies,
Bool  addAssetsIfNotInThisRepository 
)
static

◆ GenerateImagePreview()

static MAXON_METHOD Result<void> GenerateImagePreview ( const Url imageUrl,
const ValueReceiver< const Url & > &  previews,
Int32  previewW,
Int32  previewH 
)
static

◆ GenerateScenePreviewImage()

static MAXON_METHOD Result<void> GenerateScenePreviewImage ( BaseDocument doc,
BaseBitmap preview,
GENERATESCENEPREVIEWIMAGEFLAGS  flags,
Int32  previewW,
Int32  previewH 
)
static

◆ CreateMaterialAsset()

static MAXON_METHOD Result<AssetDescription> CreateMaterialAsset ( BaseDocument activeDoc,
BaseMaterial mat,
const StoreAssetStruct storeAssetStruct,
const Id assetId,
const String assetName,
const String assetVersion,
const AssetMetaData &  copyMetaData,
Bool  addAssetsIfNotInThisRepository 
)
static

◆ CreateObjectAsset()

static MAXON_METHOD Result<AssetDescription> CreateObjectAsset ( BaseObject op,
BaseDocument activeDoc,
const StoreAssetStruct storeAssetStruct,
const Id assetId,
const String assetName,
const String assetVersion,
const AssetMetaData &  copyMetaData,
Bool  addAssetsIfNotInThisRepository 
)
static

◆ CreateSceneAsset()

static MAXON_METHOD Result<AssetDescription> CreateSceneAsset ( BaseDocument activeDoc,
const StoreAssetStruct storeAssetStruct,
const Id assetId,
const String assetName,
const String assetVersion,
const AssetMetaData &  copyMetaData,
Bool  addAssetsIfNotInThisRepository 
)
static

◆ SaveActiveDocumentAsNewVersion()

static MAXON_METHOD Result<AssetDescription> SaveActiveDocumentAsNewVersion ( BaseDocument activeDoc,
Bool  addAssetsIfNotInThisRepository 
)
static

◆ CreateObjectsOnDrag()

static MAXON_METHOD Result<void> CreateObjectsOnDrag ( BaseDocument doc,
const Url url,
const AssetDescription &  asset,
Bool  allowPreviewCube,
Bool  overwriteMatrix,
const Matrix overwriteMatrixMg,
Float  placementScale,
BaseObject parent = nullptr,
BaseObject prev = nullptr 
)
static

◆ CheckObjectsOnDrop()

static MAXON_METHOD Result<void> CheckObjectsOnDrop ( BaseDocument doc,
const Url url,
const AssetDescription &  asset,
Float  placementScale 
)
static

◆ CreateMaterialsOnDrag()

static MAXON_METHOD Result<BaseArray<BaseMaterial*> > CreateMaterialsOnDrag ( BaseDocument doc,
BaseList2D objectOrTag,
const Url url,
Bool  allowMultiple,
const Id subType,
Bool  noManagerUpdate,
Bool  startUndo 
)
static

◆ AddPreviewRenderAsset()

static MAXON_METHOD Result<void> AddPreviewRenderAsset ( const Block< AssetDescription > &  assetsToPreviewRender)
static

◆ OpenSaveAssetDialog()

static MAXON_METHOD Result<Bool> OpenSaveAssetDialog ( OPENSAVEASSETDIALOGFLAGS  flags,
const String presetTypeName,
Id id,
String name,
String version,
const AssetRepositoryRef &  lookupRepository,
Id category,
AssetRepositoryRef &  selectedRepository,
Bool setAsDefault 
)
static

◆ RenderDocumentAsset()

static MAXON_METHOD Result<Url> RenderDocumentAsset ( BaseDocument renderDoc,
const MediaSessionProgressRef &  progressRef,
Int  progressIndex,
Int  polygonCount,
Int32  previewW,
Int32  previewH,
GENERATESCENEPREVIEWIMAGEFLAGS  flags 
)
static

◆ GetAddDependencyDelegate()

static MAXON_METHOD Result<ResolveAssetDependenciesStruct::ResolveDelegate> GetAddDependencyDelegate ( const Filename documentPath,
Bool  addAssetsIfNotInThisRepository 
)
static

◆ GetDefaultSettings()

static MAXON_METHOD Bool GetDefaultSettings ( const AssetDescription &  asset,
Block< const Int32 > &  resId,
BaseContainer resData 
)
static

GetDefaultSettings loads the settings for a preset

Parameters
[in]assetAsset to load.
[out]resIdBaseList Ids of the preset.
[out]resDataSettings Container.
Returns
True means a partial preset was loaded.

◆ GetDefaultObject() [1/2]

static MAXON_METHOD BaseList2D* GetDefaultObject ( const Block< const Int32 > &  id,
BaseDocument doc 
)
static

◆ GetDefaultObject() [2/2]

static MAXON_METHOD BaseList2D* GetDefaultObject ( const AssetDescription &  asset)
static

◆ SetDefaultObject()

static MAXON_METHOD Bool SetDefaultObject ( const Block< const Int32 > &  defaultsType,
Bool  partial,
const BaseContainer bc,
Bool  setAsDefault,
Bool  allowMakeDefault 
)
static

◆ BrowseDescriptionForDefaults()

static MAXON_METHOD Result<void> BrowseDescriptionForDefaults ( Description desc,
const Delegate< Result< void >(const DescID &key, DescCompareEntry &&value)> &  add,
Bool  isPartial 
)
static

◆ SaveDefaultPresetFromObject()

static MAXON_METHOD Result<void> SaveDefaultPresetFromObject ( GeListNode l,
Bool  makeDefault,
Bool  allowMakeDefault = true 
)
static

◆ SaveBrowserPreset()

static MAXON_METHOD Result<AssetDescription> SaveBrowserPreset ( const BasePresetAssetType &  assetType,
const PresetSaveArgs sourceData,
const String presetTypeName,
const String presetNameA,
Bool  showMakeDefault,
Bool  setAsDefault,
Bool  allowSceneRepository 
)
static

◆ SupportDefaultPresets()

static MAXON_METHOD Tuple<Bool, Bool> SupportDefaultPresets ( C4DAtomGoal l)
static

SupportDefaultPresets description.

Parameters
[in]lObject to check
Returns
Tuple<Bool, Bool>: first - support presets, second - support set as default