Windows only, sloppy, and it's only been tested with one file, but still worth a try if you don't own max and you've got a mesh with a biped stuck in it
Code: Select all
strIn = InputBox("Enter x file name")
strOut = strIn & ".new.x"
set fso = createobject("scripting.filesystemobject")
set fIn = fso.openTextFile(strIn)
set fOut = fso.createtextfile(strOut)
while (not fIn.AtEndOfStream)
s = fin.readline()
fout.writeline(s)
if ( instr(s, "Frame Bip") > 0 ) then
s = fin.readline()
while ( instr(s, "Mesh") = 0 )
fout.writeline(s)
s = fin.readline()
wend
' this line is the start of the mesh and contained 1 bracket {
c = 1
while (c > 0)
s = fin.readline()
if ( instr(s, "{") > 0 ) then
c = c + 1
end if
if ( instr(s, "}") > 0 ) then
c = c - 1
end if
wend
end if
wend
fout.close()
fin.close()
wscript.echo "all done :-)"