[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57934] trunk/blender/source/blender/ blenkernel/intern/particle_system.c: Fix #35966: remesh modifier + particle use modifier stack option did not work
Brecht Van Lommel
brechtvanlommel at pandora.be
Tue Jul 2 21:17:35 CEST 2013
Revision: 57934
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57934
Author: blendix
Date: 2013-07-02 19:17:34 +0000 (Tue, 02 Jul 2013)
Log Message:
-----------
Fix #35966: remesh modifier + particle use modifier stack option did not work
well together.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/particle_system.c
Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c 2013-07-02 17:21:40 UTC (rev 57933)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c 2013-07-02 19:17:34 UTC (rev 57934)
@@ -421,23 +421,24 @@
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);
+ }
}
}
More information about the Bf-blender-cvs
mailing list