Vous n'êtes pas identifié.
Salut tout le monde, je suis un artiste 3d qui travail a montreal. Je me suis mis a faire un petit script avec menu pour faciliter une partie de la prod ou je travail. Le script servira a faire des deformation de trace de pas sur le sol.
Je crois avoir une assez bonne idee sur le comment arrive a mes fins, Mais je butte sur quelque chose.
Voici ce que j ai.
string $ObjVtxMEM_X[];
string $ObjVtxMEM_Y[];
string $ObjVtxMEM_Z[];
string $FootStep_Menu = `window -title "FootStep Menu"
-widthHeight 600 300`;
columnLayout;
frameLayout -collapsable true -label "Frame Layout 1" -width 600;
rowColumnLayout -nc 4;
button -label "Set Ground" -command "string $sel_ground[] = `ls -sl`";
button -label "select Ground" -command "select $sel_ground[0]";
showWindow $FootStep_Menu;
proc OrgToArray()
{
int $inc = 0;
for ($inc=0; $inc < 121; $inc++)
{
vector $OLD = `pointPosition -l ($sel_ground[0]+".vtx"+"["+$inc+"]")`;
print $OLD;
select ($sel_ground[0]+".vtx"+"["+"6"+"]");
$ObjVtxMEM_X[$inc] = $OLD.x;
$ObjVtxMEM_Y[$inc] = $OLD.y;
$ObjVtxMEM_Z[$inc] = $OLD.z;
print $ObjVtxMEM_Z
}
}
Ceci ne fonctionne pas...
Je cherche a garder les information de tout les points d un objet dans un array. Ma loop fonctionne seul. Mon Menu fonctionne seul. Mais avec la procedure ya quelque chose que je fais de pas correct. voici les erreur que ca me donne.
// Error: vector $OLD = `pointPosition -l ($sel_ground[0]+".vtx"+"["+$inc+"]")`; //
// Error: "$sel_ground" is an undeclared variable. //
// Error: select ($sel_ground[0]+".vtx"+"["+"6"+"]"); //
// Error: "$sel_ground" is an undeclared variable. //
// Error: } //
// Error: Syntax error //
// Error: //
// Error: Syntax error //
Hors ligne
salut!
bon, en premier lieu un ptit conseil: dans le menu history de l'éditeur de script t'as une option qui s'appelle "line numbers in errors", coche la, ça t'indiquera la ligne où se trouve l'erreur, très pratique! 
pour le reste, ça donne ça il me semble:
string $FootStep_Menu = `window -title "FootStep Menu"
-widthHeight 600 300`;
columnLayout;
frameLayout -collapsable true -label "Frame Layout 1" -width 600;
rowColumnLayout -nc 4;
button -label "Set Ground" -command "string $sel_ground[]= `ls -sl`";
button -label "select Ground" -command "select $sel_ground[0]";
showWindow $FootStep_Menu;
proc OrgToArray()
{
string $ObjVtxMEM_X[];
string $ObjVtxMEM_Y[];
string $ObjVtxMEM_Z[];
string $sel_ground[];
for ($inc=0; $inc < 121; $inc++)
{
vector $OLD = `pointPosition -l ($sel_ground[0]+".vtx"+"["+$inc+"]")`;
print $OLD;
select ($sel_ground[0]+".vtx"+"["+"6"+"]");
$ObjVtxMEM_X[$inc] = $OLD.x;
$ObjVtxMEM_Y[$inc] = $OLD.y;
$ObjVtxMEM_Z[$inc] = $OLD.z;
print $ObjVtxMEM_Z;
}
}
dans une boucle for tu n'as pas besoin de préciser "int $inc = 0;" avant. soit dit en passant tu vas peut-etre devoir return $ObjVtxMEM_Z si c'est ce que tu veux réutiliser en dehors de la procédure.
voilà j'espere t'avoir débloqué! 
Hors ligne
hahahah j'adore !!!!
Hors ligne