Remove checks for older Blender versions

This commit is contained in:
Campbell Barton
2016-08-01 09:09:28 +10:00
parent 3ce7865694
commit 4744a96bea
4 changed files with 7 additions and 10 deletions

View File

@ -30,7 +30,6 @@ def add_line_to_bisection(self):
me = obj.data me = obj.data
bm = bmesh.from_edit_mesh(me) bm = bmesh.from_edit_mesh(me)
if hasattr(bm.verts, "ensure_lookup_table"):
bm.verts.ensure_lookup_table() bm.verts.ensure_lookup_table()
bm.edges.ensure_lookup_table() bm.edges.ensure_lookup_table()

View File

@ -40,8 +40,6 @@ def add_vertex_to_intersection():
iv = (iv[0] + iv[1]) / 2 iv = (iv[0] + iv[1]) / 2
bm.verts.new(iv) bm.verts.new(iv)
# precaution?
if hasattr(bm.verts, "ensure_lookup_table"):
bm.verts.ensure_lookup_table() bm.verts.ensure_lookup_table()
bm.verts[-1].select = True bm.verts[-1].select = True

View File

@ -32,6 +32,7 @@ def order_points(edge, point_list):
''' order these edges from distance to v1, then ''' order these edges from distance to v1, then
sandwich the sorted list with v1, v2 ''' sandwich the sorted list with v1, v2 '''
v1, v2 = edge v1, v2 = edge
def dist(co): def dist(co):
return (v1 - co).length return (v1 - co).length
point_list = sorted(point_list, key=dist) point_list = sorted(point_list, key=dist)
@ -75,7 +76,6 @@ def can_skip(closest_points, vert_vectors):
def get_intersection_dictionary(bm, edge_indices): def get_intersection_dictionary(bm, edge_indices):
if hasattr(bm.verts, "ensure_lookup_table"):
bm.verts.ensure_lookup_table() bm.verts.ensure_lookup_table()
bm.edges.ensure_lookup_table() bm.edges.ensure_lookup_table()