added python path for blender runs

This commit is contained in:
Stephen McQuay 2011-03-23 11:47:30 -06:00
parent 2941a255c7
commit ba5280c17b
2 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,7 @@ default_config = {
'level': 'debug', 'level': 'debug',
'size' : 102400, 'size' : 102400,
'logbackup': 10, 'logbackup': 10,
'pypath': None,
} }
with open(os.path.expanduser('~/.config/interp.json')) as config_file: with open(os.path.expanduser('~/.config/interp.json')) as config_file:

View File

@ -1,12 +1,16 @@
from interp import config
import sys
sys.path.append(config['pypath'])
from Blender import * from Blender import *
import bpy import bpy
from grid.DDD import rect_grid from interp.grid.DDD import rect_grid
g = rect_grid(10, 10, 20) g = rect_grid(10, 10, 20)
me = bpy.data.meshes.new('points') me = bpy.data.meshes.new('points')
me.verts.extend(g.points) me.verts.extend(g.verts)
# me.faces.extend([i.verts for i in p.faces.itervalues()]) # me.faces.extend([i.verts for i in p.faces.itervalues()])
scn = bpy.data.scenes.active scn = bpy.data.scenes.active
ob = scn.objects.new(me, 'points_obj') ob = scn.objects.new(me, 'points_obj')