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:
authorSergej Reich <sergej.reich@googlemail.com>2013-02-09 14:04:25 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-02-09 14:04:25 +0400
commit6738c941ffc68f25f93eb219c4c3c3ddc3cf7c4c (patch)
tree46717f287b900b0612dc191a3c3c0c152654970f /source/blender/blenkernel/intern/object.c
parent777fb934a7e1645a4df76f40b1d1f1f712c74c62 (diff)
rigidbody: Relink constraints when duplicating objects
This will preserve constraint <-> rigid body realationships so constraint setups aren't broken after duplication. Based on a patch by Brandon Hechinger (jaggz), thanks.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 2312d801e0d..87457621ced 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3185,6 +3185,9 @@ void BKE_object_relink(Object *ob)
if (ob->adt)
BKE_relink_animdata(ob->adt);
+
+ if (ob->rigidbody_constraint)
+ BKE_rigidbody_relink_constraint(ob->rigidbody_constraint);
ID_NEW(ob->parent);