Karel Kiers

karelkiers

About Me

EXPERTISE
Generalist
INDUSTRY
VR

Connect

LOCATION
Netherlands
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Open Maya in Houdini using Python April 24, 2023, 6:39 a.m.

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 April 20, 2023, 5:05 a.m.

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 April 19, 2023, 7:41 a.m.

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?