Added a polygon reduction function that can poly reduce any mesh and supports UV's as well as bone weights (Thanks to briggs).

Isnt intended to be ultra high quality, more for automatic realtime "Level of Detail" model generation.

BPyMesh.redux(ob, 0.5) # To reduce to about half the polys
This commit is contained in:
2006-05-11 12:42:10 +00:00
parent ea2eb88f97
commit 0497ea57cb
2 changed files with 303 additions and 0 deletions

View File

@@ -1,5 +1,11 @@
import Blender
import BPyMesh_redux
def redux(ob, factor=0.5):
if factor<0 or factor>1.0:
raise 'Error, factor must be between 0 and 1.0'
BPyMesh_redux.redux(ob, factor)
def meshWeight2Dict(me):
''' Takes a mesh and return its group names and a list of dicts, one dict per vertex.
using the group as a key and a float value for the weight.