Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 12-04-2010, 09:39 PM   #1
kittykate
Registered User
 
Join Date: Mar 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Angry Troubleshooting with mel Please help!

Perhaps the version of Maya which I am using is to old or new. This script is a copy and paste, so there are no typing errors.

I am doing the cartoon character rigging tutorial by digital tutorials.

At the very beginning ( part 3) they ask you to execute the following mel script:
(which then gives me a syntax error)

//checks for our Window and Deletes it

if (`window -exists Node_Generate`)
{
deleteUI -window Node_Generate;
}

// Window for our Node Generator

string $Node_Generator = `window
-title “Node Generator”
– wh 128 256
Node_Generate`;

//Define our row and column layouts

rowColumnLayout -numberOfColumns 2 -cw 2 50;

// Column 1: buttons, column 2: button descriptions

separator; separator;

button -label “arcLen Maker” -c “CurveInfo()”; text -label “CurveInfo”;

separator; separator;

button -label “Mult Div” -c “multDiv()”; text -label “Mult Div Maker”;

//shows our window
showWindow $Node_Generator;
kittykate is offline   Reply With Quote
Old 12-04-2010, 10:20 PM   #2
kittykate
Registered User
 
Join Date: Mar 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

btw I am using autodesk maya 2008
kittykate is offline   Reply With Quote
Old 12-04-2010, 10:23 PM   #3
NitroLiq
Moderator
 
NitroLiq's Avatar
 
Join Date: Nov 2002
Location: New York
Posts: 2,133
Thanks: 0
Thanked 10 Times in 9 Posts
Default

What's the syntax error? Since you didn't use a code block when you pasted it above it shows single and double quotes as "smart" quotes....were they like that from the code you cut from?

For example, you pasted:

if (`window -exists Node_Generate`)

but the single quotes should be like this:

Code:
if ('window -exists Node_Generate')
Have you tried asking on DT's forums?
__________________
"Terminat Bora Diem, Terminal Auctor opus."
NitroLiq is offline   Reply With Quote
Old 12-04-2010, 10:28 PM   #4
kittykate
Registered User
 
Join Date: Mar 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't have access to the forum unfortunatly
kittykate is offline   Reply With Quote
Old 12-04-2010, 10:35 PM   #5
NitroLiq
Moderator
 
NitroLiq's Avatar
 
Join Date: Nov 2002
Location: New York
Posts: 2,133
Thanks: 0
Thanked 10 Times in 9 Posts
Default

See if this works:

Code:
//checks for our Window and Deletes it
if ('window -exists Node_Generate')
{
deleteUI -window Node_Generate;
}

// Window for our Node Generator
string $Node_Generator = 'window
-title "Node Generator"
– wh 128 256
Node_Generate';

//Define our row and column layouts
rowColumnLayout -numberOfColumns 2 -cw 2 50;

// Column 1: buttons, column 2: button descriptions
separator; separator;

button -label "arcLen Maker" -c "CurveInfo()"; text -label "CurveInfo";

separator; separator;

button -label "Mult Div" -c "multDiv()"; text -label "Mult Div Maker";

//shows our window
showWindow $Node_Generator;
__________________
"Terminat Bora Diem, Terminal Auctor opus."
NitroLiq is offline   Reply With Quote
Old 12-04-2010, 10:40 PM   #6
kittykate
Registered User
 
Join Date: Mar 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, but it still gave me a syntax error.
kittykate is offline   Reply With Quote
Old 12-04-2010, 10:46 PM   #7
NitroLiq
Moderator
 
NitroLiq's Avatar
 
Join Date: Nov 2002
Location: New York
Posts: 2,133
Thanks: 0
Thanked 10 Times in 9 Posts
Default

Try putting this into google:

"digital tutors cartoon character rigging mel script"

lots of results.
__________________
"Terminat Bora Diem, Terminal Auctor opus."
NitroLiq is offline   Reply With Quote
Old 12-04-2010, 10:58 PM   #8
kittykate
Registered User
 
Join Date: Mar 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:attn: :attn:


Thank you soo much.

The link you gave me worked.

You've been an excellent help. I was about to tear my hair out.

Will you be friend?

:bow:
kittykate is offline   Reply With Quote
Old 12-04-2010, 11:07 PM   #9
ctbram
Moderator
 
ctbram's Avatar
 
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,995
Thanks: 42
Thanked 582 Times in 532 Posts
Default

Code looks fine but the double quotes are incorrect. When I copied and pasted your code it was throwing errors for all the lines that had double quoted items. I simply retyped those lines using the " instead of whatever you had and it worked fine.

I am not sure but the ` character you are using looks fine. It is the key to the left of the 1 key on a standard US keyboard. The ` character instructs the interpreter to execute the command contained between the ` characters.

If you look at what you have posted you have a different kind of " symbol at either end of the double quoted items. They have a tilt to them. I can't even find those quote symbols on my keyboard?

Here is what I typed in. You can see the difference in the double quotes " symbol. It's next the the ; key on my keyboard....

//checks for our Window and Deletes it

if (`window -exists Node_Generator`)
{
deleteUI -window Node_Generate;
}

// Window for our Node Generator

string $Node_Generator = `window
-title "Node Generator"
-wh 128 256
Node_Generator`;


//Define our row and column layouts

rowColumnLayout -numberOfColumns 2 -cw 2 50;

// Column 1: buttons, column 2: button descriptions

separator; separator;

button -label "Arclen maker" -c "CurveInfo()"; text -label "CurveInfo";

separator; separator;

button -label "Mult Div" -c "multDiv()"; text -label "Mult Div Maker";

//shows our window
showWindow $Node_Generator;
__________________
"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram : 12-04-2010 at 11:11 PM.
ctbram is offline   Reply With Quote
Old 12-04-2010, 11:11 PM   #10
NitroLiq
Moderator
 
NitroLiq's Avatar
 
Join Date: Nov 2002
Location: New York
Posts: 2,133
Thanks: 0
Thanked 10 Times in 9 Posts
Default

Originally posted by kittykate
Thank you soo much. The link you gave me worked. You've been an excellent help. I was about to tear my hair out.
No problem but next time I suggest a little pro-active googling or searching DT's forums if working on one of their product tuts. Just like you wouldn't go to their forums and ask them for help on one of Simplymaya's tutorials. It's just bad form. That being said, there's a good community of helpful folks here so if you have any Maya questions have at it.

Btw, you said you didn't have access to DT's forums but the answers were all in their forums so how did that work out for ya?

Originally posted by ctbram
I am not sure but the ` character you are using looks fine. It is the key to the left of the 1 key on a standard US keyboard. The ` character instructs the interpreter to execute the command contained between the ` characters.
My bad if I was wrong about that...I thought that was supposed to be a single prime/single quote/apostrophe. Didn't know the back quote/grave was actually used.

Originally posted by ctbram
If you look at what you have posted you have a different kind of " symbol at either end of the double quoted items. They have a tilt to them. I can't even find those quote symbols on my keyboard?
That's what threw me off. Those are smart quotes. Sometimes software automatically converts quotes into smart quotes...forums, CMS, etc. so I figured she cut it from something that made a mistake. Since I hadn't actually seen the video she's referencing I couldn't really tell if that was the intent or not. Smart quotes are the proper formatting for actual quotes...the way a keyboard typically types them is as prime and double prime marks which are what should be used for measurement (ala 6'5"), not for real quotes and apostrophes.
__________________
"Terminat Bora Diem, Terminal Auctor opus."
NitroLiq is offline   Reply With Quote
Old 12-04-2010, 11:27 PM   #11
kittykate
Registered User
 
Join Date: Mar 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi... yes, I did initially take the code on this link

http://support.digitaltutors.com/ent...cript-lesson-3

That didn't work.

I read the forum, before starting this thread.... the one you sent me, but they weren't experiencing the same problem as me and I could not post a question.

I didn't think to copy paste their code until you sent it to me again

Eventually this was the one that worked

// Checks for our Window and Deletes it

if (`window -exists Node_Generator`) {
delete -window Node_Generator;
}

// Window for our Node Generator

string $Node_Generator = `window
-title "Node Generator"
-wh 128 256
Node_Generator`;
// Define our Row and Column Layout

rowColumnLayout -numberOfColumns 2 - cw 2 50;

// Column1: buttons Column2: button descriptions

separator; separator;

button -label "acrLen Maker" -c "CurveInfo()"; text -label "CurveInfo";

separator; separator;

button -label "Mult Div" -c "multDiv()"; text -label "Mult Div Maker";


// shows our window
showWindow $Node_Generator
kittykate is offline   Reply With Quote
Old 12-04-2010, 11:29 PM   #12
kittykate
Registered User
 
Join Date: Mar 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm dyslexic , so I try avoid mel... but now I have to because of rigging.

Great! I just got to the next part... more mel and more syntax errors... yay!
kittykate is offline   Reply With Quote
Old 12-04-2010, 11:38 PM   #13
NitroLiq
Moderator
 
NitroLiq's Avatar
 
Join Date: Nov 2002
Location: New York
Posts: 2,133
Thanks: 0
Thanked 10 Times in 9 Posts
Default

Yeah, rigging is heavy on the mel/expressions so it's something you'll have to work through. Just take your time and try to write it—don't just cut and paste—you'll learn the syntax better. Also hit F1 for any syntax help. Just take your time and be patient with it.
__________________
"Terminat Bora Diem, Terminal Auctor opus."
NitroLiq is offline   Reply With Quote
Old 13-04-2010, 12:09 AM   #14
kittykate
Registered User
 
Join Date: Mar 2010
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you!

I'm under a bit of time pressure with this project. Afterwards , I promise to do the artist's guide to mel. I've learnt my lesson... (I hope)
kittykate is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
MEL headache! happymat27 Members Lounge 5 05-12-2010 09:43 AM
MEL headache!! happymat27 Mel Scripts & Programming 1 03-12-2010 04:41 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.