I can't figure out if there's something wrong with blender or my script. So far I have this little code, which does its job if the file which is parsing is not SO big:
import bpy
fh = open('coordinates.txt')
for line in fh:
coo = line.split()
x = float(coo[0])
y = float(coo[1])
z = float(coo[2])
bpy.ops.mesh.primitive_cube_add(location=(x, y, z))
bpy.ops.transform.resize(value=(1, 1, 1))
When I try coordinates.txt with few lines, it works and it creates the cubes, but when I do it with its original size of around 215000 lines, Blender stops responding and it stays like that forever.
Has anyone any idea of what I can do to avoid it? (Reducing the file's lines is not an option )
Btw, coordinates.txt has this format
335.0091 2433.163 -126.9688
351.7849 2352.089 -126.9688
-493 -808 128.5834
-1076 -843 132.8153
160.123 2369.68 -126.9688
-760.663 -836.174 132.07
182.9523 2438.389 -126.9688
-332 -754 88.59317
259.0002 2480.136 -126.9688
-857.507 -738.361 130.3733
338.3209 2430.226 -126.9688
353.1722 2349.083 -126.9688
-493 -808 128.5834
-1076 -843 132.8153
