Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2009-02-21 15:15:57 +0300
committerAndre Susano Pinto <andresusanopinto@gmail.com>2009-02-21 15:15:57 +0300
commita3b684d69878eaff3e0ad475264485419e0c029f (patch)
tree3bad2934a7b44cf007090fb6184a3d57f8174359 /source
parentf87a399978e81e96a711347b1dee66dbbbd362d5 (diff)
[#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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/modifier.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 6bdd395a2ac..566a139f72c 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -6380,20 +6380,11 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
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);