MaxStart, Custom User Path via MaxScript

MaxStart, Custom User Path via MaxScript

Anonymous
Not applicable
2,707 Views
2 Replies
Message 1 of 3

MaxStart, Custom User Path via MaxScript

Anonymous
Not applicable

Greetings

 

Past versions of 3ds Max particularly Max 2014/16, I've been able to set the MaxStart Custom User Path via a simple maxscript, example below. The script adds a custom directory to the 3dsmax.ini file, so the next time you start Max it launches the maxstart.max file in that location.

 

setINISetting (getMAXIniFile()) "Directories" "MaxStart" "c:\test"

 

Problems arise with the script in Max 2019. The script runs perfectly and updates the 3dsmax.ini with the appropriate custom path. However when you launch max again the 3dsmax.ini resets the MaxStart directory to the default ./scenes directory.

 

Only way I can get a custom path to stick is via the menus, how ever in this scenario I need it to work via maxscript.

 

Any help would be appreciated.

0 Likes
Accepted solutions (1)
2,708 Views
2 Replies
Replies (2)
Message 2 of 3

miauuuu
Collaborator
Collaborator
Accepted solution

Try with this:

(
	--	CHANGE USER PATHS 
	
	local projectFolderPath  =  "D:\\"
	pathConfig.setCurrentProjectFolder projectFolderPath
-- 	
	local fontsPath  =  "F:\\3dsMaxVersions\\3dsMax_2018\\3ds Max 2018\\fonts"
	SetDir #font fontsPath
	local scenesPath = "C:\\Program Files\\Autodesk\\3ds Max 2018\\scripts\\Startup\\3dsMax_scenes\\scenes"
	SetDir #scene scenesPath
	
	local importPath  =  " D:\\3dsMax_scenes\\import"
	SetDir #import  importPath
-- 	
	local exportPath =  "D:\\3dsMax_scenes\\export"
	SetDir #export  exportPath
-- 	
	local helpPath =  "F:\\3dsMaxVersions\\3dsMax_2018\\3ds Max 2018\\help"
	SetDir #help  helpPath
-- 	
	local previewsPath =  "D:\\3dsMax_scenes\\previews"
	SetDir #preview previewsPath
-- 	
	local imagesPath =  "D:\\3dsMax_scenes\\sceneassets\\images"
	SetDir #image imagesPath
-- 	
	local soundsPath =  "D:\\3dsMax_scenes\\sceneassets\\sounds"
	SetDir #sound soundsPath
-- 	
	local plugCFGPath =  "C:\\Users\\YOU USER NAME\\AppData\\Local\\Autodesk\\3dsMax\\2018 - 64bit\\ENU\\en-US\\plugcfg"
	SetDir #plugcfg plugCFGPath
-- 	
	local maxStartPath =  "D:\\3dsMax_scenes\\scenes"
	SetDir #maxstart maxStartPath
-- 	
	local videoPostPath =  "D:\\3dsMax_scenes\\vpost"
	SetDir #vpost videoPostPath
-- 	
	local heidiDriversPath =  "F:\\3dsMaxVersions\\3dsMax_2018\\3ds Max 2018\\drivers"
	SetDir #drivers heidiDriversPath
-- 	
	local autoBackupPath =  "D:\\3dsMax_scenes\\autoback"
	SetDir #autoback autoBackupPath
-- 	
	local materialsPath =  "D:\\3dsMax_scenes\\materiallibraries"
	SetDir #matlib materialsPath
-- 	
	local _scriptsPath =  "F:\\3dsMaxVersions\\3dsMax_2018\\3ds Max 2018\\scripts"
	SetDir #scripts _scriptsPath
-- 	
	local startupScriptsPath =  "F:\\3dsMaxVersions\\3dsMax_2018\\3ds Max 2018\\scripts\\startup"
	SetDir #startupScripts startupScriptsPath
-- 	
	local defaultsPath =  "F:\\3dsMaxVersions\\3dsMax_2018\\3ds Max 2018\\en-US\\defaults\\MAX"
	SetDir #defaults defaultsPath
	
	local renderPresetsPath =  "C:\\Program Files\\Autodesk\\3ds Max 2018\\scripts\\Startup\\3dsMax_scenes\\renderpresets"
	SetDir #renderPresets renderPresetsPath
	
	local renderOutputPath =  "D:\\3dsMax_scenes\\renderoutput"
	SetDir #renderoutput  renderOutputPath
-- 	
	local animationsPath =  "D:\\3dsMax_scenes\\sceneassets\\animations"
	SetDir #animations animationsPath
-- 	
	local archivesPath =  "D:\\3dsMax_scenes\\archives"
	SetDir #archives archivesPath
	
	local photometricPath =  "C:\\Program Files\\Autodesk\\3ds Max 2018\\scripts\\Startup\\3dsMax_scenes\\photometric"
	SetDir #photometric photometricPath
	
	local renderAssetsPath =  "D:\\3dsMax_scenes\\sceneassets\\renderassets"
	SetDir #renderassets renderAssetsPath
-- 	
	local additionalScriptsPath =  "C:\\Users\\YOU USER NAME\\AppData\\Local\\Autodesk\\3dsMax\\2018 - 64bit\\ENU\\scripts"
	SetDir #userScripts additionalScriptsPath
-- 	
	local additionalMacrosPath =  "C:\\Users\\YOU USER NAME\\AppData\\Local\\Autodesk\\3dsMax\\2018 - 64bit\\ENU\\usermacros"
	SetDir #userMacros additionalMacrosPath
-- 	
	local additionalStartupScriptsPath =  "C:\\Users\\YOU USER NAME\\AppData\\Local\\Autodesk\\3dsMax\\2018 - 64bit\\ENU\\scripts\\startup"
	SetDir #userStartupScripts additionalStartupScriptsPath
-- 	
	local tempPath =  "C:\\Users\\YOU USER NAME\\AppData\\Local\\Autodesk\\3dsMax\\2018 - 64bit\\ENU\\temp"
	SetDir #temp tempPath
-- 	
	local additionalIconsPath =  "C:\\Users\\YOU USER NAME\\AppData\\Local\\Autodesk\\3dsMax\\2018 - 64bit\\ENU\\usericons"
	SetDir #userIcons additionalIconsPath 
-- 	
	local maxDataPath =  "C:\\Users\\YOU USER NAME\\AppData\\Local\\Autodesk\\3dsMax\\2018 - 64bit\\ENU\\"
	SetDir #maxData maxDataPath
-- 	
	local downloadsPath =  "D:\\3dsMax_scenes\\downloads"
	SetDir #downloads downloadsPath
-- 	
	local bitmapProxiesPath =  "D:\\3dsMax_scenes\\proxies"
	SetDir #proxies bitmapProxiesPath
-- 	
	local pageFilePath =  "C:\\Users\\YOU USER NAME\\AppData\\Local\\Autodesk\\3dsMax\\2018 - 64bit\\ENU\\temp"
	SetDir #pageFile pageFilePath
)
https://miauu-maxscript.com/
0 Likes
Message 3 of 3

Anonymous
Not applicable

Brilliant, thanks miauuuu that did the trick.

0 Likes