merge with trunk/2.5 at r24378
[blender-staging.git] / source / blender / editors / physics / particle_edit.c
index 438150b25ac0f729fa3194ffaef7acc48fa7a60b..e3f25a9dc43c2801f776420b63efb84ae719df87 100644 (file)
@@ -1024,7 +1024,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
 
        BLI_kdtree_free(edit->emitter_field);
 
-       totface=dm->getNumFaces(dm);
+       totface=dm->getNumTessFaces(dm);
        totvert=dm->getNumVerts(dm);
 
        edit->emitter_cosnos=MEM_callocN(totface*6*sizeof(float),"emitter cosnos");
@@ -1036,7 +1036,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
 
        mvert=dm->getVertDataArray(dm,CD_MVERT);
        for(i=0; i<totface; i++, vec+=6, nor+=6) {
-               mface=dm->getFaceData(dm,i,CD_MFACE);
+               mface=dm->getTessFaceData(dm,i,CD_MFACE);
 
                mvert=dm->getVertData(dm,mface->v1,CD_MVERT);
                VECCOPY(vec,mvert->co);
@@ -3322,13 +3322,13 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
                        recalc_lengths(edit);
 
                if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_CUT) && (added || removed)) {
-                       if(pset->brushtype == PE_BRUSH_ADD && (pset->flag & PE_X_MIRROR))
-                               PE_mirror_x(scene, ob, 1);
+                               if(pset->brushtype == PE_BRUSH_ADD && (pset->flag & PE_X_MIRROR))
+                                       PE_mirror_x(scene, ob, 1);
 
-                       update_world_cos(ob,edit);
-                       psys_free_path_cache(NULL, edit);
-                       DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
-               }
+                               update_world_cos(ob,edit);
+                               psys_free_path_cache(NULL, edit);
+                               DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+                       }
                else
                        PE_update_object(scene, ob, 1);