Created
February 4, 2009 05:28
-
-
Save hdon/57964 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file.write('f') | |
if faceuv: | |
if EXPORT_NORMALS: | |
if f_smooth: # Smoothed, use vertex normals | |
for vi, v in enumerate(f_v): | |
file.write( ' %d/%d/%d' % (\ | |
v.index+totverts,\ | |
totuvco + uv_face_mapping[f_index][vi],\ | |
globalNormals[ veckey3d(v.no) ])) # vert, uv, normal | |
else: # No smoothing, face normals | |
no = globalNormals[ veckey3d(f.no) ] | |
for vi, v in enumerate(f_v): | |
file.write( ' %d/%d/%d' % (\ | |
v.index+totverts,\ | |
totuvco + uv_face_mapping[f_index][vi],\ | |
no)) # vert, uv, normal | |
else: # No Normals | |
for vi, v in enumerate(f_v): | |
file.write( ' %d/%d' % (\ | |
v.index+totverts,\ | |
totuvco + uv_face_mapping[f_index][vi])) # vert, uv | |
face_vert_index += len(f_v) | |
else: # No UV's | |
if EXPORT_NORMALS: | |
if f_smooth: # Smoothed, use vertex normals | |
for v in f_v: | |
file.write( ' %d//%d' % (\ | |
v.index+totverts,\ | |
globalNormals[ veckey3d(v.no) ])) | |
else: # No smoothing, face normals | |
no = globalNormals[ veckey3d(f.no) ] | |
for v in f_v: | |
file.write( ' %d//%d' % (\ | |
v.index+totverts,\ | |
no)) | |
else: # No Normals | |
for v in f_v: | |
file.write( ' %d' % (\ | |
v.index+totverts)) | |
file.write('\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment