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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-05-13 21:50:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-05-13 21:50:47 +0400
commitd790049639eb4b2517cfaf3d7a3e1fe2e2b21281 (patch)
tree635cd2b1651169175cdd9e2ed7e48561d629be26 /release/scripts
parent3be8e53c100383067168ecd131da9c678d538582 (diff)
fixed, bugs with selection & remove doubles.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/bpymodules/BPyMesh_redux.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/release/scripts/bpymodules/BPyMesh_redux.py b/release/scripts/bpymodules/BPyMesh_redux.py
index f2c3a223eb7..ec817da92cc 100644
--- a/release/scripts/bpymodules/BPyMesh_redux.py
+++ b/release/scripts/bpymodules/BPyMesh_redux.py
@@ -41,6 +41,7 @@ class collapseEdge(object):
def redux(ob, factor=0.5):
me= ob.getData(mesh=1)
+
# BUG MUST REMOVE GROUPS
if factor>1.0 or factor<0.0 or len(me.faces)<4:
return
@@ -56,10 +57,12 @@ def redux(ob, factor=0.5):
for v in me.verts:
v.hide=0
-
while target_face_count <= len(me.faces):
BPyMesh.meshCalcNormals(me)
+ for v in me.verts:
+ v.sel= False
+
# Backup colors
if me.faceUV:
orig_texface= [[(uv_key(f.uv[i]), col_key(f.col[i])) for i in xrange(len(f.v))] for f in me.faces]
@@ -283,7 +286,7 @@ def redux(ob, factor=0.5):
if not new_location_count or\
new_location.x!=new_location.x or\
(new_location-between).length > (ced.length/2):
- new_location= between
+ new_location= between
else:
new_location= new_location * (1.0/new_location_count)
new_location = (new_location + between) * 0.5
@@ -296,7 +299,7 @@ def redux(ob, factor=0.5):
# Since the list is ordered we can stop once the first non collapsed edge if sound.
if not ced.collapse_loc:
break
-
+ ced.v1.sel= ced.v2.sel= True
ced.v1.co= ced.v2.co= ced.collapse_loc
doubles= me.remDoubles(0.0001)