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:
authorSpivak Vladimir (cwolf3d) <cwolf3d@gmail.com>2020-01-07 23:16:35 +0300
committerSpivak Vladimir (cwolf3d) <cwolf3d@gmail.com>2020-01-07 23:16:35 +0300
commit47612b6e007ece4a5b0982d33462ec1e94efe7a4 (patch)
treed72ff5380f1ef4aa1c0ebdf962d18a8dc2702ed8 /mesh_looptools.py
parent75784ccbd44faf72d58314e338e75346e5cb610c (diff)
Fix T72951: LoopTools Curve : "Boundaries" checkbox not working when in closed loop
Diffstat (limited to 'mesh_looptools.py')
-rw-r--r--mesh_looptools.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/mesh_looptools.py b/mesh_looptools.py
index 11b234ac..62d3b9be 100644
--- a/mesh_looptools.py
+++ b/mesh_looptools.py
@@ -23,7 +23,7 @@
bl_info = {
"name": "LoopTools",
"author": "Bart Crouch, Vladimir Spivak (cwolf3d)",
- "version": (4, 7, 0),
+ "version": (4, 7, 1),
"blender": (2, 80, 0),
"location": "View3D > Sidebar > Edit Tab / Edit Mode Context Menu",
"warning": "",
@@ -2324,8 +2324,16 @@ def curve_cut_boundaries(bm_mod, loops):
cut_loops = []
for loop, circular in loops:
if circular:
- # don't cut
- cut_loops.append([loop, circular])
+ selected = [bm_mod.verts[v].select for v in loop]
+ first = selected.index(True)
+ selected.reverse()
+ last = -selected.index(True)
+ if last == 0:
+ if len(loop[first:]) < len(loop)/2:
+ cut_loops.append([loop[first:], False])
+ else:
+ if len(loop[first:last]) < len(loop)/2:
+ cut_loops.append([loop[first:last], False])
continue
selected = [bm_mod.verts[v].select for v in loop]
first = selected.index(True)