Revision: 19071 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19071 Author: jaguarandi Date: 2009-02-21 13:15:57 +0100 (Sat, 21 Feb 2009)
Log Message: ----------- [#18277] Segfault crash by editing mesh with subsurf+ParticleInstance modifiers particleInstanceModifier_applyModifier uses getVertCo,which is not implemented by ccgDM. getVertCo was used to simply perform a min/max, so it was fixed to use the apropriate min/max dm->getMinMax(dm, min_r, max_r); Maybe the fact ccgDM doesn't implements getVertCo/getVertNo is a bug, since it implements every other DM function and its strange those are left out. Modified Paths: -------------- trunk/blender/source/blender/blenkernel/intern/modifier.c Modified: trunk/blender/source/blender/blenkernel/intern/modifier.c =================================================================== --- trunk/blender/source/blender/blenkernel/intern/modifier.c 2009-02-21 11:22:06 UTC (rev 19070) +++ trunk/blender/source/blender/blenkernel/intern/modifier.c 2009-02-21 12:15:57 UTC (rev 19071) @@ -6380,20 +6380,11 @@ psys->lattice=psys_get_lattice(ob, psys); if(psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED)){ - float co[3]; - for(i=0; i< totvert; i++){ - dm->getVertCo(dm,i,co); - if(i==0){ - min_co=max_co=co[track]; - } - else{ - if(co[track]<min_co) - min_co=co[track]; - if(co[track]>max_co) - max_co=co[track]; - } - } + float min_r[3], max_r[3]; + dm->getMinMax(dm, min_r, max_r); + min_co=min_r[track]; + max_co=max_r[track]; } result = CDDM_from_template(dm, maxvert,dm->getNumEdges(dm)*totpart,maxface); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs