View Full Version : Executing MEL from HTML Document

06 June 2005, 07:28 PM
I was playing around with the Maya Web Browser and MEL.... I got that mel:// followed by the code is how it works. I only know a little bit about MEL as of yet, but I can't seem to string together the code to do anything interesting. Creating objects with different attributes and such. I was trying to get it to create something and then keyframe it translating a bit or something. Is this mainly used to execute scripts that reside on the computer of the user.... and the mel in the HTML document calls up and executes that script file? I have searched the forums and google and have not found much information if any at all. Not much in the help docs and nothing on except to say you can do it.

Thanks in advance

06 June 2005, 08:05 PM
Hi m8,
You can do anything with mel, ever write Tetris. If you want to learn it, take a peak at my vids. (intro to UI making with MEL explains the language)

The mel:// in the html sense can fire off anything you want, you could make it create an object, 1000 objects, run a procedure to populate something etc, I think its "kinda" geared towards button presses tho.

EDIT: if you want me to post some mel info, or html mel info, i'd be happy to

06 June 2005, 08:21 PM
Yes I am very interested in an example of mel code delivered through an HTML document.

If it is not to much trouble maybe you could fire off an HTML doc that has a text link that creates an object (like maybe a primitive) with specific attributes, key frames translation (or anything) over 60 frames(or any number). Can you have one link do all of that without the user downloading anything extra? How complicated could it get with one click? Infinite?

I tried some things out.... but ran into problems.
mel://some.code -does -something;/ works
mel://some.code -does -something; some.other.code -atts;/ sometimes works
mel://some.code -does -something; some.other.code -atts "name.Place";/ does not work
mel://some.code -does -something; some.other.code -atts &qout name.Place &qout;/ sometimes works, i must do something wrong.... also doesnt work well with many different things in qoutes.

I will check out your mel videos, and thanks for sharing them with the community.

06 June 2005, 08:50 PM
i just did a test on a MEL UI i have written, and it appears that as long as you stick your code between the <a href </a>:

EDIT: i must have learning difficulties, cause that made no sense what so ever. Last edit, it doesn't quite do what you want, but i added a little bit, and the challange is to finish it ;)

Load this file up in the web browser, abuse white space ;) (rename it .html)

06 June 2005, 10:09 PM
Which version of Maya are you using?

06 June 2005, 01:34 PM
I am using maya 6.5, if you are asking me.

06 June 2005, 01:38 PM
I got about as far as you did with my mel browser script. I acutally managed to keyframe something, but it didnt key frame it the way i expected. When I ran yours it moved the object and the current time playhead but it did not leave any key frames. I would like to see a UI script or some custom windows being loaded up this way as well. I will keep trying, anyone who has info/tips/tutorials/books/any info please share.

06 June 2005, 01:54 PM
I am using maya 6.5, if you are asking me.
I was asking because things changed a bit in Maya 6.5. In Maya 6.5 a plugin was added to let you execute MEL through you are not only limited to executing it through mel://...

06 June 2005, 02:27 PM
i thought about making a video on UI creation usng html/java.flash etc, i'm still on good old 6.0, but it should be ok.

I didn't make it keyframe anything, I was hoping you would dive in and finish it off by way of a mini challange.

Just have a good look round the commands list, and a poke through at some bits, then decide to make something, doesn't matter what really, but break it down into stages.

CGTalk Moderation
06 June 2005, 02:27 PM
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.