diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-16 17:04:22 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-16 17:08:32 +0300 |
commit | 105ae3be9993a646615499bf793cb14549e4104d (patch) | |
tree | b21dc56f3ae11611a3f7e93007e831f976dca62e /source/blender/blenkernel/intern/object.c | |
parent | e6e69a28ab28631b2b1b99f55fb618459e7671ad (diff) |
Fix T66944: Rigid Body Constraint in duplicated collection is not added to RigidBodyConstraints collection.
We only had a very limited, specific handling of that in collection
duplication code, but this has to be handled at a much more general
level in Object copy code itself, since it makes no sense to duplicate
rigidbody object data without adding new copy to relevant rigidbody
collections...
WARNING: This is a fairly risky rework of rigidbody handling logic
when copying an Object data-block. It is *NOT* considered safe enough
for 2.80 release.
I tried to take into account copy flags to not mess with other IDs
(collections) when we are copying outside of Main, and also not do deg
tags when this is forbidden, but risk of something going wrong here is
too high...
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 2a66edc8d42..d7256cc9604 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1417,8 +1417,7 @@ void BKE_object_copy_data(Main *bmain, Object *ob_dst, const Object *ob_src, con } } BKE_object_copy_softbody(ob_dst, ob_src, flag_subdata); - ob_dst->rigidbody_object = BKE_rigidbody_copy_object(ob_src, flag_subdata); - ob_dst->rigidbody_constraint = BKE_rigidbody_copy_constraint(ob_src, flag_subdata); + BKE_rigidbody_object_copy(bmain, ob_dst, ob_src, flag_subdata); BKE_object_copy_particlesystems(ob_dst, ob_src, flag_subdata); |