[ create a new paste ] login | about

Link: http://codepad.org/fOhppfRE    [ raw code | fork ]

Python, pasted on Oct 15:
#for blender 2.49b - 
#頂点揃え? by ミングスレの名無し

import bpy
import Blender
from Blender import *

fe = Window.EditMode()
if fe: Window.EditMode(0)

obj = Scene.getCurrent().objects
for o in obj:
	if o.type == "Mesh":
		dat = o.getData()
		for v in dat.verts:
			print "org: x=%f, y=%f, z=%f" % (v.co.x, v.co.y, v.co.z)
			nx = round(v.co.x,3)
			ny = round(v.co.y,3)
			nz = round(v.co.z,3)
			v.co.x = nx
			v.co.y = ny
			v.co.z = nz
			print "=> mod: x=%f, y=%f, z=%f" % (v.co.x, v.co.y, v.co.z)
if fe: Window.EditMode(1)


Create a new paste based on this one


Comments: