View Single Post
# 6 26-05-2006 , 03:50 PM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
This code here seems to run without hollering at me, but wether it is actually doing what it should, I'm not sure . . .


string $shp[] =`ls -tr`;
string $m = "mesh";
for ($obj in $shp) {
$shape = `listRelatives -shapes $obj`;
if (`objectType $shape $m`) {
float $pos[] = `getAttr ($obj +".translate")`;
$write += "\n\n<model>\n\t<pos>" + $pos[0] + " " + $pos[1] + " " + $pos[2] + "</pos>";
$write += "\n\t<scale>1</scale>";
$write += "\n\t<rotation><matrix>1 0 0 0 1 0 0 0 1</matrix></rotation>";
$write += "\n\t<mesh_name>"+ $shape[0] +"</mesh_name>\n</model>";
}
}


There is an example here:
https://cade.scope.edu/courseware/notes/mel/program.html


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche