Modifiers: Correct deform-only modifiers
There was a discontinuity between how deform-only modifiers are applied for the case when result deform mesh is requested and when it is not. Namely, the input mesh will always be guaranteed to present in the former case, but not in the latter. This change makes it so input mesh to deform-only modifiers is always at consistent state. Pair programming and review together with Bastien, thanks!
This commit is contained in:
parent
c73a99ef90
commit
5fde907fd3
|
@ -1101,12 +1101,12 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
|
|||
/* if this is not the last modifier in the stack then recalculate the normals
|
||||
* to avoid giving bogus normals to the next modifier see: [#23673] */
|
||||
else if (isPrevDeform && mti->dependsOnNormals && mti->dependsOnNormals(md)) {
|
||||
/* XXX, this covers bug #23673, but we may need normal calc for other types */
|
||||
if (mesh_final) {
|
||||
BKE_mesh_vert_coords_apply(mesh_final, deformed_verts);
|
||||
if (mesh_final == NULL) {
|
||||
mesh_final = BKE_mesh_copy_for_eval(mesh_input, true);
|
||||
ASSERT_IS_VALID_MESH(mesh_final);
|
||||
}
|
||||
BKE_mesh_vert_coords_apply(mesh_final, deformed_verts);
|
||||
}
|
||||
|
||||
modwrap_deformVerts(md, &mectx, mesh_final, deformed_verts, num_deformed_verts);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue