Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Loading a MEL (https://simplymaya.com/forum/showthread.php?t=4426)

doodle 07-03-2003 03:35 AM

Loading a MEL
 
I just downloaded GI Joe MEL script and i need to know how to load it?

:)

ragecgi 07-03-2003 05:18 AM

Check http://www.pixho.com for full installation, and usage documentation:)

doodle 07-03-2003 03:03 PM

I doing exaclly what is being asked but i'm getting problems.

On this part:
- Start a Maya session, and open the script editor, then type source GI_Joe. Press [enter]
Retype GI_Joe and press [enter] to execute the script.
You can then drag the GI_Joe into your shelf and select the GIJoe_icon as shelf icon.


I'm doing the part "type source GI_Joe but i get this message:

source GI_Joe;
// Error: source GI_Joe; //
// Error: Cannot find file "GI_Joe" for source statement. //


Am i doing somthing wrong? :)

dannyngan 07-03-2003 09:01 PM

You need to put GI_Joe into your user scripts dirctory, typically My Documents\maya\4.5\scripts.

ragecgi 07-03-2003 09:57 PM

Sorry, thanks Danny:)

doodle 08-03-2003 01:05 AM

Thank, that worked, but when i get the GI_Joe Preload box up i click 'Go create' and i get the message: Error: File not found.: C: Documents and SettingschrismayascriptsGIJoe.lights

Why is maya taking out the backslashes?

:)

Volker 19-03-2003 08:50 AM

Why is maya taking out the backslashes?


try to invert them to slashes ?

kbrown 19-03-2003 12:05 PM

A single backslash "\" in mel (and in many other programming languases) is considered as an escape character. It has a special meaning. Here are some examples

\n - means carriage return
\t - means tab

you can also use it to print special characters. an example:
Code:

print ("Maya says "hi" to all");

// Output:
// Error: Syntax error //

So how do you print quotation marks? Simple:
Code:

print ("Maya says \"hi\" to all");
Notice the backslashes before the " chars inside the string to be printed. So if the backslash plus the next character isn't a recognized "escape pattern", maya simply prints the next character as is.

This is why:
Code:

print ("C:\documents and Settings\chris\mayascripts\GIJoe.lights");

// Outputs as:
// C:documents and SettingschrismayascriptsGIJoe.lights

So to print the path with backslashes you would write:

Code:

print ("C:\\Documents and Settings\\chris\\mayascripts\\GIJoe.lights");

// Output:
// C:\Documents and Settings\chris\mayascripts\GIJoe.lights

Try what this does in the script editor:
Code:

print ("\nIt is a good habbit to start a line with a \"\\n\" because\nthe previous line didn't necessarily end with one.\n\n This line starts here with a space.\n\t\"This line is in quotation marks and starts with a tab.\"");
:beer:

kbrown 19-03-2003 12:07 PM

I used the print command as an example but the same applies to all string handling in maya...

BillyZ 21-03-2003 03:33 PM

GI_Joe Mel Script
 
Hi there,

I'm attempting to install the GI_Joe MEL on my system, I'm running Maya 4.5 & XP. I followed the instructions given, but when I execute it I get this message:

source GI_Joe
GI_Joe;
// Error: GI_Joe; //
// Error: Syntax error //

Any help would be useful, thanx.

ragecgi 21-03-2003 06:07 PM

Your syntax is slightly wrong, you just simply forgot to close your first command with a semicolon like this:

source GI_Joe;
GI_Joe;

That should work, as I just tried it:)

Good luck!

BillyZ 21-03-2003 06:54 PM

Much appreciated, it worked!
Now if only if they typed it out like that in the documentation.

doodle 05-04-2003 10:50 PM

1 Attachment(s)
I tried KBrowns suggestion and it still didn't work (see image)

Even if this does work, do i have to re-edit the command everytime it's executed?, surely you guys dont have to do this everytime.

Why cant i just simply click Go create and not do all this other stuff??

Help Appriciated :)

cammm2 08-04-2003 10:30 AM

GI Joe is a good script. In fact it is a very good solution to fake GI.
but.... shouldnt you guys be using Mental Ray anyway now ??

caligraphics 08-04-2003 11:44 AM

Well, one reason why people are using GI Joe is that it gives a decent result in lots less time than rendering with MR..


All times are GMT. The time now is 09:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018