[Bf-blender-cvs] [7b05b2564d8] master: Fix T61088: Cycles particle viewport render stuck in loop.
Brecht Van Lommel
noreply at git.blender.org
Fri Feb 1 13:57:55 CET 2019
Commit: 7b05b2564d8f7ebe915ba212c0dbaf40be568cfc
Author: Brecht Van Lommel
Date: Fri Feb 1 13:56:13 2019 +0100
Branches: master
https://developer.blender.org/rB7b05b2564d8f7ebe915ba212c0dbaf40be568cfc
Fix T61088: Cycles particle viewport render stuck in loop.
Object to be instanced should not be modified.
===================================================================
M source/blender/blenkernel/intern/object_dupli.c
===================================================================
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) {
More information about the Bf-blender-cvs
mailing list