I wrote a procedural generator and it saves the output for the Meshes in a text file. Then I wrote a python3/Blender script which parses through that text file and creates the meshes from the input. The parsing itself is not fast but definitely within reasonable time.

However when I run blender (blender --python parsetext.py) with more than ~12000 Polygons, Blender turns grey on startup and stops responding (My computer turns quiet - Blender seems to stop doing anything). When I run the script with slightly fewer Polygons it works just fine and also the rendering / in-Program movement works flawless.

It seems like there is some kind of Limit in how many Objects Blender can save or that Blender adds Objects in a weird way (recursively...?!?! recursion depth reached or something along those lines maybe...!?!?).

Has anybody else had this problem? It really seems like Blender should be able to handle more than ~12000 Polygons.

Else, could someone think of a way to save/load my meshes from the script more effectively? (I can't find anything useful on the .blend file format though)


I tried following some advice concerning merging objects. Before that, each Polygon was created with createpolygon() with a list of coordinates and a texture. The object was then linked to the scene.

Now createbuilding() gets called which calls createpolygon a few times but then tries to join the objects. However, I get a segmentation fault error.

def createpolygon(coords,texture,length):
    me.from_pydata(coords,[], [range(length)])
    return ob

def createbuilding(obj,texture):

    for me in obj:
        ob=createpolygon(me, texture, len(me))

    bpy.context.scene.objects.active = meshes[0]


1 Answer 1


If you are trying to add one object per polygon, then yes, it is a quite bad idea with current Blender - adding object can indeed be O² because each time you add one, Blender has to check all (or at least a large subset) of existing ones against name collision. Would suggest to add your 12000 polygons in a single object…

Further than that, it's pretty much impossible to help you without having access to the code.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .