Hi Everybody,
Just hoping someone with more familiarity with the blender codebase can give me some pointers on how to debug something.
I managed to let blender save an invalid mesh to a blend file. The mesh displays fine in object mode, but as soon as I switch to editmode blender crashes.
I tracked it down to an edge of the mesh having an invalid node number, which is way larger than the number of vertices in the mesh.
Now I’d like to track down how the mesh ended up in this state (it happened while experimenting with some scripting), so I was wondering if there maybe was a build option to make blender check the validity of a mesh object. Or maybe a python command I can run from a script to check the validity of the vertex ids in the edge/face lists. Then I could insert it into my script periodically.
technical details:
in BM_mesh_bm_from_me ()
me->medge[i].v1 > me->totedge,
I’d like some way to notice immediately when that happens (as opposed to after saving).
If someone could point me in the right direction as to in which header file I should look for the declaration of struct Mesh that would be helpful as well, I’m a bit lost there as well…