The PathConfig struct provides methods to access and manage Project paths, System paths, manipulate paths and convert between UNC, absolute and relative paths and so on.
Available in 3ds Max 9 and higher.
Performs all steps necessary to set up a new Project, including browsing for project folder and creating all sub-folders. Returns true on success, false if cancelled.
Performs all steps necessary to set up a new Project using the supplied Project Path as the Root. Returns true on success, false if cancelled.
Returns the current Project Folder.
Returns the current Project Folder definition file (*.MXP).
Returns the Project Definition filename (<ProjectPath>\<ProjectName>.mxp) for the specified Project Folder.
Returns the indexed Project sub-directory.
Returns the number of Project sub-directories. See above example.
Adds Project Directory Filter where <directory_type> is one of the following:
#font | #Scene | #export | #import | #help | #expression | #preview | #image | #Sound | #plugcfg | #maxstart | #vpost | #drivers | #autoback | #matlib | #scripts | #startupScripts | #defaults | #renderPresets | #ui | #maxroot | #renderoutput | #animations | #archives | #Photometric | #renderassets | #userScripts | #userMacros | #userStartupScripts | #temp | #userIcons | #maxData | #downloads | #proxies
Removes all filters added using pathConfig.addProjectDirectoryCreateFilter()
Sets the current project folder to the given path. The Project Folder is displayed in the title bar of 3ds Max and will be updated instantly.
Appends the second argument filename to the first argument path, adding backslash if necessary.
Converts the relative path argument to absolute project path using the Project Directory.
Converts the path argument to lower case and unifies the backslashes.
Converts the first path argument to a relative path with respect to the second path argument.
Returns the UNC path from a mapped drive path.
Resolves the filename using map paths, returns fully qualified filename if the file is found.
Returns a normalized path name.
Returns true if the two paths resolve to the same location (in other words the two paths are equivalent), false if they are not equivalent.
This is the property toggle found in Preferences>Files which controls whether max automatically converts absolute paths to their UNC equivalents. (i.e. M:\file.txt to server1\\file.txt if M: is mapped to server1\\)
Removes a leaf from the given path.
Removes the top parent from the given path.
Returns the last sub-directory name from the given path. If the path is a full file name, returns the file name. Equivalent to filename from path.
Returns the root of the given path.
Returns true if the argument is an absolute path, false if it is a relative path. The path does not have to exist for this method to operate on it.
Returns true if the argument is a legal path definition, false if it is an illegal path. The path does not have to exist for this method to operate on it, it is only being parsed for correctness.
Returns true if the argument starts with a backslash, false if it does not.
Returns false if the argument starts with a backslash, true if it starts with a drive letter. The inverse of pathConfig.isPathRootedAtBackslash()
Returns true if the argument path is a valid Project Folder root, false otherwise.
Returns true if the argument path is a Root path, false otherwise
Returns true if the argument path is a UNC path, false otherwise
Returns true if the argument path is a UNC share path, false otherwise.
Returns true if the system is using Profile directories, false otherwise.
Returns true if the system is using Roaming Profiles, false otherwise. When using roaming profiles on somebody else's machine, your profile is being accessed over the network from your own machine. This mode is not officially supported.
Points at the GetDir() method documented here.
Returns the system directory where directory_type is one of the following:
#font | #Scene | #export | #import | #help | #expression | #preview | #image | #Sound | #plugcfg | #maxstart | #vpost | #drivers | #autoback | #matlib | #scripts | #startupScripts | #defaults | #renderPresets | #ui | #maxroot | #renderoutput | #animations | #archives | #Photometric | #renderassets | #userScripts | #userMacros | #userStartupScripts | #temp | #userIcons | #maxData | #downloads | #proxies | #pageFile
Points at the mapPaths struct definition.
Points at the pluginPaths struct.
Points at the sessionPaths struct.
Points at the SetDir() method documented here.
Points at theXRefPath struct
Saves the path configuration to the given filename.Returns true on success, false otherwise.Corresponds to the Save To... button in the Customize>Configure User Paths dialog.
Loads the path configuration from the specified path configuration file. Returns true on success, false otherwise.Corresponds to the Load button in the Customize>Configure User Paths dialog.
Merges the settings from the given path configuration file. Returns true on success, false otherwise. Loads the path configuration from the specified path configuration file. Returns true on success, false otherwise. Corresponds to the Merge button in the Customize>Configure User Paths dialog.