3ds Max C++ API Reference
IFileResolutionManager Class Referenceabstract

#include <IFileResolutionManager.h>

+ Inheritance diagram for IFileResolutionManager:

Public Member Functions

virtual MSTR GetFullFilePath (const MCHAR *filePath, MaxSDK::AssetManagement::AssetType assetType, bool byPassCache=false)=0
 Resolves the physical location of an asset file. More...
 
virtual bool GetFullFilePath (MaxSDK::Util::Path &filePath, MaxSDK::AssetManagement::AssetType assetType, bool byPassCache=false)=0
 Resolves the physical location of an asset file. More...
 
virtual bool GetFullFilePath (const MaxSDK::AssetManagement::AssetUser &assetUser, MaxSDK::Util::Path &filePath, bool byPassCache=false)=0
 Resolves the physical location of an asset file. More...
 
virtual bool GetFullFilePath (const MaxSDK::AssetManagement::AssetUser &assetUser, MSTR &filePath, bool byPassCache=false)=0
 Resolves the physical location of an asset file. More...
 
virtual bool GetFullFilePath (const MaxSDK::AssetManagement::AssetId &assetID, MaxSDK::Util::Path &filePath, bool byPassCache=false)=0
 Resolves the physical location of an asset file. More...
 
virtual bool GetFullFilePath (const MaxSDK::AssetManagement::AssetId &assetID, MSTR &filePath, bool byPassCache=false)=0
 Resolves the physical location of an asset file. More...
 
virtual MSTR GetFullFilePath (const MaxSDK::AssetManagement::AssetUser &assetUser, bool byPassCache=false)=0
 Resolves the physical location of an asset file. More...
 
virtual MSTR GetFullFilePath (const MaxSDK::AssetManagement::AssetId &assetId, bool byPassCache=false)=0
 Resolves the physical location of an asset file. More...
 
virtual DWORD GetMaximumCacheDuration ()=0
 Returns the maximum age of cached data in milliseconds for it to be valid Cache data that is older that than this duration is not used of file asset resolution. More...
 
virtual void SetMaximumCacheDuration (DWORD newMaxDuration)=0
 Sets the maximum age of valid cached data in milliseconds Cache data that is older that than this duration is not used of file asset resolution. More...
 
virtual bool IsCachingEnabled ()=0
 Returns true if the file resolution manager is using cached data to resolve files. More...
 
virtual void EnableCaching ()=0
 This makes the file resolution manager use cached results when resolving files. More...
 
virtual void DisableCaching ()=0
 This makes the file resolution manager not use cached results when resolving files. More...
 
virtual void PushAllowCachingOfUnresolvedResults (bool newVal)=0
 Pushes current state and sets whether caching of unresolved results is permitted Normally caching of unresolved results is off, and turned on only when loading a lot of asset files quickly, like at the beginning of a render. More...
 
virtual void PopAllowCachingOfUnresolvedResults ()=0
 Pops state of whether caching of unresolved results is permitted. More...
 
virtual void DoGetUniversalFileName (MaxSDK::Util::Path &aFullFilePath) const =0
 Transforms an absolute file path to a UNC path. More...
 
virtual void DoGetUniversalFileName (MSTR &fullFilePath) const =0
 Transforms an absolute file path to a UNC path. More...
 
virtual void UpdateDotIniFile ()=0
 
virtual int GetNumAssetTypes () const =0
 Return the number of asset types currently registered. More...
 
virtual MaxSDK::AssetManagement::AssetType GetAssetType (const MSTR &assetType) const =0
 Returns the asset type ID for the asset type name If the asset type does not exist, it registers the new asset type identified by the string passed in parameter and returns the asset type ID. More...
 
virtual const MCHARGetAssetTypeString (MaxSDK::AssetManagement::AssetType assetType) const =0
 Returns the asset type name for the asset type If the asset type does not exist, a null pointer is returned. More...
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Static Public Member Functions

static AssetMgmntExport IFileResolutionManagerGetInstance ()
 Returns the only instance of this manager.
More...
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Protected Member Functions

virtual ~IFileResolutionManager ()
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClasspc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 

Constructor & Destructor Documentation

◆ ~IFileResolutionManager()

virtual ~IFileResolutionManager ( )
inlineprotectedvirtual
276 {}

Member Function Documentation

◆ GetInstance()

static AssetMgmntExport IFileResolutionManager* GetInstance ( )
static

Returns the only instance of this manager.

◆ GetFullFilePath() [1/8]

virtual MSTR GetFullFilePath ( const MCHAR filePath,
MaxSDK::AssetManagement::AssetType  assetType,
bool  byPassCache = false 
)
pure virtual

Resolves the physical location of an asset file.

Gets an absolute UNC path of an asset file

Parameters
[in]filePath: is a possible location of the asset file. This location may be a relative or absolute file path. If filePath is a relative file path, it may rooted at the max project folder(by default the folder that contains the 3dsmax.exe file) or it may be rooted at the folder holds the scenefile, or it may be rooted at one of the User Paths for the specified assetType, in this order. filePath includes the asset's filename.
[in]assetTypee.g. kXRefAsset, kBitmapAsset, kVideoPost, etc
[in]byPassCache: If set to true, the file resolution manager bypasses the cache and attempts to find the asset file on disk or network.
Returns
a MSTR with an absolute path or the where the asset is located if successful; otherwise returns an empty MSTR if it fails to find the asset file

◆ GetFullFilePath() [2/8]

virtual bool GetFullFilePath ( MaxSDK::Util::Path filePath,
MaxSDK::AssetManagement::AssetType  assetType,
bool  byPassCache = false 
)
pure virtual

Resolves the physical location of an asset file.

Gets an absolute UNC path of an asset file

Parameters
[in,out]filePath: is a possible location of the asset file. This location may be a relative or absolute file path. If filePath is a relative file path, it may rooted at the max project folder(by default the folder that contains the 3dsmax.exe file) or it may be rooted at the folder holds the scenefile , or it may be rooted at one of the User Paths for the specified assetType, in this order. filePath includes the asset's filename. filePath is set to an absolute UNC path if the asset file is found. If the asset file is not found it is left unchanged.
[in]assetTypee.g. kXRefAsset, kBitmapAsset, kVideoPost, etc
[in]byPassCacheIf set to true, the file resolution manager bypasses the cache and attempts to find the asset file on disk or network.
Returns
true if the asset file is located successful; otherwise returns false

◆ GetFullFilePath() [3/8]

virtual bool GetFullFilePath ( const MaxSDK::AssetManagement::AssetUser assetUser,
MaxSDK::Util::Path filePath,
bool  byPassCache = false 
)
pure virtual

Resolves the physical location of an asset file.

Gets an absolute UNC path of an asset file

Parameters
[in]assetUser: the AssetUser to retrieve the asset file information from
[out]filePath: is set to an absolute UNC path if the asset file is found. If the asset file is not found it is left unchanged.
[in]byPassCacheIf set to true, the file resolution manager bypasses the cache and attempts to find the asset file on disk or network.
Returns
true if the asset file is located successful; otherwise returns false

◆ GetFullFilePath() [4/8]

virtual bool GetFullFilePath ( const MaxSDK::AssetManagement::AssetUser assetUser,
MSTR filePath,
bool  byPassCache = false 
)
pure virtual

Resolves the physical location of an asset file.

Gets an absolute UNC path of an asset file

Parameters
[in]assetUser: the AssetUser to retrieve the asset file information from
[out]filePath: is set to an absolute UNC path if the asset file is found. If the asset file is not found it is left unchanged.
[in]byPassCacheIf set to true, the file resolution manager bypasses the cache and attempts to find the asset file on disk or network.
Returns
true if the asset file is located successful; otherwise returns false

◆ GetFullFilePath() [5/8]

virtual bool GetFullFilePath ( const MaxSDK::AssetManagement::AssetId assetID,
MaxSDK::Util::Path filePath,
bool  byPassCache = false 
)
pure virtual

Resolves the physical location of an asset file.

Gets an absolute UNC path of an asset file

Parameters
[in]assetID: a unique ID that specifies a particular asset
[out]filePath: is set to an absolute UNC path if the asset file is found. If the asset file is not found it is left unchanged.
[in]byPassCacheIf set to true, the file resolution manager bypasses the cache and attempts to find the asset file on disk or network.
Returns
true if the asset file is located successful; otherwise returns false

◆ GetFullFilePath() [6/8]

virtual bool GetFullFilePath ( const MaxSDK::AssetManagement::AssetId assetID,
MSTR filePath,
bool  byPassCache = false 
)
pure virtual

Resolves the physical location of an asset file.

Gets an absolute UNC path of an asset file

Parameters
[in]assetID: a unique ID that specifies a particular asset
[out]filePath: is set to an absolute UNC path if the asset file is found. If the asset file is not found it is left unchanged.
[in]byPassCacheIf set to true, the file resolution manager bypasses the cache and attempts to find the asset file on disk or network.
Returns
true if the asset file is located successful; otherwise returns false

◆ GetFullFilePath() [7/8]

virtual MSTR GetFullFilePath ( const MaxSDK::AssetManagement::AssetUser assetUser,
bool  byPassCache = false 
)
pure virtual

Resolves the physical location of an asset file.

Gets an absolute UNC path of an asset file

Parameters
[in]assetUser: the AssetUser to retrieve the asset file information from
[in]byPassCacheIf set to true, the file resolution manager bypasses the cache and attempts to find the asset file on disk or network.
Returns
a MSTR with an absolute path or the where the asset is located if successful; otherwise returns an empty MSTR if it fails to find the asset file

◆ GetFullFilePath() [8/8]

virtual MSTR GetFullFilePath ( const MaxSDK::AssetManagement::AssetId assetId,
bool  byPassCache = false 
)
pure virtual

Resolves the physical location of an asset file.

Gets an absolute UNC path of an asset file

Parameters
[in]assetId: the AsssetId to retrieve the asset file information for
[in]byPassCacheIf set to true, the file resolution manager bypasses the cache and attempts to find the asset file on disk or network.
Returns
a MSTR with an absolute path or the where the asset is located if successful; otherwise returns an empty MSTR if it fails to find the asset file

◆ GetMaximumCacheDuration()

virtual DWORD GetMaximumCacheDuration ( )
pure virtual

Returns the maximum age of cached data in milliseconds for it to be valid Cache data that is older that than this duration is not used of file asset resolution.

Returns
the maximum age of cached data in milliseconds for it to be valid

◆ SetMaximumCacheDuration()

virtual void SetMaximumCacheDuration ( DWORD  newMaxDuration)
pure virtual

Sets the maximum age of valid cached data in milliseconds Cache data that is older that than this duration is not used of file asset resolution.

Parameters
[in]newMaxDuration: maximum age of valid cached data in milliseconds.

◆ IsCachingEnabled()

virtual bool IsCachingEnabled ( )
pure virtual

Returns true if the file resolution manager is using cached data to resolve files.

Returns
true if caching is used

◆ EnableCaching()

virtual void EnableCaching ( )
pure virtual

This makes the file resolution manager use cached results when resolving files.

◆ DisableCaching()

virtual void DisableCaching ( )
pure virtual

This makes the file resolution manager not use cached results when resolving files.

◆ PushAllowCachingOfUnresolvedResults()

virtual void PushAllowCachingOfUnresolvedResults ( bool  newVal)
pure virtual

Pushes current state and sets whether caching of unresolved results is permitted Normally caching of unresolved results is off, and turned on only when loading a lot of asset files quickly, like at the beginning of a render.

Parameters
[in]newVal: whether caching of unresolved results is permitted.

◆ PopAllowCachingOfUnresolvedResults()

virtual void PopAllowCachingOfUnresolvedResults ( )
pure virtual

Pops state of whether caching of unresolved results is permitted.

◆ DoGetUniversalFileName() [1/2]

virtual void DoGetUniversalFileName ( MaxSDK::Util::Path aFullFilePath) const
pure virtual

Transforms an absolute file path to a UNC path.

Transforms an absolute file path to a UNC path

Parameters
[in,out]aFullFilePath: an absolute file path that is transformed into a UNC path. It is only converted to a UNC path if the user preference "Resolve Path to UNC" is turned on

◆ DoGetUniversalFileName() [2/2]

virtual void DoGetUniversalFileName ( MSTR fullFilePath) const
pure virtual

Transforms an absolute file path to a UNC path.

Transforms an absolute file path to a UNC path

Parameters
[in,out]fullFilePath: an absolute file path that is transformed into a UNC path. It is only converted to a UNC path if the user preference "Resolve Path to UNC" is turned on.

◆ UpdateDotIniFile()

virtual void UpdateDotIniFile ( )
pure virtual

◆ GetNumAssetTypes()

virtual int GetNumAssetTypes ( ) const
pure virtual

Return the number of asset types currently registered.

Returns
number of currently registered types

◆ GetAssetType()

virtual MaxSDK::AssetManagement::AssetType GetAssetType ( const MSTR assetType) const
pure virtual

Returns the asset type ID for the asset type name If the asset type does not exist, it registers the new asset type identified by the string passed in parameter and returns the asset type ID.

If the asset type is already registered, it returns the ID corresponding to the asset type name.

Parameters
[in]assetType: the asset type name.
Returns
the asset type ID

◆ GetAssetTypeString()

virtual const MCHAR* GetAssetTypeString ( MaxSDK::AssetManagement::AssetType  assetType) const
pure virtual

Returns the asset type name for the asset type If the asset type does not exist, a null pointer is returned.

Parameters
[in]assetType: the asset type ID to return a name for
Returns
the asset type name