Merge branch 'master' into blender2.8
authorPhilipp Oeser <info@graphics-engineer.com>
Fri, 7 Dec 2018 15:42:36 +0000 (16:42 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Fri, 7 Dec 2018 15:42:36 +0000 (16:42 +0100)
source/blender/modifiers/intern/MOD_particleinstance.c

index 2d5b520e9ca97c0d973dcd0d036dc068d72890ce..db552fa2122bacba3c02bb9f04af7596a2050a6f 100644 (file)
@@ -499,7 +499,7 @@ static Mesh *applyModifier(
                                        const int ml_index = (ml - mloop);
                                        if (mloopcols_index != NULL) {
                                                const int part_index = vert_part_index[ml->v];
-                                               store_float_in_vcol(&mloopcols_index[ml_index], (float)part_index / psys->totpart);
+                                               store_float_in_vcol(&mloopcols_index[ml_index], (float)part_index / (float)(psys->totpart-1));
                                        }
                                        if (mloopcols_value != NULL) {
                                                const float part_value = vert_part_value[ml->v];