[RESOLVED] Use Maya import plugin with MEL

Hi people,

I still have a large amount of Collada meshes to convert to “.egg” (cf. my posts on 3DsMax :slight_smile: ). I use Maya to import the meshes with ColladaMaya (Feeling Software plugin) and then export them with maya2egg. (I work on Maya 2008).

If I do these 2 steps manually, there is no problem, but I have more thant 200 meshes to convert and more coming. So I want to create a Python script which will take a directory and apply these steps to each mesh in this directory :

  1. import the Collada mesh in Maya using ColladaMaya plugin and MEL
  2. save the imported model in “.mb”
  3. call maya2egg on the result of the second step

I have no problem for the step 3, I don’t think the 2nd will be hard. But I don’t find how to do the first step.
I can use any MEL command from Python with the maya module but I don’t see how to use an importer plugin.

Does anybody have an idea of the way to do this ?

I found the way to open, save, rename files :
maya.mel.eval(“file -action_to_do full_path”)

There is an “import option” but when I try to import a collada file, it doesn’t recognise it.


For those who are interested, I had a response on the CGTalk forum. Yeah I tried on different forums because I was desperate, but now I’m good :slight_smile:
Thread’s here :

forums.cgsociety.org/showthread. … 9&t=605391

Strarup makes the MEL script for Maya and it works great. And thanks to this I understood all I needed and can complete my Python script.

Have a nice day