提交 9c2cc81f 编写于 作者: A alteredq

Added to OBJ converter warning and skipping of morphs with different numbers...

Added to OBJ converter warning and skipping of morphs with different numbers of vertices than the original model.
上级 0f3ba92d
......@@ -817,6 +817,8 @@ def convert_ascii(infile, morphfiles, outfile):
elif ALIGN == "top":
top(vertices)
n_vertices = len(vertices)
normals_string = ""
if SHADING == "smooth":
normals_string = ",".join(generate_normal(n) for n in normals)
......@@ -835,15 +837,19 @@ def convert_ascii(infile, morphfiles, outfile):
morphFaces, morphVertices, morphUvs, morphNormals, morphMaterials, morphMtllib = parse_obj(normpath)
if ALIGN == "center":
center(morphVertices)
elif ALIGN == "bottom":
bottom(morphVertices)
elif ALIGN == "top":
top(morphVertices)
morphData.append((get_name(name), morphVertices ))
print name, len(morphVertices)
n_morph_vertices = len(morphVertices)
if n_vertices != n_morph_vertices:
print "WARNING: skipping morph [%s] with different number of vertices [%d] than the original model [%d]" % (name, n_morph_vertices, n_vertices)
else:
if ALIGN == "center":
center(morphVertices)
elif ALIGN == "bottom":
bottom(morphVertices)
elif ALIGN == "top":
top(morphVertices)
morphData.append((get_name(name), morphVertices ))
print "adding [%s] with %d vertices" % (name, len(morphVertices))
morphTargets = ""
if len(morphData):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册