|
|
|
@ -933,11 +933,16 @@ class Model:
|
|
|
|
|
weights = []
|
|
|
|
|
#print(" weights: %s" % (weights, ))
|
|
|
|
|
v = GeoVertex(coord, normal, uv, weights)
|
|
|
|
|
geomesh.getGeoVertexIndex(v)
|
|
|
|
|
geomesh.getGeoVertexIndexNew(v)
|
|
|
|
|
texture_indexes = []
|
|
|
|
|
for t in self.tex_idx:
|
|
|
|
|
texture_indexes += [geomesh.getTextureIndex(self.geo.header_texnames[t[0]])] * t[1]
|
|
|
|
|
#print("len(self.verts): %s" % (len(self.verts), ))
|
|
|
|
|
#print("len(geomesh.geovertex): %s" % (len(geomesh.geovertex), ))
|
|
|
|
|
#print("%s" % (self.tex_idx, ))
|
|
|
|
|
#print("%s" % (texture_indexes, ))
|
|
|
|
|
for i, t in enumerate(self.tris):
|
|
|
|
|
#print(" - %s: %s" % (i, t))
|
|
|
|
|
geomesh.addFace([geomesh.geovertex[t[0]], geomesh.geovertex[t[1]], geomesh.geovertex[t[2]]], texture_indexes[i])
|
|
|
|
|
return geomesh
|
|
|
|
|
def loadFromGeoMesh(self, geomesh):
|
|
|
|
|