Notifications
Clear all

[Closed] setIniSetting “plugin.ini” problem Any one seen this?

 PEN

I have an interesting problem. If I set paths to the plugin.ini using setINIsettings and then add one manualy via Max the one added with script us lost. Some of the more interesting things are any scripts that have been stored in the path provided by setINISettings work and the scripts load. The added entry doesnt’ show up in the Max Configure System Paths dialog how ever. The path is in the file as I can open it and see the new path. Once a new path is added manualy all paths that were added via script are lost and only the ones added manualy are kept. Has any one else seen this?

Here is some code to test. You can also see that I’m using useUserProfiles=0.

InstallSettingsIni=(getDir #maxRoot)+"InstallSettings.ini"
plugInIni=(getDir #maxRoot)+"plugin.ini"

if doesFileExist InstallSettingsIni then
(
	setINISetting InstallSettingsIni "Least User Privilege" "useUserProfiles" "0"
)
if doesFileExist plugInIni then
(
	setINISetting plugInIni "Directories" "Plugins" "C:\\Clients\\keyFrame\\scripts\\plugins"
)
--edit InstallSettingsIni
--edit plugInIni
6 Replies
 JHN

Hi Paul,

I don’t know if it’s related but since max9 PB1 I cannot seems to get the plugins path working anymore… Every time I add maxdir\plugins as plugin path it won’t stick and on a restart the plugin path is gone. We now add plugins to stdplugins… I don’t have any time delving into it further… since we’re not a big shop it’s not a big problem, but I did find it weird!

Hope this info is of some use.

-Johan

Hi Paul,
scratch that, I WILL learn to pay more attention when reading other people’s posts!

LOL

Cheers,

Josh. (thinking…)

 PEN

Looks like it is a bug and it has been reported. At this point there really isn’t a solution to it.

My hacky fix. Make the .ini manually…the “extra” ones are part of a
[Directories] ini section… my config.ini looks like this


[Directories]
Focus360 additional plug-ins=D:\3dsmax9\plugins\Scripted Global Functions
Afterworks Common=D:\3dsmax9\Plugins\Afterworks\Common
Blur additional plug-ins=D:\3dsmax9\plugins\Blur
V-Ray main plug-ins=D:\3dsmax9\plugins
V-Ray additional plug-ins=D:\3dsmax9\plugins\vrayplugins
Dreamscape 2.5=D:\3dsmax9\Plugins\Afterworks\Dreamscape
Texture Layers 2=D:\3dsmax9\Plugins\Texture Layers 2
[Help]
mental ray 3.5 Reference=d:\3dsMax9\help\mr_reference.chm

Check to see if the extra paths are there… if not file copy the complete plugin.ini down from the server, warn the users that max is about to restart… launch a new max… quit no prompt…

That next start you have all your plugs and stuff working…

Great bug… I really enjoyed this one…

 PEN

I’m just forcing them back in again as well each time Max starts. Once I have time I’m just going to force the entries using Python before Max starts. I will replace the the shorts cuts to Max with ones to python that make any changes that I need then launch Max.

 JHN

Hi Paul,

I really want to start using python as well, but find it hard to, well, start… do you have any pointers or examples or stuff/links that got you started… which python etc… especially when working with max…

Thanx!
-Johan