Jump to content

houdini's python messes up other variables. :-( anyone know how to


Dee

Recommended Posts

I'm trying to make a node that will go into Maya, load geometry, export that geometry in Alembic, then load the alembic data. If I don't use a node, I can do it. I have everything working well as long as I don't load Houdini. But, I want the user to not need to load Maya. This is to avoid it. There are a number of custom python scripts that load with our Maya version. For some reason, when I run something through csh from within Houdini, Maya doesn't work right. The python modules load differently with a different version of python. Is there any way I can force Houdini to spawn a process like konsole or csh without having it inherit anything from the Houdini environment? I tried running it through os.system() and hou.hscript() both with no luck. Does anyone know how to do this?

Link to comment
Share on other sites

You can try removing environment variables when spawning Maya that give you problems. From the Python docs, you can use subprocess.Popen() to give it some custom environment that is different from os.environ.

subprocess.Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"})

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...