Karel Kiers

karelkiers

About Me

専門知識
Generalist
INDUSTRY
VR

Connect

LOCATION
Netherlands
ウェブサイト

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Open Maya in Houdini using Python 2023年4月24日6:39

For some reason it stopped working. And I couldn't get it back to work. I did upgrade to Maya 2024.01, but i doubts that that is the problem. I tried all you tips and some more, but still no luck. So I abandoned the Maya part in the script and only use the Blender part, what doesn't give me any headaches.

Still thank you for your time. And have a great day!

Open Maya in Houdini using Python 2023年4月20日5:05

Thank you mate,

The code below worked! It probably can be written better, but I'm happy it worked!

import subprocess, os

# set the necessary environment variables for Maya
os.environ = "C:/Program Files/Autodesk/Maya2024/"


# set the maya executable + file to open
cmd = "maya.exe -file c:/temp/temp_mb_scene.mb"

# open maya
subprocess.Popen(cmd, env=os.environ)

Open Maya in Houdini using Python 2023年4月19日7:41

Hello smarter people!

To start, I'm not the best python scripter out there, so I'm a bit stuck with a problem.

import subprocess

cmd = "maya.exe -file c:/temp/temp_mb_scene.mb"

subprocess.Popen(cmd)


If I run the code above in "VS Code" or "Windows PowerShell" it works fine. It opens Maya and the Maya scene. But if I try to run the code above in Houdini, Maya starts, but crashes right away. Maya also crashes if I leave out the Maya scene file. Does anyone have a clue how to solve this? Or how to open Maya in Houdini with Python?