diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-28 21:19:32 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-28 21:19:32 +0400 |
commit | e45328f1b6519df29175ac852e8a822b5134fd94 (patch) | |
tree | 1169ca5e1de24ba95f8d6f1fbf3c39d6e530d943 | |
parent | 696512f8ccb43b685b24a8b5188538abe0615148 (diff) |
fix [#26727] Make Proxy ignores group offset
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 29fa731594d..7e85fa5bf38 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1550,7 +1550,10 @@ void object_make_proxy(Object *ob, Object *target, Object *gob) ob->rotmode= target->rotmode; mul_m4_m4m4(ob->obmat, target->obmat, gob->obmat); if(gob->dup_group) { /* should always be true */ - sub_v3_v3(ob->obmat[3], gob->dup_group->dupli_ofs); + float tvec[3]; + copy_v3_v3(tvec, gob->dup_group->dupli_ofs); + mul_mat3_m4_v3(ob->obmat, tvec); + sub_v3_v3(ob->obmat[3], tvec); } object_apply_mat4(ob, ob->obmat, FALSE, TRUE); } @@ -2546,7 +2549,10 @@ void object_handle_update(Scene *scene, Object *ob) invert_m4_m4(obg->imat, obg->obmat); mul_m4_m4m4(ob->obmat, ob->proxy_from->obmat, obg->imat); if(obg->dup_group) { /* should always be true */ - add_v3_v3(ob->obmat[3], obg->dup_group->dupli_ofs); + float tvec[3]; + copy_v3_v3(tvec, obg->dup_group->dupli_ofs); + mul_mat3_m4_v3(ob->obmat, tvec); + sub_v3_v3(ob->obmat[3], tvec); } } else |