Message 1 of 6
Decimal places as needed
Not applicable
01-31-2012
05:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I read a vertex normal of a face in maxscript and it returns an array of 3 arrays like this:
this is ok but when I extract single numbers from each array and send it to output (just like below, example for one number only):
I am getting the right numbers but all of them have decimal places like for example "0" is "0.0" and I want to shrink the file size as much as possible so where not needed I want maxscript not to put this unnecessary data:
How do I do it?
#(, , )
this is ok but when I extract single numbers from each array and send it to output (just like below, example for one number only):
for i = 1 to theMesh.numfaces do
(
vertexNormal = meshop.getfaceRnormals theMesh i
format "%,%,%,%,%,%,%,%,%," vertexNormal.x vertexNormal.y vertexNormal.z vertexNormal.x vertexNormal.y vertexNormal.z vertexNormal.x vertexNormal.y vertexNormal.z to:outFile
I am getting the right numbers but all of them have decimal places like for example "0" is "0.0" and I want to shrink the file size as much as possible so where not needed I want maxscript not to put this unnecessary data:
0.0,-1.0,0.0,
0.0,-1.0,0.0,
0.0,-1.0,0.0
How do I do it?