Open a new instance of Houdini with Python

   1094   0   0
User Avatar
Member
104 posts
Joined: Nov. 2007
Offline
Is there a way to open a new instance of Houdini with a different environment from within an existing Houdini instance using Python?

I am writing a tool to manage an ACES pipeline. I need to be able to switch between ACES and non-ACES projects. The only way to do this with Houdini it seems is to set/unset the OCIO enviroment variable for each instance of Houdini opened.

I would like to be able to do this from within Houdini: if a user selects a file on an ACES project, a new instance is spawned with the OCIO env varibable set. I'm trying to do this with subprocess.Popen but so far unsuccessfully. The resultant instance of Houdini crashes because it hasn't inherited the parent environment. This seems to be because it's using the hython environment rather than the virtualenv that initially started Houdini. Is there a way to spawn it using that original environment as if a user had clicked on the Houdini icon? To add to my problems all this is on Windows.

Any help/pointers on this would greatly appreciated!
  • Quick Links