Triangulation problem ?

Hi - I’m new to the Blender Python API so apologies if this is a newb problem. I am writing my own exporter and everything is going fine except that when I triangulate a mesh it doesn’t seem to change any of the polygon values I get back from the API.

I’m using 2.62.3 BTW… latest build from CVS

For instance… If I take the default cube and assign the object to ‘cube’, then I take the length of the polygons container I get 6.

>>> cube =[1]
>>> len( )


OK. I then triangulate the cube (CTRL-t) so that I’m now dealing with triangles…

>>> len( )


Huh ? The cube is not 6 quads anymore, it is 12 triangles… I’m obviously doing something really dumb… can anyone point me in the direction of an explanation ?

Same things happens when I look at the edges… before triangulation there are 12 edges, but after triangulation there are still 12 edges… ?


After some more digging it seems that the bmesh module is probably the best way for me to go.

did you try


after ctrl-t ?

anyway, i’ve got the same problem with vertexcolors edited with bpy. As you said, bmesh module is probably the best to go…

That did the trick - Thanks !