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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-05-18 12:06:46 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-05-18 14:40:52 +0300
commit45afc02f11871b5c9f4d7bc6794761c6a4d883d8 (patch)
treeffc9f69056f8129d29b8aee30737a8d4545861c8 /source/blender/blenkernel/intern/object.c
parent61f9f508a4473e1d2bb353396717b4e1a085e646 (diff)
Solve threading conflict related on proxy group's inverse matrix
It was possible that two threads will start calculating proxy group's inverted matrix and store it in the object itself. This isn't good idea because it means some threads might be using partially written matrix.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index e04f1b19dc5..e05fc91f276 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3031,8 +3031,9 @@ void BKE_object_handle_update_ex(EvaluationContext *eval_ctx,
// printf("ob proxy copy, lib ob %s proxy %s\n", ob->id.name, ob->proxy_from->id.name);
if (ob->proxy_from->proxy_group) { /* transform proxy into group space */
Object *obg = ob->proxy_from->proxy_group;
- invert_m4_m4(obg->imat, obg->obmat);
- mul_m4_m4m4(ob->obmat, obg->imat, ob->proxy_from->obmat);
+ float imat[4][4];
+ invert_m4_m4(imat, obg->obmat);
+ mul_m4_m4m4(ob->obmat, imat, ob->proxy_from->obmat);
if (obg->dup_group) { /* should always be true */
add_v3_v3(ob->obmat[3], obg->dup_group->dupli_ofs);
}