This course will look in the fundamentals of modeling in Maya with an emphasis on creating good topology. It's aimed at people that have some modeling experience in Maya but are having trouble with
complex objects.
Hey guys, this is my first post on simplymaya.com, but I heard this is a pretty good forum. Here's the deal: I'm trying to write a script that takes a group of selected objects and sets the translateY for each object equal to the translateZ. In the script below, no matter what I try, I get the error message:
Here's the script. If anyone has any idea how I can fix this, PLEASE help me out. I've tried a post in other forums with little success so I'm running out of resources. Thanks in advance.
//sinfunc: function takes a group of selected objects and
//graphs them according to the equation y = z
global proc sinfunc(){
//stores each selected object in an array
string $sel[];
$sel = `ls -sl`;
//defines some variables and sets the
//$tempArrSize as the number of selected objects
int $tempArrSize;
int $i;
string $tempObj;
$tempArrSize = size($sel);
//Moves through each object in $sel and sets
//the translateY equal to the translateZ
The For loops are declared incorrectly. Instead of commas (,) you should use semicolons ( between the loop parameters. So for instance, your for loop should look like this:
Hi ive had a quick look at your code and simplified it alittle.
Basically it gets the value of transZ from the current obj and sets transY to the same for each obj in the array.
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