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>2016-12-12 18:17:57 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-12-12 18:17:57 +0300
commit9be6d5ff18fd593e853647d9eec8b3fb074acd7c (patch)
tree485fb9203c310b5119a549e698db241012ed39ff /source/blender/blenkernel/intern/rigidbody.c
parent54528079e3cfaf74eaa119615386564820b45276 (diff)
parent5f852a4324212221500d11b2c7594f5e0ca894c6 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/blenkernel/intern/depsgraph.c source/blender/blenloader/intern/versioning_270.c source/blender/depsgraph/intern/builder/deg_builder_relations.cc source/blender/makesrna/intern/rna_main_api.c source/blender/makesrna/intern/rna_particle.c
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 0b361d479f9..4bed9e6476a 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -46,6 +46,7 @@
# include "RBI_api.h"
#endif
+#include "DNA_ID.h"
#include "DNA_group_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
@@ -217,13 +218,6 @@ RigidBodyCon *BKE_rigidbody_copy_constraint(Object *ob)
return rbcN;
}
-/* preserve relationships between constraints and rigid bodies after duplication */
-void BKE_rigidbody_relink_constraint(RigidBodyCon *rbc)
-{
- ID_NEW_REMAP(rbc->ob1);
- ID_NEW_REMAP(rbc->ob2);
-}
-
/* ************************************** */
/* Setup Utilities - Validate Sim Instances */
@@ -963,12 +957,9 @@ RigidBodyWorld *BKE_rigidbody_world_copy(RigidBodyWorld *rbw)
void BKE_rigidbody_world_groups_relink(RigidBodyWorld *rbw)
{
- if (rbw->group && rbw->group->id.newid)
- rbw->group = (Group *)rbw->group->id.newid;
- if (rbw->constraints && rbw->constraints->id.newid)
- rbw->constraints = (Group *)rbw->constraints->id.newid;
- if (rbw->effector_weights->group && rbw->effector_weights->group->id.newid)
- rbw->effector_weights->group = (Group *)rbw->effector_weights->group->id.newid;
+ ID_NEW_REMAP(rbw->group);
+ ID_NEW_REMAP(rbw->constraints);
+ ID_NEW_REMAP(rbw->effector_weights->group);
}
void BKE_rigidbody_world_id_loop(RigidBodyWorld *rbw, RigidbodyWorldIDFunc func, void *userdata)