hah!
i'll just sit back and bask in my own awesomeness now

this was hideously easy..
code isn't finalized, as there is no easy way to select the proper objects in the scene, but its basically a cleaned up version of chris cooksons exporter.
this is the exporter script, which i think will only work on max8 for now:
Code:
fn p val =
(
if abs(val) < 0.0001 then return 0.0
else return val
)
fn p3 p3 =
(
rp3 = [0.0,0.0,0.0]
if abs(p3.x)>0.0001 then rp3.x = p3.x
if abs(p3.y)>0.0001 then rp3.y = p3.y
if abs(p3.z)>0.0001 then rp3.z = p3.z
return rp3
)
fn printvert nd vnr skn =
(skeen=rootnode.children[2].modifiers[#Skin]
ps = p3(nd.verts[vnr].pos)
norm=p3(getnormal nd vnr)
tc=p3(gettvert nd vnr)
wc = skinops.getvertexweightcount skn vnr
if wc == 0 then (
skinops.SelectVertices skn vnr
throw "One or more vertices don't have bone assignment!"
)
b1 = skinops.getvertexweightboneid skn vnr 1
format " % % % % % % % % % " (b1-1) ps.x ps.y ps.z norm.x norm.y norm.z tc.x tc.y to:output_file
format "%" wc to:output_file
if wc > 0 then (
for w = 1 to wc do (
bon = skinops.getvertexweightboneid skn vnr w
wght = p(skinops.getvertexweight skn vnr w)
format " % %" (bon-1) wght to:output_file
)
)
format "\n" to:output_file
)
output_file = createfile "C:\mbmodel.smd"
format "version 1\nnodes\n" to:output_file
-- NODES AREA ------
skeen=rootnode.children[2].modifiers[#Skin]
max modify mode
modPanel.setCurrentObject skeen
numbones = skinops.getnumberbones(skeen)
for num = 1 to numbones do (
name = skinops.getbonename skeen num 0
noode = getnodebyname name
parent = noode.parent
if parent==undefined then parentname="-1"
else parentname = parent.name
index = num-1
format " % \"%\" %\n" index name parentname to:output_file
)
format "end\nskeleton\ntime 0\n" to:output_file
--SKELETON--------
for num = 1 to numbones do (
index=num-1
name = skinops.getbonename skeen num 0
noode = getnodebyname name
in coordsys parent (
postion=p3(noode.pos)
rott=[noode.rotation.x_rotation,noode.rotation.y_rotation,noode.rotation.z_rotation]
)
rott.x=p(degtorad rott.x)
rott.y=p(degtorad rott.y)
rott.z=p(degtorad rott.z)
format " % % % % % % %\n" index postion.x postion.y postion.z rott.x rott.y rott.z to:output_file
)
format "end\ntriangles\n" to:output_file
for noode in rootnode.children do(
if classof noode == Editable_mesh then (
faces = noode.numfaces
-- texname = noode.material[1].name
texname = "Textures/costumes1.dds"
m = snapshotasmesh noode
for i = 1 to faces do(
format "%\n" texname to:output_file
currface = getface m i
for num =1 to 3 do (
vrt=currface[num]
printvert noode vrt skeen
)
)
)
)
format "end\n" to:output_file
close output_file
just copy this into a script file, and run it.
in the --NODES-- section of the script, you have something that looks like this:
skeen=rootnode.children[2].modifiers[#Skin]
this is the expression that saves whatever the mesh children[2] might be.
you need to make sure this is the shirt object you want to export.
to do this, first type
show rootnode.children into the maxscript listener.
you'll get something like this:
No Info Found on: #children($0, $shirt)
children($0, $shirt) is an array of all the lowest level objects in the max scene.
$0 would be the lowest level of the bones mesh, and $shirt is the shirt, or whatever is there.
so the array is this: children(1, 2)
if you wanted to export the bone, you'd write:
skeen=rootnode.children[1].modifiers[#Skin]
and if the mesh you wanted to export was the third object in the array, you'd write:
skeen=rootnode.children[3].modifiers[#Skin]
this is roundabout, but i'll figure out a way to make the selected mesh be the one thats exported.