Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / blender / makesrna / intern / rna_meta.c
index f3160a7..7b14a7a 100644 (file)
@@ -57,12 +57,14 @@ static void rna_MetaBall_update_data(bContext *C, PointerRNA *ptr)
        MetaBall *mb= ptr->id.data;
        Object *ob;
 
-       for(ob=bmain->object.first; ob; ob= ob->id.next)
-               if(ob->data == mb)
+       for(ob=bmain->object.first; ob; ob= ob->id.next) {
+               if(ob->data == mb) {
                        copy_mball_properties(scene, ob);
-
-       DAG_id_flush_update(&mb->id, OB_RECALC_DATA);
-       WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+                       /* XXX this will loop over all objects again (slow) */
+                       DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+                       WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+               }
+       }
 }
 
 #else