Fix for [#27008] Replacing particle hair with group objects - viewport does not match...
authorJanne Karhu <jhkarh@gmail.com>
Tue, 19 Apr 2011 13:06:08 +0000 (13:06 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Tue, 19 Apr 2011 13:06:08 +0000 (13:06 +0000)
* Object size was determined from the first and second last cache key by accident, when it should have been first and last cache keys that were used.

source/blender/blenkernel/intern/particle.c

index 662929f95fc952138f362bc23048ca19ec5a908b..52b8cc194f7070b7e5b7e1bf9ff0b1b12857bb55 100644 (file)
@@ -4371,7 +4371,7 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa
        float loc[3], nor[3], vec[3], side[3], len, obrotmat[4][4], qmat[4][4];
        float xvec[3] = {-1.0, 0.0, 0.0}, q[4], nmat[3][3];
 
-       sub_v3_v3v3(vec, (cache+cache->steps-1)->co, cache->co);
+       sub_v3_v3v3(vec, (cache+cache->steps)->co, cache->co);
        len= normalize_v3(vec);
 
        if(psys->part->rotmode) {