Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-01 15:56:13 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-01 15:56:13 +0300
commit7b05b2564d8f7ebe915ba212c0dbaf40be568cfc (patch)
tree953f0f084d8056bf6668cd0d1511472cc9b5032c
parent7f0e773dcdeecf14daa005dddd9a7cfe6b932131 (diff)
Fix T61088: Cycles particle viewport render stuck in loop.
Object to be instanced should not be modified.
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 98eda021d46..f727cbfcdae 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -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) {