From 4a1328af57d91e18df12e3d7e05286bf86f57457 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Sat, 15 Feb 2020 11:32:36 +1100 Subject: [PATCH] Update make_shape_2d_from_blend: for 2.8x --- utils/make_shape_2d_from_blend.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/utils/make_shape_2d_from_blend.py b/utils/make_shape_2d_from_blend.py index 3b03144..e914dd8 100644 --- a/utils/make_shape_2d_from_blend.py +++ b/utils/make_shape_2d_from_blend.py @@ -34,14 +34,11 @@ def curve_to_loops(ob): import bmesh cu = ob.data - # Support 2.7x & 2.8x - if bpy.app.version >= (2, 8): - me = ob.to_mesh(bpy.context.scene, bpy.context.view_layer, True, 'PREVIEW') - else: - me = ob.to_mesh(bpy.context.scene, True, 'PREVIEW', calc_tessface=False) - + me = ob.to_mesh() bm = bmesh.new() bm.from_mesh(me) + me = ob.to_mesh_clear() + bmesh.ops.beautify_fill(bm, faces=bm.faces, edges=bm.edges) edges = bm.edges[:] @@ -75,7 +72,6 @@ def curve_to_loops(ob): ) data_all.append((points, f.material_index)) bm.free() - bpy.data.meshes.remove(me) return data_all -- GitLab