3dsmax: Using a different plugin.ini from the command line doesn’t seem to work

3dsmax has a command line parameter –p, that allows you to specify a different plugin.ini file from the default one. The documentation for the command line parameters is here.

However, in practice this is tricky to use. For instance if you pass in a full path to a ini file, like this, it doesn’t work:

3dsmax –p “C:3dsmaxfooother.ini”

I researched this problem back in October, and it found a solution. Unfortunately the fix was postponed for the 3dsmax 2012 release, as it was a legacy issue. However here is what I found:

Short Answer:

Max assumes the alternate path contains JUST the filename, not the full path to the alternate INI file. Also that it assumes the alternate INI file is in the root folder of 3dsmax.

Detailed Answer:

If I pass the following command line to max:

-p "C:Program filesautodesk3dsmaxAlt_Plugin.UserSettings_alt.ini"

Max will store it, and move on.

Later in the Constructor for App (app.cpp), the GetUserPluginSettingFilePath() method is called. Now this method concatenates the root folder of max (i.e. getDir(APP_MAXDATA_DIR) ), with the ‘user plugin filename’ that has already been set.  So normally you get a concatenation of:

“C:Program filesautodesk3dsmax”

And

“Plugin.usersettings.ini”

For a result of

“C:Program filesautodesk3dsmaxPlugin.usersettings.ini”

But when you specify via the command line –p and a full path of the file, it concatenates the root folder with the user specified filename. With the result being a mangled name like this:

“C:Program filesautodesk3dsmax” + “C:Program filesautodesk3dsmaxPlugin.usersettings_Alt.ini” 

The result:

“C:Program filesautodesk3dsmax”C:Program filesautodesk3dsmaxPlugin.usersettings_Alt”

The system then checks to see if that file exists, which it obviously does not. It then has checks in place for when it does not exist, and then moves on, ignoring the user specified file.

Hence why users complain that the command line parameter doesn’t work.

7 thoughts on “3dsmax: Using a different plugin.ini from the command line doesn’t seem to work

  1. Mark

    Hey Chris,

    I’m wondering if this is actually fixed in 2012? I have been trying to port a launcher that we use for Maya (to launch multiple version and/or plugins elegantly) to 3ds Max and if this hasn’t been fixed it will be most annoying.

    Cheers,
    Mark

    Like

  2. Mark

    Question. Why? I wouldn’t believe it would be that hard. Detect whether it has drive letter in the name and don’t concatenate with program location, otherwise do, like it used to do. Otherwise just put an extra argument… Also, the documentation should definitely be updated as it specifically says “The otherfile.ini string should include the full path name.”. Would you happen to know where the best place to log a bug (it’s a bug as the documentation says something other than what it does)?

    Like

  3. Tristan

    Hi there. I know this is an old post however I’m wondering if you could help as I can’t seem to get Max 2012 to recognise an alternative plugin.ini no matter what I use on the command line. I’ve tried without the full path, with the full path and it makes no difference. Is there a work around that actually works to make it use an alternative plugin.ini? Or is it only fixed in 2013? Any help on this matter would be greatly appreciated! Thanks!

    Like

  4. Chris Johnson

    You have to supply just the filename, to the command line parameter. And the file has to exist in the root folder of max. Also, if it doesn’t work there is no work around for max 2012.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s