Permalink
Browse files

Fixed the issue with incorrect indices (due to vertex splitting not w…

…orking correctly)
  • Loading branch information...
rehno-lindeque committed Mar 14, 2011
1 parent d8ceb5a commit dc235de53df079c14992aba008dc572a2a5c1bca
Showing with 1 addition and 3 deletions.
  1. +0 −1 scenejs-pycollada.py
  2. +1 −2 translator.py
View
@@ -130,7 +130,6 @@ def main(argv):
else:
html_output_stream.write(" <script type='text/javascript' src='" + output_file_name + "'></script>\n")
- print output_format
serializer = output_format(output_stream)
#TODO: serializer.tabstring = ' ' * tabsize if tabsize else " "
translate(serializer, collada_obj, debug, verbose)
View
@@ -212,7 +212,7 @@ def translate_geometry(geom):
# Find an entry in the index_map that matches all of the indices of the other vertex attributes
#while vert_index != -1 and not match_index_indices(index_map[vert_index][0], norm_index, texcoord_indexset):
#print str(vert_index) + ": Is " + str(index_map[vert_index][0]) + " == " + str(attr_indexes[1:]) + "?"
- while vert_index != -1 and not (index_map[vert_index][0] == attr_indexes[1:]):
+ while vert_index != -1 and not (index_map[vert_index][0] == attr_indexes[1:] or index_map[vert_index][0] == [-1]):
prev_vert_index = vert_index
vert_index = index_map[vert_index][1]
@@ -242,7 +242,6 @@ def translate_geometry(geom):
if vertex_number > 2:
first_i = len(jssubgeom['indices']) - (vertex_number - 2) * 3
last_i = len(jssubgeom['indices']) - 1
- print "indices: " + str(jssubgeom['indices'])
jssubgeom['indices'].append(jssubgeom['indices'][first_i])
jssubgeom['indices'].append(jssubgeom['indices'][last_i])

0 comments on commit dc235de

Please sign in to comment.