0

Need to call maya using a subprocess i.e.

subprocess.check_call([maya_bin] + sys.argv[1:], env=os.environ)

and environment variable being passed like above. Problem is

QT_PLUGIN_PATH env when queried inside maya at runtime shows nothing.

So how does one make all environment variables accessible within maya

Before calling maya ,

QT_PLUGIN_PATH = '/fb/NHI/fifth/qt/4.8.5_5.6.1/4.8.5/Linux/plugins:/fb/NHI/fifth/maestro/plugins:/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins'

After maya is initiated, its only,

QT_PLUGIN_PATH = '/fb/NHI/fifth/qt/4.8.5_5.6.1/4.8.5/Linux/plugins'

it should be

'/fb/NHI/fifth/qt/4.8.5_5.6.1/4.8.5/Linux/plugins:/fb/NHI/fifth/maestro/plugins:/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins'

How is it possible ?

nish
  • 1,008
  • 4
  • 17
  • 34
  • Could you try if it works like https://stackoverflow.com/questions/2231227/python-subprocess-popen-with-a-modified-environment Are you using shell? https://stackoverflow.com/questions/2231227/python-subprocess-popen-with-a-modified-environment#comment88233951_4453495 – Joe Jun 11 '20 at 05:51
  • https://stackoverflow.com/questions/11350669/subprocess-call-env-var – Joe Jun 11 '20 at 05:52
  • Could you try if it works to pass in some other variable like that? – Joe Jun 11 '20 at 05:53
  • I've tried this. Question is as Maya opens this variable value is reset. How to ensure that what is passed is what it shows – nish Jun 18 '20 at 02:30

0 Answers0