PDA

View Full Version : Tutorial Issue



YoungFortune
04-22-2011, 12:14 AM
Hello I am following the tutorial "Creature Rigging" Insects..and I am using Maya 2011. My question is has MEL changed or should the scripts written in that particular version of Maya (2009) I believe still work? I wrote the script as instructed:


global proc matchTrns(){

string $mtr[] = `ls -sl`;

if (size($mtr) < 2) {

warning "Must select 2 objects!";

} else if (size($mrt) == 2){

parent;

setAttr ($mrt[0] + ".tx") 0;
setAttr ($mrt[0] + ".ty") 0;
setAttr ($mrt[0] + ".tz") 0;
setAttr ($mrt[0] + ".rx") 0;
setAttr ($mrt[0] + ".ry") 0;
setAttr ($mrt[0] + ".rz") 0;

select $mrt[0];

parent -w;
}

}

And I continue to get this error message:

global proc matchTrns(){

string $mtr[] = `ls -sl`;

if (size($mtr) < 2) {

warning "Must select 2 objects!";

} else if (size($mrt) == 2){

parent;

setAttr ($mrt[0] + ".tx") 0;
setAttr ($mrt[0] + ".ty") 0;
setAttr ($mrt[0] + ".tz") 0;
setAttr ($mrt[0] + ".rx") 0;
setAttr ($mrt[0] + ".ry") 0;
setAttr ($mrt[0] + ".rz") 0;

select $mrt[0];

parent -w;
}

};
// Error: } else if (size($mrt) == 2){
//
// Error: "$mrt" is an undeclared variable. //
// Error: setAttr ($mrt[0] + ".tx") 0;
//
// Error: "$mrt" is an undeclared variable. //
// Error: setAttr ($mrt[0] + ".ty") 0;
//
// Error: "$mrt" is an undeclared variable. //
// Error: setAttr ($mrt[0] + ".tz") 0;
//
// Error: "$mrt" is an undeclared variable. //
// Error: setAttr ($mrt[0] + ".rx") 0;
//
// Error: "$mrt" is an undeclared variable. //
// Error: setAttr ($mrt[0] + ".ry") 0;
//
// Error: "$mrt" is an undeclared variable. //
// Error: setAttr ($mrt[0] + ".rz") 0;
//
// Error: "$mrt" is an undeclared variable. //
// Error: select $mrt[0];
//
// Error: "$mrt" is an undeclared variable. //



Any help on this would be appreciated. I have attempted to space things out move things closer and the error doesn't go away...How do I declare the variable when it isn't supposed to be specified (via the tutorial)?

adeptus
04-22-2011, 05:55 AM
You can do the MatchTransformation script with an other method
you can find how to write this script in the .. hm I think it was the curve base facial rigging course.

dan
04-25-2011, 04:49 PM
Hi YoungFortune! Here's a look at how you can fix that error:


22855647

Here's a link to the Creature Rigging in Maya: Insects (http://www.digitaltutors.com/11/training.php?pid=3522) course that was referenced in the video.