Original Post
Hey There, I've got Max exporting the Vertices and Normals correctly, all fun and dandy, displays correctly in my Game Engine. It also exports the Texture Faces and Coordinates, again all correct. However, I do not know how to get Max to export the relevant Texture path for each face (which I'm assuming would be indexed). I've included my Maxscript with this email. It would be much appreciated if someone were able to tell me how I could export the texture paths and reference the texture index for each face.
macroScript Export_BPM category:"Blue Phoenix Exporters" tooltip:"Blue Phoenix Model Exporter" Icon:#("AtmosApp",1)
(
tmesh = snapshotAsMesh selection[1]
out_name = getSaveFileName types: "Blue Phoenix Models(*.bpm) |*.bpm|"
out_file = createfile out_name
num_verts = tmesh.numverts
num_faces = tmesh.numfaces
num_tverts = tmesh.numtverts
format "// Blue Phoenix Model Exporter\n// Created By: Andrew Esser\n// Date: 12\11\2006\n// Copyright (C) esserSoft Technologies, 2006\n" to:out_file
format "\n#V:%\n#F:%\n\n" num_verts num_faces to:out_file
format "Vertices {\n" to:out_file
for v = 1 to num_verts do
(
vert = getVert tmesh v
format "%\n" vert to:out_file
)
format "}\n\n" to:out_file
format "Normals {\n" to:out_file
for n = 1 to num_verts do
(
norm = getNormal tmesh n
format "%\n" norm to:out_file
)
format "}\n\n" to:out_file
format "Vertex Faces {\n" to:out_file
for f = 1 to num_faces do
(
face = getFace tmesh f
format "%\n" (face - 1) to:out_file
)
format "}\n\n" to:out_file
format "Texture {\n" to:out_file
for t = 1 to num_tverts do
(
texture = getTVert tmesh t
format "%\n" texture to:out_file
)
format "}\n\n" to:out_file
format "Texture Faces {\n" to:out_file
for s = 1 to num_verts do
(
textureFaces = getTVface tmesh s
format "%\n" (textureFaces - 1) to:out_file
)
format "}" to:out_file
close out_file
)