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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-07-02 23:17:34 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-07-02 23:17:34 +0400
commita30dc7c74eb2f02b928bea9f74209b301c9ceee6 (patch)
tree61f3a755eb31bd5c3c6f288718ef12efa9b8370e /source/blender/blenkernel/intern/particle_system.c
parentd6c14ed855ee2a30233b61d87c153d1d00107081 (diff)
Fix #35966: remesh modifier + particle use modifier stack option did not work
well together.
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index ec45c9eef40..9840852ad7e 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -421,23 +421,24 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
continue;
}
- if (psys->part->from == PART_FROM_VERT) {
- if (pa->num < totelem && nodearray[pa->num])
- pa->num_dmcache= GET_INT_FROM_POINTER(nodearray[pa->num]->link);
+ if (use_modifier_stack) {
+ if (pa->num < totelem)
+ pa->num_dmcache = DMCACHE_ISCHILD;
else
pa->num_dmcache = DMCACHE_NOTFOUND;
}
- else { /* FROM_FACE/FROM_VOLUME */
- /* Note that sometimes the pa->num is over the nodearray size, this is bad, maybe there is a better place to fix this,
- * but for now passing NULL is OK. every face will be searched for the particle so its slower - Campbell */
- if (use_modifier_stack) {
+ else {
+ if (psys->part->from == PART_FROM_VERT) {
if (pa->num < totelem && nodearray[pa->num])
- pa->num_dmcache = GET_INT_FROM_POINTER(nodearray[pa->num]->link);
+ pa->num_dmcache= GET_INT_FROM_POINTER(nodearray[pa->num]->link);
else
pa->num_dmcache = DMCACHE_NOTFOUND;
}
- else
+ else { /* FROM_FACE/FROM_VOLUME */
+ /* Note that sometimes the pa->num is over the nodearray size, this is bad, maybe there is a better place to fix this,
+ * but for now passing NULL is OK. every face will be searched for the particle so its slower - Campbell */
pa->num_dmcache= psys_particle_dm_face_lookup(ob, dm, pa->num, pa->fuv, pa->num < totelem ? nodearray[pa->num] : NULL);
+ }
}
}