Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-08-01 02:09:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-08-01 02:09:28 +0300
commit4744a96bea1afd11b70b2f1932ca2072a0f17dc9 (patch)
treee1b603419e0a9970eb891f77491f7d9dcbc75c23 /mesh_tiny_cad
parent3ce78656947b1b03125f5ca588a50878dc1a0e2a (diff)
Remove checks for older Blender versions
Diffstat (limited to 'mesh_tiny_cad')
-rw-r--r--mesh_tiny_cad/BIX.py5
-rw-r--r--mesh_tiny_cad/V2X.py4
-rw-r--r--mesh_tiny_cad/VTX.py2
-rw-r--r--mesh_tiny_cad/XALL.py6
4 files changed, 7 insertions, 10 deletions
diff --git a/mesh_tiny_cad/BIX.py b/mesh_tiny_cad/BIX.py
index 4f021896..faac5212 100644
--- a/mesh_tiny_cad/BIX.py
+++ b/mesh_tiny_cad/BIX.py
@@ -30,9 +30,8 @@ def add_line_to_bisection(self):
me = obj.data
bm = bmesh.from_edit_mesh(me)
- if hasattr(bm.verts, "ensure_lookup_table"):
- bm.verts.ensure_lookup_table()
- bm.edges.ensure_lookup_table()
+ bm.verts.ensure_lookup_table()
+ bm.edges.ensure_lookup_table()
edges = [e for e in bm.edges if e.select and not e.hide]
diff --git a/mesh_tiny_cad/V2X.py b/mesh_tiny_cad/V2X.py
index 69eaeb8b..c230f4a2 100644
--- a/mesh_tiny_cad/V2X.py
+++ b/mesh_tiny_cad/V2X.py
@@ -40,9 +40,7 @@ def add_vertex_to_intersection():
iv = (iv[0] + iv[1]) / 2
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
bmesh.update_edit_mesh(me)
diff --git a/mesh_tiny_cad/VTX.py b/mesh_tiny_cad/VTX.py
index 8a8c4e8d..5ad035b2 100644
--- a/mesh_tiny_cad/VTX.py
+++ b/mesh_tiny_cad/VTX.py
@@ -106,7 +106,7 @@ def perform_vtx(bm, pt, edges, pts, vertex_indices):
def do_vtx_if_appropriate(bm, edges):
vertex_indices = cm.get_vert_indices_from_bmedges(edges)
-
+
# test 1, are there shared vers? if so return non-viable
if not len(set(vertex_indices)) == 4:
return {'SHARED_VERTEX'}
diff --git a/mesh_tiny_cad/XALL.py b/mesh_tiny_cad/XALL.py
index c1605393..8cd25a5c 100644
--- a/mesh_tiny_cad/XALL.py
+++ b/mesh_tiny_cad/XALL.py
@@ -32,6 +32,7 @@ def order_points(edge, point_list):
''' order these edges from distance to v1, then
sandwich the sorted list with v1, v2 '''
v1, v2 = edge
+
def dist(co):
return (v1 - co).length
point_list = sorted(point_list, key=dist)
@@ -75,9 +76,8 @@ def can_skip(closest_points, vert_vectors):
def get_intersection_dictionary(bm, edge_indices):
- if hasattr(bm.verts, "ensure_lookup_table"):
- bm.verts.ensure_lookup_table()
- bm.edges.ensure_lookup_table()
+ bm.verts.ensure_lookup_table()
+ bm.edges.ensure_lookup_table()
permutations = get_valid_permutations(bm, edge_indices)