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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-10-29 20:30:31 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-10-29 20:33:15 +0300
commit62e2bbd068dd689620063ccf9e75db71e9931056 (patch)
tree8f8fabae0c1b0f6b2b0f807d316e3d0b5bc50bda /source/blender/blenkernel/intern
parentbd7cb42f3d4c9c9a79fdfce4f2cc1ac54cd8b765 (diff)
Fix T57488: crash in Shrinkwrap constraint due to unsafe multi-threading.
- Constraints must not use mesh_get_eval_final as it isn't thread-safe. - Depsgraph should keep lastDataMask when re-running COW.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/constraint.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index f343a62eaf7..f44f13ac4d5 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -3411,7 +3411,7 @@ static void shrinkwrap_flush_tars(bConstraint *con, ListBase *list, bool no_copy
}
-static void shrinkwrap_get_tarmat(struct Depsgraph *depsgraph, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
+static void shrinkwrap_get_tarmat(struct Depsgraph *UNUSED(depsgraph), bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
bShrinkwrapConstraint *scon = (bShrinkwrapConstraint *) con->data;
@@ -3423,7 +3423,7 @@ static void shrinkwrap_get_tarmat(struct Depsgraph *depsgraph, bConstraint *con,
float track_no[3] = {0.0f, 0.0f, 0.0f};
SpaceTransform transform;
- Mesh *target_eval = mesh_get_eval_final(depsgraph, DEG_get_input_scene(depsgraph), ct->tar, CD_MASK_BAREMESH);
+ Mesh *target_eval = ct->tar->runtime.mesh_eval;
copy_m4_m4(ct->matrix, cob->matrix);
@@ -4156,8 +4156,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
if (data->depth_ob) {
Object *depth_ob = data->depth_ob;
- Mesh *target_eval = mesh_get_eval_final(
- depsgraph, DEG_get_input_scene(depsgraph), depth_ob, CD_MASK_BAREMESH);
+ Mesh *target_eval = depth_ob->runtime.mesh_eval;
if (target_eval) {
BVHTreeFromMesh treeData = NULL_BVHTreeFromMesh;
BVHTreeRayHit hit;