Export: Duplicating vertices on a uv seam

Hi, I’m trying to export models from Blender using the X file format for use in my own game engine. The default X exporter that comes with Blender seems to duplicate each vertex for each face it appears in (i.e. there is no index buffer, so if five faces share a vertex, that vertex will be duplicated five times). This doesn’t work for my purposes, so I found another X exporter online (which I have modified somewhat) that properly accounts for shared vertices. The problem I’m having is that when I have a vertex on a uv seam (i.e. a vertex that has multiple sets of uv coordinates) I want that vertex to be duplicated, and currently that does not occur. Is there any easy way to duplicate the vertices on a seam, either from within Blender or in a script? By “easy way” I mean something besides manually looping through every face and checking how many different sets of uv coords a vertex has, then rebuilding the vertex list.

have a look at the cal3d exporter that comes with blender 2.45, it does this

Thanks; I got it working. It wasn’t as bad to do it that way as I originally thought.