Ajinkya Meshram
Ajinkya Meshram

Reputation: 21

how to give commands to the running instance of maya with mayapy.exe?

I want to create a simple python script which will directly transfer objects from blender to Maya. I created a python script which exports the object from blender to a temp folder. now I want to import that object into Maya without actually going to Maya>file>import. I searched for the solution for a while and found out that I can create a standalone instance of Maya with mayapy.exe and work in non-GUI instance of Maya. but what I want to do is import the object into an already running instance of Maya(GUI version) as soon as the exporting script is done running.

Upvotes: 1

Views: 337

Answers (1)

Ajinkya Meshram
Ajinkya Meshram

Reputation: 21

as suggested by Andrea, I opened the commandPort of maya and connected to it using socket in python script. now i can send commands to maya using that python script as long as the maya commandPort is open.

Upvotes: 0

Related Questions