Fix T61088: Cycles particle viewport render stuck in loop.
Object to be instanced should not be modified.
This commit is contained in:
parent
7f0e773dcd
commit
7b05b2564d
@ -732,8 +732,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
|
||||
ParticleKey state;
|
||||
ParticleCacheKey *cache;
|
||||
float ctime, scale = 1.0f;
|
||||
float tmat[4][4], mat[4][4], pamat[4][4], vec[3], size = 0.0;
|
||||
float (*obmat)[4];
|
||||
float tmat[4][4], mat[4][4], pamat[4][4], size = 0.0;
|
||||
int a, b, hair = 0;
|
||||
int totpart, totchild;
|
||||
|
||||
@ -901,10 +900,6 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
|
||||
b = a % totcollection;
|
||||
|
||||
ob = oblist[b];
|
||||
obmat = oblist[b]->obmat;
|
||||
}
|
||||
else {
|
||||
obmat = ob->obmat;
|
||||
}
|
||||
|
||||
if (hair) {
|
||||
@ -967,8 +962,12 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
|
||||
FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END;
|
||||
}
|
||||
else {
|
||||
float obmat[4][4];
|
||||
copy_m4_m4(obmat, ob->obmat);
|
||||
|
||||
float vec[3];
|
||||
copy_v3_v3(vec, obmat[3]);
|
||||
obmat[3][0] = obmat[3][1] = obmat[3][2] = 0.0f;
|
||||
zero_v3(obmat[3]);
|
||||
|
||||
/* particle rotation uses x-axis as the aligned axis, so pre-rotate the object accordingly */
|
||||
if ((part->draw & PART_DRAW_ROTATE_OB) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user