Adding to "PYTHONPATH" Environment Variable in ApplicationPlugins

Adding to "PYTHONPATH" Environment Variable in ApplicationPlugins

WobiNich
Enthusiast Enthusiast
102 Views
0 Replies
Message 1 of 1

Adding to "PYTHONPATH" Environment Variable in ApplicationPlugins

WobiNich
Enthusiast
Enthusiast

Hi there,

I am developing Application Plugins and I am having a hard time to add to the PYTHONPATH Environment variable in multiple Plugins.
I can add to the path like this:

 

<EnvironmentVariable Name="PYTHONPATH" Type="PATH" Value="\+;./python modules" />
 
as stated in the Documentation.
 
However, when trying to do this in MORE THAN ONE plugin 3ds Max is giving an error message on startup saying:
 
Duplicate definition for EnvironmentVariable "PYTHONPATH" in package "D:\3dsmax_lib\ApplicationPlugins\PythonUISample\PackageContents.xml" ({bd2cb0e5-fd26-4354-aabf-92f8337f5d71}).
 
But the documentation says:
 
"An environment variable can only be defined once, but can be appended or prepended multiple times. Two plug-ins cannot define the same environment variable, but they can append to an already defined environment variable."
 
So, how can I get this to work on multiple plugins. So, for every plugin I can add to the PYTHONPATH?
 
Thank you and regards Ben.
0 Likes
103 Views
0 Replies
Replies (0)