editmesh accessor functions. most editmesh access now goes through:
[blender.git] / source / blender / blenkernel / intern / exotic.c
index 249d3db942328353abab3784b6d096b2a4b4de96..ae423cdd3aa6e1fe9bafae90e0af087ca23adfca 100644 (file)
@@ -2388,7 +2388,7 @@ void write_stl(Scene *scene, char *str)
 static void write_videoscape_mesh(Scene *scene, Object *ob, char *str)
 {
        Mesh *me= ob->data;
-       EditMesh *em = me->edit_mesh;
+       EditMesh *em = EM_GetEditMesh(me);
        Material *ma;
        MFace *mface;
        FILE *fp;
@@ -2489,6 +2489,8 @@ static void write_videoscape_mesh(Scene *scene, Object *ob, char *str)
        }
        
        fclose(fp);
+
+       if (em) EM_EndEditMesh(em);
        
 }