forked from bartvdbraak/blender
Was crashing the import_obj script when using Python 2.3.
Python 2.4+ supports large list processing with generators, but Python 2.3 will break if you use that syntax. Until we depend on the newer versions, I have commented out the generator syntax and only use the list-comprehension type instead.
This commit is contained in:
parent
627261da50
commit
8292e4ac1a
@ -314,11 +314,10 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v
|
||||
|
||||
elif not face_vert_tex_indicies: # images that are -1 are lines, a bit obscure but works.
|
||||
if CREATE_EDGES:
|
||||
try: # python 2.4+
|
||||
edges.extend( (face_vert_loc_indicies[i], face_vert_loc_indicies[i+1]) for i in xrange(len_face_vert_loc_indicies-1) )
|
||||
except: # python 2.3
|
||||
edges.extend( [(face_vert_loc_indicies[i], face_vert_loc_indicies[i+1]) for i in xrange(len_face_vert_loc_indicies-1)] )
|
||||
|
||||
# generators are better in python 2.4+ but can't be used in 2.3
|
||||
# edges.extend( (face_vert_loc_indicies[i], face_vert_loc_indicies[i+1]) for i in xrange(len_face_vert_loc_indicies-1) )
|
||||
edges.extend( [(face_vert_loc_indicies[i], face_vert_loc_indicies[i+1]) for i in xrange(len_face_vert_loc_indicies-1)] )
|
||||
|
||||
faces.pop(f_idx)
|
||||
else:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user