How to manage tools part 1 – Scripts (featuring new 3dsMax 2022.3 pipeline integration)

How to manage tools part 1 – Scripts (featuring new 3dsMax 2022.3 pipeline integration) Техника

Startup scripts

As you see in the above document, 3dsMax reads the startup script from the various places. But, the most commonly used folders are these two folders.

  • system startup scripts folder – C:\Program Files\Autodesk\3ds Max 2022\scripts\Startup
  • user startup scripts folder – C:\Users\[username]\AppData\Local\Autodesk\3dsMax\2022 – 64bit\ENU\scripts\startup
FileIn @ "D:\PROJECT\_maxDefault\startup\"

By using this seed script, I can update the startup script centrally without re-depolying again to all workstations. this is one of two files I allow an exception personally.

So, how can we use this feature? There are 2 ways to set environment variables in Windows.

  • The first one is setting in System Properties or using a group policy. As you can already see, IT dept. would love this central management.
  • The second way is using a batch file or Python to set env var only for the session. If your studio is using a launcher, they are already using this way.

For startup script, we can use the first method since scripts are usually compatible between 3dsMax versions and you can put a condition if there are any version specific things in it.

How to manage tools part 1 – Scripts (featuring new 3dsMax 2022.3 pipeline integration)

After I added “ADSK_3DSMAX_STARTUPSCRIPTS_ADDON_DIR” env var, my 3dsMax runs any scripts in this folder. I don’t need to add anything to 3dsMax root folder. I don’t need to worry about re-coying again this file after wiping out ENU folder to solve my 3dsMax issues. I don’t even need to do anything for any future version of 3dsMax. It is truly set it and forget it!

Дополнительно:  Root setting android что это

Setting custom system directories with startup script

MacroScript blendedBoxMapMaker category:"SoulburnScripts" tooltip:"blendedBoxMapMaker" Icon:#("SoulburnScripts_blendedBoxMapMaker",1)
Include "$scripts/SoulburnScripts/scripts/"
on execute do blendedBoxMapMakerDefaults()
on Altexecute type do blendedBoxMapMakerUI()

As you can see, this action will try to find “/SoulburnScripts/scripts/” file under #scripts folder($scripts is a symbolic pathname for #scripts).

setdir #scripts @"D:\PROJECT\_maxDefault\scripts\"
setdir #userscripts @"D:\PROJECT\_maxDefault\scripts\"

TIP! As you can see from the 3dsMax system directories document, you can also set any project folders using “setdir” command. By default, they are set as a relative path to the current project folder. But, you can change those using “setdir“ command. For example, you can change autoback folder to “D:\3dsMax_Autoback” instead of in your Document folder.

setdir #autoback @"D:\3dsMax_Autoback"


How to manage tools part 1 – Scripts (featuring new 3dsMax 2022.3 pipeline integration)

If you are using 3dsMax without the pipeline integration, you have a few ways to do this.

  • Copy all .mcr files to #userMacros folder.
  • Just run all .mcr files with the “FileIn” function.
  • You can copy to the 3dsMax root folder. But, I wouldn’t recommend it.

Honestly none of the above options are good. This just shows how beneficial the new pipeline integration is.


This is the last piece of puzzle for 3rd party script management. Sometimes 3rd party scripts include icon files. We can use both startup script or env var for this. It doesn’t matter much. I choose to use “ADSK_3DSMAX_ICONS_ADDON_DIR”  env var.

How to manage tools part 1 – Scripts (featuring new 3dsMax 2022.3 pipeline integration)

Let’s put together all the pieces for Soulburn script

I have set 3 environment variables.

  • ADSK_3DSMAX_MACROS_ADDON_DIR = D:\PROJECT\_maxDefault\usermacros
  • ADSK_3DSMAX_ICONS_ADDON_DIR = D:\PROJECT\_maxDefault\usericons

I have set 2 system directories in a startup script in D:\PROJECT\_maxDefault\startup

  • setdir #scripts @”D:\PROJECT\_maxDefault\scripts\”
  • setdir #userscripts @”D:\PROJECT\_maxDefault\scripts\”

If you download the file, it has 3 folders.

Дополнительно:  Ноутбук Toshiba Satellite Windows 7/8/10 Устранение неполадок - Советы По Восстановлению Данных

How to manage tools part 1 – Scripts (featuring new 3dsMax 2022.3 pipeline integration)

  • Copy all files in “MacroScripts” folder to D:\PROJECT\_maxDefault\usermacros (ADSK_3DSMAX_MACROS_ADDON_DIR)
  • Copy “SoulburnScripts” folder in “scripts” folder to D:\PROJECT\_maxDefault\scripts\ (#scripts)
  • Copy all files in “\UI_ln\IconsDark” or “\UI_ln\Icons” folder to D:\PROJECT\_maxDefault\usericons (ADSK_3DSMAX_ICONS_ADDON_DIR).
    You can’t use “Icons” or “IconsDark” folder in #usericons folder. .bmp icons are only supported for backward compatibility since 3dsMax 2017. If you want to have a different set of icons per theme, you need to use the new .png icon naming convention and “iconname:” argument. The details are here.

Now I have the Soulburn script in my 3dsMax 2021, 2022 and will have them in the whatever future version of 3dsMax without any more steps. I can nuke the ENU folder anytime without worrying about re-installing these scripts.

This also works with any 3rd party scripts.

  • If they are .mcr files, put in the ADSK_3DSMAX_MACROS_ADDON_DIR folder.
  • If they are .ms files, put in the #scripts folder.
  • If they have icons, put in the ADSK_3DSMAX_ICONS_ADDON_DIR folder.

To help your understanding, I’ll give one more example, another famous script, DebrisMaker2.

In this case, the downloaded file is .mzp file. This is a self-installation zip file. You can actually unzip with any zip uncompressor such as 7-zip.

If you unzip, it has 3 folders under “DebrisMaker2.0” folder. Guess where would you need to copy the files?

  • MacroScripts -> D:\PROJECT\_maxDefault\usermacros
  • Scripts -> D:\PROJECT\_maxDefault\scripts\
  • UI_ln\Icons -> D:\PROJECT\_maxDefault\usericons

Again, now you will have DebrisMaker2 in any 3dsMax 2021 and above!

Before I finish this post. Someone might wonders why I said “3dsMax 2021 and above”. Isn’t it a new feature of 3dsMax 2022.3? Yes, right. It is officially added to 3dsMax 2022.3 with more complete support. But, 3dsMax 2021.3 actually have had some env var support for Autodesk internal use. At least, the 3 env var we have utilized work for 2021.3, too. I let you know because setting env var as system env var will affect 2021.3. I don’t want you to be confused or surprised.

Дополнительно:  Ubuntu Easy (And Quick) Ways To Open Any Files As Root

If you want to use the pipeline integration for only certain version of 3dsMax, you have to use batch file of Python script which I will cover in the next post.

Оцените статью
Master Hi-technology
Добавить комментарий