diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-02 12:33:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-02 12:33:47 +0300 |
commit | d851b38185c1777287a19618c7fd103ad18e15f3 (patch) | |
tree | 823044f1025d630c56021d7f711a2ad05b48292c /release/scripts/modules | |
parent | cf67ba848f2f42e0b7320aa0654ba89bd14a1416 (diff) |
Cleanup: improve internal function name in 'ngon_tessellate'
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy_extras/mesh_utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index f70f1eacead..cef03a1eb08 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -268,7 +268,8 @@ def ngon_tessellate(from_data, indices, fix_loops=True, debug_print=True): # Manhatten length of a vector, faster then length. return abs(co[0]) + abs(co[1]) + abs(co[2]) - def vert_treplet(v, i): + def vert_from_vector_with_extra_data(v, i): + # Calculate data per-vector, for reuse. return v, vector_to_tuple(v, 6), i, mlen(v) def ed_key_mlen(v1, v2): @@ -298,12 +299,12 @@ def ngon_tessellate(from_data, indices, fix_loops=True, debug_print=True): if type(from_data) in {tuple, list}: verts = [ - vert_treplet(Vector(from_data[i]), ii) + vert_from_vector_with_extra_data(Vector(from_data[i]), ii) for ii, i in enumerate(indices) ] else: verts = [ - vert_treplet(from_data.vertices[i].co, ii) + vert_from_vector_with_extra_data(from_data.vertices[i].co, ii) for ii, i in enumerate(indices) ] |