|
|
@ -956,6 +956,8 @@ class Model:
|
|
|
|
weight_remap = []
|
|
|
|
weight_remap = []
|
|
|
|
for i in range(len(geomesh.weights)):
|
|
|
|
for i in range(len(geomesh.weights)):
|
|
|
|
weight_remap.append(BONES_LOOKUP.get(geomesh.weights[i], 0))
|
|
|
|
weight_remap.append(BONES_LOOKUP.get(geomesh.weights[i], 0))
|
|
|
|
|
|
|
|
if len(weight_remap) <= 0:
|
|
|
|
|
|
|
|
weight_remap.append(0)
|
|
|
|
#Convert vetices to: positions, normals, uvs, weights
|
|
|
|
#Convert vetices to: positions, normals, uvs, weights
|
|
|
|
for i, v in enumerate(geomesh.geovertex):
|
|
|
|
for i, v in enumerate(geomesh.geovertex):
|
|
|
|
self.verts.append(v.coord)
|
|
|
|
self.verts.append(v.coord)
|
|
|
@ -965,13 +967,13 @@ class Model:
|
|
|
|
weights = v.selectWeights(2)
|
|
|
|
weights = v.selectWeights(2)
|
|
|
|
if len(weights) == 0:
|
|
|
|
if len(weights) == 0:
|
|
|
|
self.weights.append([1, 0])
|
|
|
|
self.weights.append([1, 0])
|
|
|
|
self.weight_bones.append([0, 0])
|
|
|
|
self.weight_bones.append([weight_remap[0], weight_remap[0]])
|
|
|
|
elif len(weights) == 1:
|
|
|
|
elif len(weights) == 1:
|
|
|
|
self.weights.append([weights[0][1], 0])
|
|
|
|
self.weights.append([weights[0][1], 0])
|
|
|
|
self.weight_bones.append([weights[0][0], 0])
|
|
|
|
self.weight_bones.append([weight_remap[weights[0][0]], weight_remap[weights[0][0]]])
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self.weights.append([weights[0][1], weights[1][1]])
|
|
|
|
self.weights.append([weights[0][1], weights[1][1]])
|
|
|
|
self.weight_bones.append([weights[0][0], weights[1][0]])
|
|
|
|
self.weight_bones.append([weight_remap[weights[0][0]], weight_remap[weights[1][0]]])
|
|
|
|
#Convert faces
|
|
|
|
#Convert faces
|
|
|
|
texture_index = None
|
|
|
|
texture_index = None
|
|
|
|
texture_count = 0
|
|
|
|
texture_count = 0
|
|
|
|