All pastes #941370 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-03-13 17:34 UTC
rendered paste body
			# normalize all weights
			for vweights in mesh_bones:
				if vweights:
					tot = 0.0
					for w, bone_index in vweights:
						tot+=w
					for i in xrange(vweights):
						vweights[i] = (vweights[i][0]/tot, vweights[i][1])