This reference page is linked to from the following overview topics: Saving and Loading Assets.
#include <iassetmanager.h>
Public Member Functions |
|
virtual AssetUser | GetAsset (const MaxSDK::Util::Path &filename, AssetType type, bool autoAcquire=true)=0 |
Return an AssetUser
object given a file name and an asset type. |
|
virtual AssetUser | GetAsset (const MCHAR *filename, AssetType type, bool autoAcquire=true)=0 |
Return an AssetUser
object given a file name and an asset type. |
|
virtual AssetUser | GetAsset (const MSTR &filename, AssetType type, bool autoAcquire=true)=0 |
Return an AssetUser
object given a file name and an asset type. |
|
virtual AssetUser | GetAsset (const AssetId &assetId) const =0 |
Return an AssetUser
object pointing to the id passed Automatically adds a reference to
the asset identified by the AssetId,
this reference will be removed at the destruction of the AssetUser.
|
|
virtual bool | ReleaseReference (const AssetId &assetid)=0 |
Release the reference to the asset
identified by the AssetId
If the asset doesn't have any other reference it will be removed
from the asset manager. |
|
virtual bool | ReleaseReference (const MCHAR *guid_string)=0 |
Release the reference to the asset
identified by the AssetId
string. |
|
virtual bool | AddReference (const AssetId &assetid)=0 |
Add a reference to the asset identified by
the AssetId.
|
|
virtual bool | AddReference (const MCHAR *guid_string)=0 |
Add a reference to the asset identified by
the AssetId
string. |
|
virtual MSTR | AssetIdToString (const AssetId &assetId) const =0 |
Convert an AssetId
object to a string. |
|
virtual bool | StringToAssetId (const MSTR &string, AssetId &assetId) const =0 |
Try to convert an a string to an AssetId.
|
|
virtual IOResult | LoadAsset (ILoad *iload, AssetUser &assetUser)=0 |
Load an asset from the scene file. |
|
virtual void | RemapLoadedAssetID (AssetId &assetId)=0 |
Remaps asset id loaded from scene file to
new asset id for the asset. |
|
virtual void | RegisterAssetMetaData (const AssetId &assetId, const MSTR &filename, AssetType type)=0 |
Called by system while loading the 3ds Max
file. |
|
virtual IOResult | Save (ISave *isave)=0 |
Called by system to save the metadata for
the active assets to the 3ds Max file. |
|
virtual IOResult | Load (ILoad *iload)=0 |
Called by system to load the metadata for
all assets from the 3ds Max file. |
|
virtual void | PreSave (ISave *isave)=0 |
Called by system before saving to the 3ds
Max file. |
|
virtual void | PreLoad (ILoad *iload)=0 |
Called by system before loading a 3ds Max
file. |
|
virtual void | PostLoad (ILoad *iload)=0 |
Called by system after loading the 3ds Max
file. |
|
Static Public Member Functions |
|
static
AssetMgmntExport IAssetManager * |
GetInstance () |
Returns the only instance of this manager.
|
virtual AssetUser GetAsset | ( | const MaxSDK::Util::Path & | filename, |
AssetType | type, | ||
bool | autoAcquire =
true |
||
) | [pure virtual] |
Return an AssetUser object given a file name and an asset type.
Automatically adds a reference to the asset identified by the AssetId, this reference will be removed at the destruction of the AssetUser.
[in] | filename | A file name which can be either a full path ("C:\bitmaps\a.bmp"), a relative path("..\bitmaps\a.bmp"), or just a filename("a.bmp"). |
[in] | type | The asset type, see AssetType. |
[in] | autoAcquire | if true, if an asset corresponding to the parameters does not exist, a new asset will be created. If false, a new asset will not be created. |
virtual AssetUser GetAsset | ( | const MCHAR * | filename, |
AssetType | type, | ||
bool | autoAcquire =
true |
||
) | [pure virtual] |
Return an AssetUser object given a file name and an asset type.
Automatically adds a reference to the asset identified by the AssetId, this reference will be removed at the destruction of the AssetUser.
[in] | filename | A file name which can be either a full path ("C:\bitmaps\a.bmp"), a relative path("..\bitmaps\a.bmp"), or just a filename("a.bmp"). |
[in] | type | The asset type, see AssetType. |
[in] | autoAcquire | if true, if an asset corresponding to the parameters does not exist, a new asset will be created. If false, a new asset will not be created. |
virtual AssetUser GetAsset | ( | const MSTR & | filename, |
AssetType | type, | ||
bool | autoAcquire =
true |
||
) | [pure virtual] |
Return an AssetUser object given a file name and an asset type.
Automatically adds a reference to the asset identified by the AssetId, this reference will be removed at the destruction of the AssetUser.
[in] | filename | A file name which can be either a full path ("C:\bitmaps\a.bmp"), a relative path("..\bitmaps\a.bmp"), or just a filename("a.bmp"). |
[in] | type | The asset type, see AssetType. |
[in] | autoAcquire | if true, if an asset corresponding to the parameters does not exist, a new asset will be created. If false, a new asset will not be created. |
virtual bool ReleaseReference | ( | const AssetId & | assetid | ) | [pure virtual] |
Release the reference to the asset identified by the AssetId If the asset doesn't have any other reference it will be removed from the asset manager.
[in] | assetId | asset id to be released |
virtual bool ReleaseReference | ( | const MCHAR * | guid_string | ) | [pure virtual] |
Release the reference to the asset identified by the AssetId string.
[in] | guid_string | the asset id string to be released |
virtual bool AddReference | ( | const AssetId & | assetid | ) | [pure virtual] |
Add a reference to the asset identified by the AssetId.
[in] | assetid | asset id for which we want to add a reference |
virtual bool AddReference | ( | const MCHAR * | guid_string | ) | [pure virtual] |
Add a reference to the asset identified by the AssetId string.
[in] | guid_string | asset id string for which we want to add a reference |
Convert an AssetId object to a string.
[in] | assetid | assetid that will be converted |
virtual void RemapLoadedAssetID | ( | AssetId & | assetId | ) | [pure virtual] |
Remaps asset id loaded from scene file to new asset id for the asset.
The asset id in the file being loaded may conflict with an existing asset id. Therefor, immediately after loading an asset id it must be passed through this method to get the new asset id
[in,out] | assetid | asset id to remap |
virtual void RegisterAssetMetaData | ( | const AssetId & | assetId, |
const MSTR & | filename, | ||
AssetType | type | ||
) | [pure virtual] |
Called by system while loading the 3ds Max file.
Registers asset metadata loaded from file
[in] | assetid | asset id for asset metadata |
[in] | name | A file name which can be either a full path ("C:\bitmaps\a.bmp"), a relative path("..\bitmaps\a.bmp"), or just a filename("a.bmp"). |
[in] | type | The asset type, see AssetType. |
Called by system to save the metadata for the active assets to the 3ds Max file.
[in] | isave | the ISave interface |
Called by system to load the metadata for all assets from the 3ds Max file.
[in] | iload | the ILoad interface |
virtual void PreSave | ( | ISave * | isave | ) | [pure virtual] |
Called by system before saving to the 3ds Max file.
Used to identify assets to store metadata for.
[in] | isave | the ISave interface |
virtual void PreLoad | ( | ILoad * | iload | ) | [pure virtual] |
Called by system before loading a 3ds Max file.
Preps the asset manager for loading assets from the file.
[in] | iload | the ILoad interface |
virtual void PostLoad | ( | ILoad * | iload | ) | [pure virtual] |
Called by system after loading the 3ds Max file.
Removes unused asset metadata.
[in] | iload | the ILoad interface |
static AssetMgmntExport IAssetManager* GetInstance | ( | ) | [static] |
Returns the only instance of this manager.