AtrusDni
03-21-2006, 02:52 AM
Ok so im going to be using ZBrush on a character, but there are a ton of peices that I want to export to obj files, so of course I would like to make a script to do this. Im a total n00b when it comes to coding, so any help would be appreciated.
So the following is what I have to far:
------------------------------------------------------------
string $OBJselected[] = `ls -sl`;
int $OBJnumSelected = size($OBJselected);
for ($i=0; $i<size($OBJselected); $i++)
{
}
//And the code that I want to execute inside the for-loop. Although the last part needs to
//be updated based on the name of the object selected.
//-----------------------------------------------------------
file -op "groups=0;ptgroups=0;materials=0;smoothing=1;normals=1" -typ "OBJexport" -pr -es (NAMEOFOBJECT TO EXPORT);
I have an array from the selected objects, and integer with the number of objects in the array and a for loop that will execute as many times as there are objects selected.
Soooo . . . My problem is that I would like to query the array each time in the for loop, find the objects name, select the object and run the export code, that way it doesnt keep exporting into the same file. I would love to finish this part but am unsure of the syntax required to do so. Any help would be appreciated. Thank you.
So the following is what I have to far:
------------------------------------------------------------
string $OBJselected[] = `ls -sl`;
int $OBJnumSelected = size($OBJselected);
for ($i=0; $i<size($OBJselected); $i++)
{
}
//And the code that I want to execute inside the for-loop. Although the last part needs to
//be updated based on the name of the object selected.
//-----------------------------------------------------------
file -op "groups=0;ptgroups=0;materials=0;smoothing=1;normals=1" -typ "OBJexport" -pr -es (NAMEOFOBJECT TO EXPORT);
I have an array from the selected objects, and integer with the number of objects in the array and a for loop that will execute as many times as there are objects selected.
Soooo . . . My problem is that I would like to query the array each time in the for loop, find the objects name, select the object and run the export code, that way it doesnt keep exporting into the same file. I would love to finish this part but am unsure of the syntax required to do so. Any help would be appreciated. Thank you.
