Hi.
have a .CSV file (database) with the coordinates of the points that I want to convert into particles. But there is a problem.
I can not assign all the coordinates of one node: particle -p ... ... ... -p ... ... ... ................;
Please help solve the problem.
work:
.....................//open file
string $nextLine = fgetline $fileId;
string $rawAnimArray[];
int $a = 10;
while ( $a )
{
tokenize ($nextLine, ",",$rawAnimArray);
float $x=$rawAnimArray[0];
float $y=$rawAnimArray[1];
float $z=$rawAnimArray[2];
$nextLine = `fgetline $fileId`;
particle -p $x $y $z;
$a = $a - 1;
}
fclose $fileId;
don`t work:
...................................//open file
string $nextLine = fgetline $fileId;
string $rawAnimArray[];
int $a = 10;
string $cmdline = "";
while ( $a )
{
tokenize ($nextLine, ",",$rawAnimArray);
float $x=$rawAnimArray[0];
float $y=$rawAnimArray[1];
float $z=$rawAnimArray[2];
$nextLine = `fgetline $fileId`;
$cmdline += "-p " + $x + " " + $y + " " + $z + " ";
$a = $a - 1;
print ( $cmdline );
}
particle -p $cmdline;
fclose $fileId;