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-12-01 19:06:44 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-12-01 19:09:09 +0300
commit9ed522db735b1d798a5d68c6bf547e8123d33a4b (patch)
treeb8e08f92ea02f1a6e73c2883e5f55d296cd3cadf /source/blender/editors/physics/particle_edit.c
parentdbb479b998a63bec22ebc3173b22420c955892dd (diff)
Fix more cases of evaluated mesh being built for non-COW objects.
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r--source/blender/editors/physics/particle_edit.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 09d3beadb2a..dcf6cfab407 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3564,7 +3564,7 @@ static void intersect_dm_quad_weights(const float v1[3], const float v2[3], cons
}
/** Check intersection with an evaluated mesh. */
-static int particle_intersect_mesh(Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *mesh,
+static int particle_intersect_mesh(Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob, Mesh *mesh,
float *vert_cos,
const float co1[3], const float co2[3],
float *min_d, int *min_face, float *min_w,
@@ -3580,9 +3580,12 @@ static int particle_intersect_mesh(Depsgraph *depsgraph, Scene *scene, Object *o
if (mesh == NULL) {
psys_disable_all(ob);
- mesh = mesh_get_eval_final(depsgraph, scene, ob, CD_MASK_BAREMESH);
+ Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
+ Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
+
+ mesh = mesh_get_eval_final(depsgraph, scene_eval, ob_eval, CD_MASK_BAREMESH);
if (mesh == NULL) {
- mesh = mesh_get_eval_deform(depsgraph, scene, ob, CD_MASK_BAREMESH);
+ mesh = mesh_get_eval_deform(depsgraph, scene_eval, ob_eval, CD_MASK_BAREMESH);
}
psys_enable_all(ob);