merge with 2.5 (not trunk, last merge message said that on accident) at r22252
[blender.git] / source / blender / blenkernel / intern / object.c
index 150a5aa97aa9f5b6b70db5261c4f8210d6258712..160922e39547232964101480f904addbc2bbae26 100644 (file)
@@ -98,6 +98,7 @@
 #include "BKE_lattice.h"
 #include "BKE_library.h"
 #include "BKE_mesh.h"
+#include "BKE_tessmesh.h"
 #include "BKE_mball.h"
 #include "BKE_modifier.h"
 #include "BKE_object.h"
@@ -865,7 +866,7 @@ void free_lamp(Lamp *la)
        
        BKE_free_animdata((ID *)la);
 
-       curvemapping_free(la->curfalloff);
+       curvemapping_free(la->curfalloff); 
        
        BKE_previewimg_free(&la->preview);
        BKE_icon_delete(&la->id);
@@ -2328,12 +2329,11 @@ void object_handle_update(Scene *scene, Object *ob)
                        
                        /* includes all keys and modifiers */
                        if(ob->type==OB_MESH) {
-                               EditMesh *em = BKE_mesh_get_editmesh(ob->data);
+                               BMEditMesh *em = ((Mesh*)ob->data)->edit_btmesh;
 
-                                       // here was vieweditdatamask? XXX
+                               // here was vieweditdatamask? XXX
                                if(ob==scene->obedit) {
                                        makeDerivedMesh(scene, ob, em, CD_MASK_BAREMESH);
-                                       BKE_mesh_end_editmesh(ob->data, em);
                                } else
                                        makeDerivedMesh(scene, ob, NULL, CD_MASK_BAREMESH);
                        }