From a5ff780065bf6768811bf459953a1a1eabe989c1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 24 Jun 2019 14:57:52 +0200 Subject: Fix T63828, T62005: copy/paste or append loses rigid body object Previously settings were removed, now add to the rigid body world automatically even if it's a bit ill defined, since this is confusing for users. Fundamentally the concept of a rigid body world collection could be revised, and left only as an optional thing. --- source/blender/blenkernel/BKE_rigidbody.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/blenkernel/BKE_rigidbody.h') diff --git a/source/blender/blenkernel/BKE_rigidbody.h b/source/blender/blenkernel/BKE_rigidbody.h index c940e646d95..cc3f5bbb42e 100644 --- a/source/blender/blenkernel/BKE_rigidbody.h +++ b/source/blender/blenkernel/BKE_rigidbody.h @@ -32,6 +32,7 @@ struct Collection; struct Depsgraph; struct Main; struct Object; +struct ReportList; struct Scene; /* -------------- */ @@ -94,6 +95,12 @@ void BKE_rigidbody_calc_center_of_mass(struct Object *ob, float r_center[3]); /* Utilities */ struct RigidBodyWorld *BKE_rigidbody_get_world(struct Scene *scene); +bool BKE_rigidbody_add_object(struct Main *bmain, + struct Scene *scene, + struct Object *ob, + int type, + struct ReportList *reports); +void BKE_rigidbody_ensure_local_object(struct Main *bmain, struct Object *ob); void BKE_rigidbody_remove_object(struct Main *bmain, struct Scene *scene, struct Object *ob); void BKE_rigidbody_remove_constraint(struct Scene *scene, struct Object *ob); -- cgit v1.2.3