What IDE do you use for MEL development?


Hi Farsheed,

It’s great to know you’re pushing mapy forward :slight_smile:

I think it’s a perfectly reasonable change, except for that the last variable might specify the selection length instead. At least that’s the data available to me from PsPad. I would assume it is available through Crimson Editor, SciTE and other popular editors (it’s for sure available in monsters like vim or emacs).

I don’t see any easier way of specifying the part of the script file to execute, given you are calling an external command with specific parameters. I did not succeed in parsing text that contains
character from the editor to even the simplest batch script. The command line interpreter cuts the argument stream as soon as it encounters that character.

So yep, passing 2 optional numbers that specify start and end (or length) of the selection sounds like the simple and effective way to solve the problem.

In wost case (for an editor that does not provide this info) I think that this problem could be solved using some scripting for the specific editor. For isntance by writing a script that would read the selection, write it to the file and call mapy with that file as an argument, then delete the file (optionally).

Let me know your thoughts.
Looking forward to the new version :slight_smile:


I love simplicity, so I want mapy to work as simple as possible. Accually This is the last step for mapy. I am an animator so I want to think more artistic than technical. my decision about next version is this:

mapy <path to file>
mapy -m 1 <line number> <length> <path to file>
mapy -m 2 <start line> <end line> <path to file>

plus some improvements in stability of mapy 1.1.6

What do you think?


Sounds like you can’t go wrong that way :slight_smile:
Do you think it would be possible to provide the index of the starting character in the file and an end index respectively and not just first and last line? That is to truly support the “execute selected code” feature.

Anyways you’re doing a good job and your work is really appreciated by us technical guys :slight_smile:


I want to inform you about the latest changes I made in mapy. Now you can write mel+python in ONE script. See the example:

  def testDef(sel):
  	a = input()
  	b = a * ( sel + '.ty')
  	return b
  string $sel[] = `ls -sl';
  string $mysel = $sel[1];
  print testDef($mysel)
    What do you think?


I can’t really tell since I’m not using python for Maya yet. (Still supporting earlier versions of Maya). But it looks handy for cases when you’d need to “mix” python and mel code, even though I’m not sure I’d like to keep them in the same file :slight_smile:


Ok guys, Mapy v1.1.6 is out. Some bugs fixed and there are more cleaner maya output.
Also new command line options are supported:

   mapy  "path to your file"
   mapy "start line" "end line" "path to your file"

HavE FuN.


Now with a cleaner command line output and catching all the output it’s a very useful tool. I couldn’t find a variable corresponding to the “endLine” of selection in PSPad so I wrote a java script that invokes mapy on selected text for PSPad. Let me know if anybody needs it.

I will be using mapy from now, thanks for the great contribution!

List of little glitches:


// Should print "AB" because no 
 character is used.
// Instead prints:
// A
// B

ls -sl
// Should print the names of selected objects with spaces, say pCube1 pCube2
// Instead prints:
// pCube1pCube2

string $sel[] = `ls -sl`;
// Should print the names of selected objects pCube1 pCube2
// Instead prints:
//					  (Nothing :-) )

Thanks again, I will update you with the list of weird things I will find :slight_smile:



I’ll appreciate it.


Some of the bugs that you mentioned have been fixed now. Check it out.:thumbsup:


That was quick :slight_smile: Now with the “string $sel[] = ls -sl;” example it looks like it’s adding “tabs” between the “pCube1” and “pCube2” strings. This looks fine though, don’t know if it could be called a “bug” rather than a feature :slight_smile:

But something else behaves weird now and this example worked earlier:

 	int $i = 0;
 	for ($i = 0; $i < 10; $i++){
 		print ("Counter is now: " + $i + "
 // Returns:
 Error : 
 Error : Line 2.0: Syntax error
 Error : 
 Error : Line 2.0: Syntax error
 Counter is now: 0
 Error : };
 Error : Line 1.1: Syntax error
 Error : };
 Error : Line 1.1: Syntax error

And this code works perfectly well when copied to Maya.

Thanks for the support :slight_smile:


Sorry a little mistake in code. This problem is solved now and mapy 1.1.8 is ready to download.

Henry: please give me a quick response if your problem is solved.
You do a great job for me last few days and I will mention your efforts in my site.


Sorry, I’ve missed your response. Been refreshing the previous page while your reply overflowed to the next one :slight_smile:

That error seems to be fixed now. And everything seems to be working great (except those small issues that could well stay unfixed).

Only thing now is that it takes a long time to send big scripts to Maya. It literally hangs for seconds before the output returns.
I am pretty sure it is due the printout of the sent text on top of mapy’s output (new in 1.1.8). I’ve compared it with mapy 1.1.6 and it was just fine.
I would vote to remove that output on top because when you send a big script you end up having a mess there that would not be very helpful (and slow the send process). When sending parts of the file the user sees his selection in the editor anyways.

mapy is already a very neat little tool that is really easy to integrate into any popular editor. I suggest every MEL/Python Maya developer giving it a shot :slight_smile:



Well, Sorry for that long output, I fixed it and it is ready to download in 1.1.9.:deal:
And about the long response time: mapy set the sleep time base on size of your script(not a good idea but better than nothing):sad:. I will solve this in 1.2.0
Please chack my site every day because I will release 2 versions each day!
But don’t warry. 1.2.1 will the final version:applause:(At least in January).
Some one send me a tutorial on how to set mapy up with notepad++. Could you please send me a brief and step by step tutorial on how to setup mapy with pspad?:love:
I’ll put them on my website.
Thanks in advance.


Thanks for the quick fix. Looking forward to the next versions, I think there should be a better solution instead of a “sleep” one.

I will put up a little tutorial (maybe record a video?) on how to setup mapy with PSPad this weekend :slight_smile:


1.2.0 is great :slight_smile: Really nothing to complain about, the sending process seems to be much faster and works fine with big scripts now. No glitches so far.

Thanks a lot!


Thanks henry for your quick test but I should confess that there are little bugs that remain in mapy 1.2.0. I will try to fix them in 1.2.1, but please test and test and test until find a problem and send it to me.
One of that problem is this line of code:

 print "//my name is farsheed";

Indeed, there is no bug, until someone finds it:rolleyes:.


Well, finally I completed this release. :bounce:Major changes have been made.
the best part is when you select any part of your script in any script editor, only that part will be executed. This process is completly automatic. Just like maya’s native script editor. So all of command line options have been removed. I hope afetr fixing little bugs (That you will inform me), I can release mapy 1.3 That will be first stable version.
I’m waiting for your fast and detail reviews.

[li]Mail me bugs and reviews Here: rodmena.com@gmail.com[/li][li]Download latest version of mapy here.[/li][/ul]

This is so brave ask, But could someone compares “Mel studio pro” and “Mapy”
and send me the results. (I know mapy is it’s first steps). Since mapy is free tool, I really need the feedback from all users.

Important note: 

[li]You should add mapy installation path to your path environment variable.[/li][/ul]HaVE FNn.


The fact that mapy is using the selected text in the editor automagically is great. The example in your previous post still doesn’t work, so I’m assuming this bug is due to version 1.3 :slight_smile:

Also it seems like it’s taking more time to send Mel to Maya in 1.2.1 now, about 1 second lag. I don’t remember this being the case with 1.2.0. Can this be due to the “automatic” selection check in the opened editor?

Otherwise there’s really nothing to complain about, the automatic selected text transfer is a killer :slight_smile:


Well guys, version 1.3.0 of mapy with faster speed and better code sending is out.
Download it and send me bugs and ideas at: CEO@rodmena.com
All known bugs are fixed in this version.

Download Latest version of mapy here.
[left]HaVE FUn.


Tried Mapy with SourceEdit, and just adopted the instructions from Crimson and it works fine (after the command line add " $(FullName)" without the quotes). Works for executing the file anyway after save.

Yay! Since Digimation doesn’t have a MelStudio LE for 8.5+, I had to find some way to be able to deal with scripts, and Source Edit is my other favorite IDE (it’s free and you can have a lot of scripts open in it).

Madd props, Farsheed!

Edit: what I do miss from MelStudio LE is the ability to highlight and pass that to Maya. Supposedly there’s a way to do it with Mapy, but I don’t see how in SourceEdit without copying/pasting a new script. I also couldn’t get the Python script to work in 8.5. Then again, since SE isn’t one of the prime TE’s that were tested, I’m amazed it works at all :wink: