[Bf-blender-cvs] [1971bf660dc] temp-lanpr-cleanup: Cleanup: MOD_explode: Sanitize code some more.
Bastien Montagne
noreply at git.blender.org
Wed Sep 25 03:50:17 CEST 2019
Commit: 1971bf660dc470d5455c509423665490a74144b8
Author: Bastien Montagne
Date: Sun Sep 22 18:51:45 2019 +0200
Branches: temp-lanpr-cleanup
https://developer.blender.org/rB1971bf660dc470d5455c509423665490a74144b8
Cleanup: MOD_explode: Sanitize code some more.
This happens to be a non-behavioral change, but previous code here was
*very* confusing, and only ended up generating expected results by mere
chance (since `facepa[i]` == `totpart` in case the face has no (valid)
particle, i.e. `pa == NULL`)...
===================================================================
M source/blender/modifiers/intern/MOD_explode.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index 02008de9a88..5f0bbc8ecf1 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -1058,7 +1058,8 @@ static Mesh *explodeMesh(ExplodeModifierData *emd,
orig_v4 = source.v4;
- if (pa != NULL && cfra < pa->time) {
+ /* Same as above in the first loop over mesh's faces. */
+ if (pa == NULL || cfra < pa->time) {
mindex = totvert + totpart;
}
else {
More information about the Bf-blender-cvs
mailing list