Modifiers: Refactor MOD_deform_mesh_eval_get()
helper a bit.
Now that function also takes expected number of vertices, and do the checks against generated mesh internally.
This commit is contained in:
@@ -136,7 +136,7 @@ static void deformVertsEM(
|
||||
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
||||
{
|
||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, em, mesh, NULL, false, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, NULL, numVerts, false, false);
|
||||
|
||||
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
|
||||
|
||||
@@ -160,7 +160,7 @@ static void deformMatricesEM(
|
||||
float (*defMats)[3][3], int numVerts)
|
||||
{
|
||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, em, mesh, NULL, false, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, NULL, numVerts, false, false);
|
||||
|
||||
armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, defMats, numVerts,
|
||||
amd->deformflag, NULL, amd->defgrp_name, NULL);
|
||||
@@ -175,7 +175,7 @@ static void deformMatrices(
|
||||
float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
|
||||
{
|
||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, NULL, mesh, NULL, numVerts, false, false);
|
||||
|
||||
armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, defMats, numVerts,
|
||||
amd->deformflag, NULL, amd->defgrp_name, NULL);
|
||||
|
Reference in New Issue
Block a user