From d0f19b8bc7ab11449cea028106504cacecd94f66 Mon Sep 17 00:00:00 2001 From: hanemile Date: Mon, 19 Mar 2018 20:47:13 +0100 Subject: cleaned up --- src/view.py | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 src/view.py (limited to 'src/view.py') diff --git a/src/view.py b/src/view.py deleted file mode 100644 index a30ec48..0000000 --- a/src/view.py +++ /dev/null @@ -1,48 +0,0 @@ -import bpy -from numpy import genfromtxt -import os -import sys - -directory = "stars/" -# # print(directory) -# -files = [sys.argv[3]] - -# print("### \n\n") -# -# for data_file in os.listdir(directory): -# files.append(data_file) -# print(data_file) -# -# print("### \n\n") - -for data in files: - path = str(directory) + str(data) - print(path) - - verts = genfromtxt(path, delimiter=', ', skip_header=0) - - print(verts) - -# verts = [(-1.0, 1.0, 0.0), (-1.0, -1.0, 0.0), (1.0, -1.0, 0.0), (1.0, 1.0, 0.0)] - - # create mesh and object - mesh = bpy.data.meshes.new(data) - object = bpy.data.objects.new(data,mesh) - - # set mesh location - object.location = bpy.context.scene.cursor_location - bpy.context.scene.objects.link(object) - - # create mesh from python data - mesh.from_pydata(verts,[],[]) - mesh.update(calc_edges=True) - - bpy.ops.object.select_all(action='SELECT') - -for area in bpy.context.screen.areas: - if area.type == 'VIEW_3D': - for region in area.regions: - if region.type == 'WINDOW': - override = {'area': area, 'region': region, 'edit_object': bpy.context.edit_object} -bpy.ops.view3d.view_all(override) -- cgit 1.4.1