Notifications
Clear all

[Closed] how to load maxscript auto

hi
I want to load all my custom max script automatically while opening 3dsmax from one central location , like maya where we can create env file in that file we can specify MAYA_SCRIPT_PATH

is that possible in 3dsmax?

4 Replies
3 Replies
(@diiie)
Joined: 10 months ago

Posts: 0

You can find the “Configure System Paths” under the “Customize” menu.
The additional scripts path can be modified there.

(@mantragora)
Joined: 10 months ago

Posts: 0

Don’t bother with this if you want to have scripts made from multiple pieces(for example UI in one script, some helper functions in another and main code in another) because they would have to be evaluated in correct order and MAX will not guarantee this to you. Hard-coding paths inside script is also wrong way.

It’s better to create your own script loader where you can specify your own plug-in file/directory structure:
Custom XML script loader

(@gandhics)
Joined: 10 months ago

Posts: 0

Max runs a script that has named “startup.ms” automaticllay when it starts.
So. make a sctip that load all your script from one central location and maned as startup.ms and put in script folder

pathConfig.GetDir #userStartupScripts

Scripts in that folder are automatically loaded. Then you could have a script like:

filein @"YourScriptPath\Script1.ms"
  filein @"YourScriptPath\Script2.ms"

and place that script as a “loader” in the User Startup Scripts folder.