smbinterp/tools/blender/plot.py
Stephen Mardson McQuay 97ed85eda7 found a working blender plot script
--HG--
rename : bin/plot.py => tools/blender/plot.py
2011-03-28 11:48:17 -06:00

16 lines
382 B
Python

from interp import config
import sys
sys.path.append(config['pypath'])
import bpy
import pickle
points = pickle.load(open('/tmp/points.p', 'r'))
faces = pickle.load(open('/tmp/cells.p', 'r'))
# faces = [faces[i] for i in faces]
me = bpy.data.meshes.new('points')
me.verts.extend(points)
me.faces.extend(faces)
scn = bpy.data.scenes.active
ob = scn.objects.new(me, 'points_obj')