addFace() crash under 2.23


(meestaplu) #1

I am experimenting with using Blender to visualize 3D graphs - I wrote a script today that imports a series of points arranged in a grid.

The problem:

I need to import something like 60000 data points, which is no problem, but my for loop that adds quadrilateral faces using addFace() slows to a crawl around the 10th row of 200 (each row of vertices has 300 columns).

Is this a problem with the API, or is my script flawed? I connect the mesh to an object before adding vertices or faces - would that present a problem? Also, if I try leaveEditMode() and then enterEditMode() to maybe clear that mode’s data buffer, the program crashes on the next face added.

Do any of you Python gurus know what’s happening?


(jms) #2

Blender210 is not very clear when you try to add “things” in a mesh, use Blender.NMesh instead:
http://jmsoler.free.fr/didacticiel/blender/tutor/english/python_script01.htm
http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_pythonraw2mesh.htm

jm