please,.. help an architecture student
I'm architecture studet and I'm doing my final project using .mel scripting to generate the design.
I've made an script to create some boxes with their names: shop1_1,...
To create that boxes the program will read some variable from the model (the position of the vertex of one nurbs surface called potential) if the Y position=1, it will create 1 box, if it's 2, 2 boxes,... shop 1_1, and shop 1_2,...
I've put all the scripts and procedures in a folder in: my documents>maya>scripts. After I've openend the file with I'll work with (where it is the potential surface). And finally I've opened the script editor and I've called the procedure: createShops ();
After execute that procedure that is calling to 2 other procedures: getPotentiality() and createShop ()
the program in not giving me any answer,.. it doesn't create the shops and it neither give me any error!!!!
I've very worried because I really need it to continue with my project,..
So,. please, if someone can help me,.. Nobody in my university can help me with that,.. and I really need to solve it,...
I've send you the scripts but I think they are right,.. I think I'm doing sth wrong in the way of running the script or sth like that,...
global proc createShops() {
global int $lengthSite;
int $i;
int $ii;
for ($i=1;$i<=$lengthSite;$i++) {
int $potentiality;
$potentiality = getPotentiality($i);
for ($ii=1;$ii<=$potentiality;$ii++) {
createShop ($i, $ii, $potentiality);
}
}
}
global proc int getPotentiality(int $i) {
int $result;
$result = getAttr ("potential.cv["+$i+"][0].yValue");
return $result;
}
global proc createShop (int $i, int $ii, int $potentiality) {
string $name;
$name = "shop"+$i+"_"+$ii;
int $x;
$x = ($ii*locate($i)/($potentiality+1));
polyCube -w 1 -d 4 -h 3.5 -name $name;
move -r -os -wd ($x) 1.75 (4*$i);
}
Thank you!!!