Poly reduction fixes

Added remove doubles as a keyword option,
Fixed Triangulate (need to select the faces first)
Fixed boundry weighting (defaults reduced boundries first more then
non boundry verts!)
Made face area weighting give better results.
This commit is contained in:
2006-05-27 14:27:52 +00:00
parent e5b39b69d1
commit 8baa88da9b
2 changed files with 45 additions and 30 deletions

View File

@@ -1,11 +1,6 @@
import Blender
import BPyMesh_redux
reload(BPyMesh_redux)
from BPyMesh_redux import redux # seperated because of its size.
def redux(ob, REDUX=0.5, BOUNDRY_WEIGHT=5.0, FACE_AREA_WEIGHT=1.0, FACE_TRIANGULATE=True, DO_UV=True, DO_VCOL=True, DO_WEIGHTS=True):
if REDUX<0 or REDUX>1.0:
raise 'Error, factor must be between 0 and 1.0'
BPyMesh_redux.redux(ob, REDUX, BOUNDRY_WEIGHT, FACE_AREA_WEIGHT, FACE_TRIANGULATE, DO_UV, DO_VCOL, DO_WEIGHTS)
def meshWeight2Dict(me):
''' Takes a mesh and return its group names and a list of dicts, one dict per vertex.