View Full Version : The tedious task of converting mel to python...
trancor 09-07-2007, 05:01 PM I had heard that Maya 2009 is going to be pure python when it comes out ... don't know if it's true. If someone could correct that statement if it's wrong would be helpful for me.
But I've come down to the tedious task of converting my maya.cmds to cmds in python. Was hopeing there was some sort of fread mel/python script that will look at mel commands and convert them to python, printing or resaving the converted mel script out as a py file.
I mean, I would know how to write it, but that is alot of options are variations in code that can arrise when changing mel over to python, so I'm hoping someone else did a converter already.
I've checked highend, haven't seen anything yet.
|
|
mhovland
09-07-2007, 05:13 PM
Where did you hear that Maya 2009 will be dropping MEL?
Is this from Autodesk, or a rumor?
trancor
09-07-2007, 05:23 PM
My scripting teacher told me that. He is also the one that deals with autodesk directly for purchasing the software in my department. I mean he was at siggraph and a bunch of people who've worked on maya and what not work at my school. So I don't know if it's just a rumor or if there is actually any truth behind it.
mhovland
09-07-2007, 05:28 PM
I haven't heard anything about it.
I will try digging on the web for info.
goleafsgo
09-07-2007, 05:51 PM
I think your scripting teacher heard wrong.
trancor
09-07-2007, 05:53 PM
Well I don't know, I know the guy doesn't know his scripting too well.... but anyway, I still would like to find some sort of mel to python converter.
(seeing your from autodesk)
mhovland
09-07-2007, 06:05 PM
I think your scripting teacher heard wrong.
Thanks for the clarification.
djtomservo
09-07-2007, 06:43 PM
officially supported/implemented dotNET support in 2k9 would be cool though. . .
Sphere♥
09-07-2007, 08:09 PM
officially supported/implemented dotNET support in 2k9 would be cool though. . .Mmmmm.... IntelliSense code completion...<homer drooling sound>.
Problem is they are multi-platform.
GiantG
09-07-2007, 08:38 PM
About mel 2 python converter...
have you tried this?
http://www.highend3d.com/maya/downloads/tools/syntax_scripting/Pymel-4844.html
Sphere♥
09-07-2007, 08:51 PM
About mel 2 python converter...
have you tried this?
http://www.highend3d.com/maya/downloads/tools/syntax_scripting/Pymel-4844.html
Chad posted about his Pymel (http://forums.cgsociety.org/showthread.php?f=89&t=525100), it's nice stuff.
I personally have never seen good results from code converters, most I've seen have produced clunky source that was barely human readable. I'm not sure why you want to convert everything, most of Maya itself is still running on MEL.
Soulcialism
09-07-2007, 09:28 PM
i could only imagine that code conversion to python would be even more annoying considering its dependency on tabbing for scope >_<
trancor
09-08-2007, 06:25 PM
Well, it's kinda just that python has alot more options for how to code. I run into things in mel all the time that I try to write and mel just can't do it, on the file handeling side, on the actions to take in mel. Python is a real programming language vs mel's scripting language.
But this pymel thing looks like I'd be relying on it for commands and working with the code. Not completely what I want. But I'm not done looking into it. So I'll test it out, but I don't know if it's what I want.
I guess it wouldn't be too hard to write something in python or mel to convert the code for me...all it'll be is commands to look at the text .. take a little while but it's feasible.
Thanks guys
thematt
09-08-2007, 10:43 PM
woo..dropping mel man that would be crazy!! rewriting the entire pipeline..can't even imagine, and my pipline is extremely small compare to other.imagine reprograming all maya in python.
As you know maya is entirely in mel, so it would mean reprogramming the all software talk about a waste of time baby.I think i would simply not upgrade as most company would do, it would be simply too tedious to do.
Though I'd love to learn phyton but just can't find time.
trancor
09-09-2007, 12:45 AM
Yeah it would be, its the fact that big production houses in NYC (I'm in nyc so I know more about nyc than other cities around the world) but blue sky, big ass production house, is still using maya 7 because of the ammount of mel scripts they use and the fact that they changed thing ins 8 and 8.5 in mel. Like I noticed you can't call up the variableis in a vector in another vector or else you get syntax stuff, so you need to do all the math in their own variables, which messed up plenty of my scripts from 7 into 8 and 8.5 ...
Other companies do this too, I think dreamworks is still using like maya 7 as well, like the last shrek movie was 7, and I don't know if they had time to upgrade between now and the next movies.
Anyway, I think it would be stupid if autodesk did do away with mel, though mel is slow, I think it's better than hardcoding your own commands.
CGTalk Moderation
09-09-2007, 12:45 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.