Fix all modifiers that depended on BKE_modifier_get_evaluated_mesh_from_object

This fix applying the following modifiers:
* Boolean (working already)
* Array
* Mesh Deform
* Surface Deform
* Vertex Weight Proximity

This function was to return evaluated mesh. So it should get the evaluated
object at all times. So in this case it makes more sense to simply pass the
depsgraph (or in this case the ModifierEvalContext that contains both the
depsgraph and the flag.

Solution discussed with Bastien Montagne.
This commit is contained in:
Dalai Felinto
2018-05-24 16:40:08 +02:00
parent 10e43c0aef
commit e8c8ff4f86
10 changed files with 41 additions and 23 deletions

View File

@@ -390,7 +390,7 @@ static Mesh *arrayModifier_doArray(
vgroup_start_cap_remap = BKE_object_defgroup_index_map_create(
amd->start_cap, ctx->object, &vgroup_start_cap_remap_len);
start_cap_mesh = BKE_modifier_get_evaluated_mesh_from_object(amd->start_cap, ctx->flag);
start_cap_mesh = BKE_modifier_get_evaluated_mesh_from_object(ctx, amd->start_cap);
if (start_cap_mesh) {
start_cap_nverts = start_cap_mesh->totvert;
start_cap_nedges = start_cap_mesh->totedge;
@@ -402,7 +402,7 @@ static Mesh *arrayModifier_doArray(
vgroup_end_cap_remap = BKE_object_defgroup_index_map_create(
amd->end_cap, ctx->object, &vgroup_end_cap_remap_len);
end_cap_mesh = BKE_modifier_get_evaluated_mesh_from_object(amd->end_cap, ctx->flag);
end_cap_mesh = BKE_modifier_get_evaluated_mesh_from_object(ctx, amd->end_cap);
if (end_cap_mesh) {
end_cap_nverts = end_cap_mesh->totvert;
end_cap_nedges = end_cap_mesh->totedge;