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-10 17:01:32 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-12-10 17:10:29 +0300
commit7f98ba4725f992e7f982ed4f0f7e910790380de3 (patch)
tree8dd0cc2da5e362749c766c83091131757a7adaba /source/blender/editors/physics/rigidbody_constraint.c
parent073a011f91a52cf1648b2d76606f0f2fff412098 (diff)
Proper fix for rigidbody collections's objects missing rb data.
We cannot let those data be generated on-the-fly in RBW evaluation anymore, since those would be added to CoW eval object and never ported back to orig objects. We *could* get orig objects in eval code, of course, but as in constratints, this is not really threadsafe and future proof, depsgraph evaluation should really write back to orig data as little as possible. So instead, add code to ensure required data is generated to objects when their collection is added to rigidbody world. Note that we *may* want to clean that up once collection is no more used by RB? On the other hand, people might want to keep those data around to be able to switch between different setups easily... So think it's OK to keep them at least for now.
Diffstat (limited to 'source/blender/editors/physics/rigidbody_constraint.c')
-rw-r--r--source/blender/editors/physics/rigidbody_constraint.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/source/blender/editors/physics/rigidbody_constraint.c b/source/blender/editors/physics/rigidbody_constraint.c
index 3b21f914b49..4d950a16b00 100644
--- a/source/blender/editors/physics/rigidbody_constraint.c
+++ b/source/blender/editors/physics/rigidbody_constraint.c
@@ -89,7 +89,6 @@ bool ED_rigidbody_constraint_add(Main *bmain, Scene *scene, Object *ob, int type
}
/* make rigidbody constraint settings */
ob->rigidbody_constraint = BKE_rigidbody_create_constraint(scene, ob, type);
- ob->rigidbody_constraint->flag |= RBC_FLAG_NEEDS_VALIDATE;
/* add constraint to rigid body constraint group */
BKE_collection_object_add(bmain, rbw->constraints, ob);