Session paths are identical to bitmap/photometric paths and xref paths, except they are never saved when 3ds Max exits. The list of session paths is always empty when 3ds Max boots up. However, if session paths are configured before a file is loaded, then they will be used to search for resources in the file.
Note: The session paths are NOT displayed in the Configure Paths dialog.
There are four functions available through the sessionPaths structure. In each function, the keyword #map can be replaced with #xref to specify an xref path. The two lists of session paths (bitmaps and xrefs) are maintained separately from each other.
Adds a new bitmap or xref session path. Returns true on success. Adding the same path more than once will result in a single path stored in the session paths.
Returns the number of bitmap or xref session paths.
Returns the indexed bitmap or xref session path.
Deletes the indexed bitmap or xref session path. Returns true on success.
sessionPaths.count #map --the number of session bitmap paths
0 --there are none at this point
sessionPaths.add #map "d:/maps" --add a bitmap session path
sessionPaths.count #map --has the number of paths changed?
1 --of course it did!
sessionPaths.get #map 1 --get the first bitmap session path
"d:/maps" --what you put in, comes out...
sessionPaths.delete #map 1 --delete the first bitmap session path
true --dead you are!
sessionPaths.count #map --and the number of session paths is...
One suggested use for session paths is to create a "project" system of asset management. Each project has certain folders for bitmaps and xrefs. Before a user loads a file, they would first load the project settings, which would set up the appropriate session paths. Any files loaded as part of that project will automatically have access to the correct library of maps and xrefs. If a project is closed, the session paths would be deleted.
mapPaths const StructDef
3ds Max System Directories