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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-02-19 21:44:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-19 21:44:36 +0400
commit85d99737b5753fd845c3fce0f08e6b5205530195 (patch)
treee879cb3fc4c4409a0d692b4aa869cef16878f054 /source/blender/blenkernel/intern/particle.c
parentfd89fa15c5a9ffabb8fc140f46b6dd7cbc36c61a (diff)
fix for bug where particle system would fail when the original mesh had no tessface's
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index e4afff5380b..38a73daab2a 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -806,7 +806,7 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot)
mface= dm->getTessFaceArray(dm);
origindex= dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
totface= dm->getNumTessFaces(dm);
- totorigface= me->totface;
+ totorigface= me->totpoly;
if(totface == 0 || totorigface == 0)
return tot;
@@ -2937,6 +2937,11 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
vg_length = psys_cache_vgroup(psmd->dm, psys, PSYS_VG_LENGTH);
}
+ /* ensure we have tessfaces to be used for mapping */
+ if (part->from != PART_FROM_VERT) {
+ DM_ensure_tessface(psmd->dm);
+ }
+
/*---first main loop: create all actual particles' paths---*/
LOOP_SHOWN_PARTICLES {
if(!psys->totchild) {