Maya mesh exporter, PyMEL good solution?

Hello fellow techies!

I’ve got an intership here at Sweden and I’ve got used to the pipeline here.

Now I know there are alot of problems with it and I want to tackle it slowly but steady. Right now alot of stuff is handled through external programs and even xml editing which takes ALOT of time so our artists sometimes can’t be bothered to test their stuff in the editor.
I want to make tools inside maya that automates the entire process and handles all the stuff the external softwares does inside maya, but I want to start small with an exporter first.
Besides artists has to use the 3DSMax exporter because the maya exporter only works on 2009 so it’s about time for an 2011 exporter.

(Ideally I would make an importer for the engine that looks inside the Maya source files and picks the information it needs through semantics and custom nodes so the artists never has to export but just drop the maya files in the SVN folder, but I want to start small so an exporter for maya is good for now!)

So my goal is to ouput the mesh vertices and yada yada in binary and also output other information in XML format to different files.

So I wonder if PyMEL would be sufficent for this task or is my only hope C++ API? So a .model file should contain the vertices, indices, normals, tangents, binormals, vertex color sets and stuff while .object file contains information about what collision mesh to use or what effects to use in XML nodes.

Since I have no experience with pipeline related stuff I am asking this to you guys, is PyMEL fast enough for such an operation (writing binary and XML)?
I’ m new to PyMEL aswell but I’m learning quite fast since I already knew MEL very well, Seth is helping me through mails when I need to know something! <3 :slight_smile:

Best regards techies!

What’s wrong with using the exporter from Maya 2009? You said that it only works with 2009 which implies (to may at least) that it is a compiled plug-in. Why not recompile it for use in 2011? If the plug-in does everything it needs to do already, there isn’t really a need to re-write it.

It doesn’t do everything the 3dsmax exporter does =/ artists has to go into 3dsmax to export special stuff such as blinking spinning red blue police light. Maya exporter only exports meshes and materials, and I rather write my own code instead of dwelving into someone elses 2 years old code that was done as a “last resort” thingie. I’ve heard the source code for it is very ugly, while the 3dsmax exporter is solid since it has probably been developed for several years, 5+ atleast.

Besides I want to revamp the pipeline overtime so all the xml editing and external editors are fully available through maya UI and nodes.

Question still remains :stuck_out_tongue_winking_eye:

One of PyMEL’s few drawbacks is performance during heavy vertex iteration. You might not want to commit for this project.

API has always been the preferred method for mesh iteration and exporting, I think.

Or maybe use MRV? (Python implementation of Maya API). Welcome to the MRV Developer Preview ! — mrv v1.0.2-develop documentation

Yeah I actually did decide to clean the c++ code and start adding ALL the missing features that the max exporter has, since PyMel kind of creates an object per vertex every loop it’s really slow. So I’ll stick with c++ for the export but for all the XML files I’ll use PyMel. The Document class from xml.dom.minidom works awesome for that and I’m already getting awesome results :slight_smile:

But I’m kinda not sure how I’m supposed to do one thing. It’s about UI.
I need to have a tree view with elements inside (with an icon next to it), and I need to be able to drag and drop from that tree view INTO another tree view as a top level or child.
I looked through the TreeView that ships with PyMEL and it looked like it wasn’t really possible =/

Do I need to submit myself to PyQT for that?