From 75b5ff6698f5c1d50152cfb68530ac6a4ead999e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 3 Jul 2018 18:20:44 +0200 Subject: Softbody: unified copy functions This unifies two almost-identical functions at the expense of having to add one single 'flag' value at one call. This makes copy_softbody() aware of the source/dest objects, allowing it to make a distinction between doing depsgraph evaluation copies and real object copies. This will be used in an upcoming commit to ensure that the pointcache is shared between CoW copies, similar to the current approach for rigidbody simulation. --- source/blender/blenkernel/BKE_object.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_object.h') diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index a54b244f5fd..0122185fd2a 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -56,10 +56,9 @@ void BKE_object_workob_clear(struct Object *workob); void BKE_object_workob_calc_parent(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Object *workob); void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src); -struct SoftBody *copy_softbody(const struct SoftBody *sb, const int flag); +void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src, const int flag); struct ParticleSystem *BKE_object_copy_particlesystem(struct ParticleSystem *psys, const int flag); void BKE_object_copy_particlesystems(struct Object *ob_dst, const struct Object *ob_src, const int flag); -void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src); void BKE_object_free_particlesystems(struct Object *ob); void BKE_object_free_softbody(struct Object *ob); void BKE_object_free_curve_cache(struct Object *ob); -- cgit v1.2.3