diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-25 03:09:25 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-25 03:09:25 +0400 |
commit | 2043d801e88c8f56b0153f8acf0cccb554f0fa0c (patch) | |
tree | bffa8f8ea9769d092e7e75b9817b9bd4be7e6862 /source/blender/blenkernel/intern/scene.c | |
parent | 11c6abe53b77baefa09737fa8f615f5c734f4b63 (diff) |
Fix #34806: rigid body world settings were not copied with a full scene copy.
Now copying a scene will also duplicate groups that consist entirely of objects
that are duplicated with the scene. The rigid body world will then also pointers
to these new groups.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 29396a7edfe..d140dfa6a2d 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -176,7 +176,9 @@ Scene *BKE_scene_copy(Scene *sce, int type) scen->obedit = NULL; scen->stats = NULL; scen->fps_info = NULL; - scen->rigidbody_world = NULL; /* RB_TODO figure out a way of copying the rigid body world */ + + if(sce->rigidbody_world) + scen->rigidbody_world = BKE_rigidbody_world_copy(sce->rigidbody_world); BLI_duplicatelist(&(scen->markers), &(sce->markers)); BLI_duplicatelist(&(scen->transform_spaces), &(sce->transform_spaces)); @@ -295,6 +297,12 @@ Scene *BKE_scene_copy(Scene *sce, int type) return scen; } +void BKE_scene_groups_relink(Scene *sce) +{ + if (sce->rigidbody_world) + BKE_rigidbody_world_groups_relink(sce->rigidbody_world); +} + /* do not free scene itself */ void BKE_scene_free(Scene *sce) { |