[Closed] max root folder command
Guys,
Noob Question. I am pretty sure there is a reserved command which gives the string of the Max Root folder (the location to which 3DSMax is installed). I know have used ones for the scripts path etc (scriptspath), but cannot for the life of me find the command for the installation folder for max itself.
Can someone please put me oput my misery, I have searched the help, and found it impossible to locate
Thanks guys…
Everzen
Symbolic Pathnames
You can use symbolic pathnames in the form $<name> anywhere a filename can be supplied to MAXScript. This support has been added in 3ds Max 4 and largely enhanced in 3ds Max 9. Any filename you provide to MAXScript can begin with a ‘$’ followed by one of the symbolic directory names below.
The following symbolic names are recognized:
Index
Symbolic Name
Directory
1
$max
Main 3ds Max executable directory
2
$maps
First directory in Maps directory config*
3
$scenes
3ds Max Scenes directory
4
$fonts
Fonts directory
5
$imports
File Imports directory
6
$exports
File Exports directory
7
$sounds
Sounds directory
8
$matlibs
Material Libraries directory
9
$scripts
Scripts directory
10
$startupScripts
Auto-load startup scripts directory
11
$plugins
First in the Plug-ins directory config*
12
$plugcfg
Plugin configurations directory
13
$images
Images directory
14
$ui
User Interface files directory
15
$macroScripts
macroScripts in UI directory
16
$web
Web downloads directory
17
$temp
System temp directory
18
$renderPresets
Render presets directory
19
$help
Help files directory
20
$expressions
Expressions directory
21
$previews
Previews directory
22
$maxstart
Directory of MAXSTART.MAX
23
$vpost
Video post directory
24
$drivers
Drivers directory
25
$autoback
Auto-backup directory
26
$marketDefaults
Market Defaults directory
27
$icons
Icons directory
28
$maxSysIcons
System icons directory
29
$renderOutput
Render output directory
30
$animation
Animations directory
31
$archives
Archives directory
32
$photometrics
Photometric files directory
33
$renderAssets
Render Assets directory
34
$userScripts
User Scripts directory
35
$userMacros
User Macroscripts directory
36
$userStartupScripts
User Startup Scripts directory
37
$userIcons
User Icons directory
38
$maxData
Max Data (Root) directory
39
$downloads
Downloads directory
40
$proxies
Bitmap Proxies directory
Please note that these are similar to the 3D Studio MAX System Directories filetype_names which start with a “#” and are used as arguments to the GetDir() and SetDir() methods.
The following example will open the file “foo.ms” in the current 3ds Max Scripts directory.
Example:
fileIn “$scripts\foo.ms”
NEW in 3ds Max 9: *The $maps and $plugins symbolic pathnames can also specify an index. In this case, the indexed directory will be used.
For example:
“$maps[2]\mybitmap.tga”
When no index is provided, the first map resp. plugins path will be used.
[from the documentation under ‘Symbolic Pathnames’]
You can use:
maxRootDir = getdir #maxroot
See “3ds Max System Directories” in the documentation.
Error while post submit. Waiting ~5 minutes to see my post really submitted…
Cheers Joel and ypuech,
the “getdir #maxroot” command will do for what I am working on now, but the symbolic paths are fantastic! Those extensions in Max9 have got to make project set up tools a lot easier and more complete… looks like that might be my next project
Thanks guys, top answers, which allow me to continue bumbling along my path to try and master this maxscript mystery
Cheers,
Rich