diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-22 14:03:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-22 14:03:55 +0300 |
commit | cbc4aae06a9b3878b0af68884a75b953e3c8612b (patch) | |
tree | a78995019e14771bcca43c51a3f2d27cd9e2110e /source/blender/blenkernel/intern/object.c | |
parent | 00318eaa2eedfd0f1b8af12bd4a7f664b6ef1b89 (diff) |
Fix crash rendering grass_wind.blend from regression tests. The real
problem is that where_is_object is being called from multiple threads
but is not thread-safe, added a note about this problem, this commit
only solves the crash. Also remove the pushdata/popdata mechanism
that was being used here, using this kind of system is bound to give
problems with threading.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index fd4f98e0a17..1063fa85e1f 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1983,7 +1983,6 @@ void where_is_object_time(Scene *scene, Object *ob, float ctime) float *fp1, *fp2, slowmat[4][4] = MAT4_UNITY; float stime=ctime, fac1, fac2, vec[3]; int a; - int pop; /* new version: correct parent+vertexparent and track+parent */ /* this one only calculates direct attached parent and track */ @@ -2002,21 +2001,19 @@ void where_is_object_time(Scene *scene, Object *ob, float ctime) /* hurms, code below conflicts with depgraph... (ton) */ /* and even worse, it gives bad effects for NLA stride too (try ctime != par->ctime, with MBlur) */ - pop= 0; if(no_parent_ipo==0 && stime != par->ctime) { // only for ipo systems? - pushdata(par, sizeof(Object)); - pop= 1; + Object tmp= *par; if(par->proxy_from); // was a copied matrix, no where_is! bad... else where_is_object_time(scene, par, ctime); + + solve_parenting(scene, ob, par, ob->obmat, slowmat, 0); + + *par= tmp; } - - solve_parenting(scene, ob, par, ob->obmat, slowmat, 0); - - if(pop) { - poplast(par); - } + else + solve_parenting(scene, ob, par, ob->obmat, slowmat, 0); if(ob->partype & PARSLOW) { // include framerate |