Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Troubleshooting with mel Please help! (https://simplymaya.com/forum/showthread.php?t=33979)

kittykate 12-04-2010 08:39 PM

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 12-04-2010 09:20 PM

btw I am using autodesk maya 2008

NitroLiq 12-04-2010 09:23 PM

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?

kittykate 12-04-2010 09:28 PM

I don't have access to the forum unfortunatly

NitroLiq 12-04-2010 09:35 PM

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;


kittykate 12-04-2010 09:40 PM

Thank you, but it still gave me a syntax error.

NitroLiq 12-04-2010 09:46 PM

Try putting this into google:

"digital tutors cartoon character rigging mel script"

lots of results.

kittykate 12-04-2010 09:58 PM

: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:

ctbram 12-04-2010 10:07 PM

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;

NitroLiq 12-04-2010 10:11 PM

Quote:

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? :confused:

Quote:

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.

Quote:

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.

kittykate 12-04-2010 10:27 PM

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 12-04-2010 10:29 PM

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!

NitroLiq 12-04-2010 10:38 PM

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.

kittykate 12-04-2010 11:09 PM

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)


All times are GMT. The time now is 06:29 PM.

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