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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-12-12 19:21:37 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-12-12 19:21:37 +0300
commit80ad2f8cf6bf6612f629491057d8588787440e20 (patch)
tree9e778613a56d66ce0d55f4a91fa3fc733c18531c /source/blender/blenkernel/intern/collection.c
parent4e0291f185570b12abe82ce57ff38c4ae27aa2ac (diff)
Fix (unreported) Broken rigidbody requirements when adding objects to a RB collection.
We have to ensure objects get expected RB data, when they are added to a RB collection...
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r--source/blender/blenkernel/intern/collection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 9b68c61e016..33287d5a2f8 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -42,6 +42,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_object.h"
+#include "BKE_rigidbody.h"
#include "BKE_scene.h"
#include "DNA_ID.h"
@@ -515,6 +516,10 @@ static bool collection_object_add(Main *bmain, Collection *collection, Object *o
DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
}
+ if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
+ BKE_rigidbody_main_collection_object_add(bmain, collection, ob);
+ }
+
return true;
}