diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-07 04:32:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-07 04:32:45 +0400 |
commit | e0aca888deeeeeba86959ed974619140667db1fb (patch) | |
tree | 53bb2482465c42b59467c52f831fe963ea2ea3c6 /release/scripts | |
parent | 0a2e0b28bfc7ebcdbdcaf83c258744babbe29ef8 (diff) |
bugfix [#23464] Crash on Tab
OBJ importing edges would produce corrupt meshes because face edges were not created.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/op/io_scene_obj/import_obj.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/release/scripts/op/io_scene_obj/import_obj.py b/release/scripts/op/io_scene_obj/import_obj.py index a5605d23cb3..c91eb02f4d9 100644 --- a/release/scripts/op/io_scene_obj/import_obj.py +++ b/release/scripts/op/io_scene_obj/import_obj.py @@ -700,8 +700,10 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v del me_faces # del ALPHA - if CREATE_EDGES: + if CREATE_EDGES and not edges: + CREATE_EDGES = False + if CREATE_EDGES: me.edges.add(len(edges)) # edges should be a list of (a, b) tuples @@ -744,7 +746,7 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v # me_edges[ed].flag |= SHARP # del SHARP - me.update() + me.update(calc_edges=CREATE_EDGES) # me.calcNormals() ob= bpy.data.objects.new("Mesh", me) |