Interfaces> Core Interfaces > FileResolutionManager |
The FileResolutionManager Core Interface exposes the new system introduced in 3ds Max 2010 which is used internally by plug-ins to resolve the paths of their file assets.
In releases prior to 3ds Max 2010, the resolution of asset files was performed either locally in the plug-in code, or through one of several methods provided by 3ds Max.
Since 3ds Max 2010, all resolutions of asset files must be performed through the AssetUser object that uses the new Asset File Resolution Manager. The File Resolution Manager can also be used for resolutions of Assets. All other resolution methods have been removed, and plug-ins should not implement their rules for resolving paths to a file asset. File resolution is based on the asset file name, asset type,and the file path to a scene that depends on the asset.
The File Resolution Manager also implements a path caching mechanism. A set of methods has been exposed to allow plug-ins and scripts to control the cache enabled/disabled state, cache duration and also to provide a way to bypass the cache when getting the resolved path.
<bool>FileResolutionManager.getFullFilePath <&TSTR>filePath <enum>assetType byPassCache:<bool> filePath is In and Out parameter assetType enums: {#Other | #Bitmap | #XRef | #Photometric | #Animation | #VideoPost | #BatchRender | #ExternalLink | #RenderOutput | #PreRenderScript | #PostRenderScript | #Sound | #Container | #MaxCreationGraph} byPassCache default value: false
Returns the full file path by modifying the first argument passed by-reference. The second argument determines the asset type the file belongs to.
If byPassCache: is passed as true, the cache will not be used. If it is passed as false or not specified, the cache will be used.
<bool>FileResolutionManager.getFullFilePath_assetID <TSTR>assetID <&TSTR>filePath byPassCache:<bool> filePath is In and Out parameter byPassCache default value: false
Returns the full file path by modifying the second argument passed by-reference. The first argument defines the assetID to search for.
If byPassCache: is passed as true, the cache will not be used. If it is passed as false or not specified, the cache will be used.
<void>FileResolutionManager.doGetUniversalFileName <&TSTR>aFullFilePath aFullFilePath is In and Out parameter
Returns the universal file name by modifying the by-reference argument.
Returns the number of asset types.
Available in 3ds Max 2011 and higher.
<string>FileResolutionManager.GetAssetTypeString <enum>assetType assetType enums: {#Other | #Bitmap | #XRef | #Photometric | #Animation | #VideoPost | #BatchRender | #ExternalLink | #RenderOutput | #PreRenderScript | #PostRenderScript | #Sound | #Container | #MaxCreationGraph}
Returns the asset type string corresponding to the provided asset type name.
Available in 3ds Max 2011 and higher.
File Resolution results are being cached, but the cached results expire after a specified maximum cache duration period.
File resolutions will be cached and the cached results returns if the same file has to be resolved again sooner than the maximum cache duration (see below).
Files will always be resolved without using the cache at all.
Returns true if the cache is on, false if it is off.
Returns the maximum cache duration in milliseconds. Default is 1000.
If a resolution has been cached and a new resolution of the same file is requested later than the time of the previous resolution plus the maximum cache duration, the cache result will be ignored and a new resolution will be performed.
If the time passed since the last resolution is less than the maximum cache duration, the cached result will be returned.
Sets the maximum cache duration.