Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 07-03-2003 , 03:35 AM
doodle's Avatar
Registered User
Join Date: Nov 2002
Location: London
Posts: 1,292

Loading a MEL

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

user added image

# 2 07-03-2003 , 05:18 AM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 3 07-03-2003 , 03:03 PM
doodle's Avatar
Registered User
Join Date: Nov 2002
Location: London
Posts: 1,292
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? user added image


Yeah, but no but yeah but no....
# 4 07-03-2003 , 09:01 PM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
You need to put GI_Joe into your user scripts dirctory, typically My Documents\maya\4.5\scripts.


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
# 5 07-03-2003 , 09:57 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Sorry, thanks Dannyuser added image


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 6 08-03-2003 , 01:05 AM
doodle's Avatar
Registered User
Join Date: Nov 2002
Location: London
Posts: 1,292
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?

user added image


Yeah, but no but yeah but no....

Last edited by doodle; 08-03-2003 at 01:13 AM.
# 7 19-03-2003 , 08:50 AM
Registered User
Join Date: Mar 2003
Location: Hamburg
Posts: 3
Why is maya taking out the backslashes?


try to invert them to slashes ?

# 8 19-03-2003 , 12:05 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
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.\"");
user added image


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
# 9 19-03-2003 , 12:07 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
I used the print command as an example but the same applies to all string handling in maya...


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
# 10 21-03-2003 , 03:33 PM
BillyZ's Avatar
Subscriber
Join Date: Sep 2002
Location: Vancouver, BC
Posts: 223

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.

# 11 21-03-2003 , 06:07 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
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 ituser added image

Good luck!


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 12 21-03-2003 , 06:54 PM
BillyZ's Avatar
Subscriber
Join Date: Sep 2002
Location: Vancouver, BC
Posts: 223
Much appreciated, it worked!
Now if only if they typed it out like that in the documentation.

# 13 05-04-2003 , 10:50 PM
doodle's Avatar
Registered User
Join Date: Nov 2002
Location: London
Posts: 1,292
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 user added image


Yeah, but no but yeah but no....
# 14 08-04-2003 , 10:30 AM
Registered User
Join Date: Apr 2003
Posts: 1
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 ??

# 15 08-04-2003 , 11:44 AM
caligraphics's Avatar
Registered User
Join Date: Mar 2003
Location: Billund, Denmark
Posts: 992
Well, one reason why people are using GI Joe is that it gives a decent result in lots less time than rendering with MR..


Carsten Lind
Senior 3D Artist,
Maya Software Manager & Maya Instructor
LEGO Systems A/S
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads