Cleanup: Avoid curve to mesh conversion in some deform modifiers
Some modifiers used `MOD_deform_mesh_eval_get` to make sure they had a mesh to retrieve vertex groups from. But since curves don't support vertex groups anyway, and since the curve to mesh conversion is handled by the (legacy) curve object modifier stack anyway, this is confusing and unnecessary. This shouldn't give any behavior changes, but some deform modifiers on legacy curve objects might be faster if they used to do the conversion.
This commit is contained in:
@@ -206,7 +206,7 @@ static void deformMatrices(ModifierData *md,
|
||||
int verts_num)
|
||||
{
|
||||
ArmatureModifierData *amd = (ArmatureModifierData *)md;
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
BKE_armature_deform_coords_with_mesh(amd->object,
|
||||
ctx->object,
|
||||
|
||||
@@ -466,7 +466,7 @@ static void deformVerts(ModifierData *md,
|
||||
|
||||
if (ctx->object->type == OB_MESH && cmd->defgrp_name[0] != '\0') {
|
||||
/* mesh_src is only needed for vgroups. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
if (cmd->type == MOD_CAST_TYPE_CUBOID) {
|
||||
@@ -492,7 +492,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
Mesh *mesh_src = nullptr;
|
||||
|
||||
if (cmd->defgrp_name[0] != '\0') {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
if (mesh && BKE_mesh_wrapper_type(mesh) == ME_WRAPPER_TYPE_MDATA) {
|
||||
|
||||
@@ -95,7 +95,7 @@ static void deformVerts(ModifierData *md,
|
||||
}
|
||||
|
||||
if (mesh == nullptr) {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, nullptr, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, nullptr, nullptr, false);
|
||||
}
|
||||
else {
|
||||
/* Not possible to use get_mesh() in this case as we'll modify its vertices
|
||||
|
||||
@@ -90,7 +90,7 @@ static void deformVerts(ModifierData *md,
|
||||
const ModifierEvalContext *ctx,
|
||||
Mesh *mesh,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
int /*verts_num*/)
|
||||
{
|
||||
CollisionModifierData *collmd = (CollisionModifierData *)md;
|
||||
Mesh *mesh_src;
|
||||
@@ -107,7 +107,7 @@ static void deformVerts(ModifierData *md,
|
||||
}
|
||||
|
||||
if (mesh == nullptr) {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ob, nullptr, nullptr, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ob, nullptr, nullptr, nullptr, false);
|
||||
}
|
||||
else {
|
||||
/* Not possible to use get_mesh() in this case as we'll modify its vertices
|
||||
|
||||
@@ -744,7 +744,7 @@ static void deformVerts(ModifierData *md,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
{
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
correctivesmooth_modifier_do(
|
||||
md, ctx->depsgraph, ctx->object, mesh_src, vertexCos, uint(verts_num), nullptr);
|
||||
@@ -761,8 +761,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
{
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(
|
||||
ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
if (mesh_src != nullptr) {
|
||||
|
||||
@@ -110,7 +110,7 @@ static void deformVerts(ModifierData *md,
|
||||
|
||||
if (ctx->object->type == OB_MESH && cmd->name[0] != '\0') {
|
||||
/* mesh_src is only needed for vgroups. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
const MDeformVert *dvert = nullptr;
|
||||
|
||||
@@ -373,7 +373,7 @@ static void deformVerts(ModifierData *md,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
{
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
displaceModifier_do((DisplaceModifierData *)md, ctx, mesh_src, vertexCos, verts_num);
|
||||
|
||||
@@ -389,8 +389,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
{
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(
|
||||
ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
if (mesh_src != nullptr) {
|
||||
|
||||
@@ -431,7 +431,7 @@ static void deformVerts(ModifierData *md,
|
||||
int verts_num)
|
||||
{
|
||||
HookModifierData *hmd = (HookModifierData *)md;
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
deformVerts_do(hmd, ctx, ctx->object, mesh_src, nullptr, vertexCos, verts_num);
|
||||
|
||||
|
||||
@@ -749,7 +749,7 @@ static void deformVerts(ModifierData *md,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
{
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
LaplacianDeformModifier_do(
|
||||
(LaplacianDeformModifierData *)md, ctx->object, mesh_src, vertexCos, verts_num);
|
||||
@@ -766,8 +766,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
{
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(
|
||||
ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
if (mesh_src != nullptr) {
|
||||
|
||||
@@ -514,7 +514,7 @@ static void deformVerts(ModifierData *md,
|
||||
return;
|
||||
}
|
||||
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
laplaciansmoothModifier_do(
|
||||
(LaplacianSmoothModifierData *)md, ctx->object, mesh_src, vertexCos, verts_num);
|
||||
@@ -537,7 +537,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
return;
|
||||
}
|
||||
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
if (mesh_src != nullptr) {
|
||||
|
||||
@@ -100,7 +100,7 @@ static void deformVerts(ModifierData *md,
|
||||
int verts_num)
|
||||
{
|
||||
LatticeModifierData *lmd = (LatticeModifierData *)md;
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ static void deformVerts(ModifierData *md,
|
||||
|
||||
if (ctx->object->type == OB_MESH && mcmd->defgrp_name[0] != '\0') {
|
||||
/* `mesh_src` is only needed for vertex groups. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
}
|
||||
meshcache_do(mcmd, scene, ctx->object, mesh_src, vertexCos, verts_num);
|
||||
|
||||
@@ -308,7 +308,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
|
||||
if (ctx->object->type == OB_MESH && mcmd->defgrp_name[0] != '\0') {
|
||||
/* `mesh_src` is only needed for vertex groups. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
}
|
||||
if (mesh_src != nullptr) {
|
||||
BKE_mesh_wrapper_ensure_mdata(mesh_src);
|
||||
|
||||
@@ -441,7 +441,7 @@ static void deformVerts(ModifierData *md,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
{
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
|
||||
|
||||
@@ -459,8 +459,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
{
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(
|
||||
ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
Mesh *mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
if (mesh_src != nullptr) {
|
||||
|
||||
@@ -100,7 +100,7 @@ static void deformVerts(ModifierData *md,
|
||||
const ModifierEvalContext *ctx,
|
||||
Mesh *mesh,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
int /*verts_num*/)
|
||||
{
|
||||
Mesh *mesh_src = mesh;
|
||||
ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md;
|
||||
@@ -118,7 +118,7 @@ static void deformVerts(ModifierData *md,
|
||||
}
|
||||
|
||||
if (mesh_src == nullptr) {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, nullptr, vertexCos, verts_num, true);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, nullptr, vertexCos, true);
|
||||
if (mesh_src == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ static void deformVerts(ModifierData *md,
|
||||
{
|
||||
/* mesh_src is needed for vgroups, but also used as ShrinkwrapCalcData.vert when projecting.
|
||||
* Avoid time-consuming mesh conversion for curves when not projecting. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
const MDeformVert *dvert = nullptr;
|
||||
@@ -126,7 +126,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
Mesh *mesh_src = nullptr;
|
||||
|
||||
if ((swmd->vgroup_name[0] != '\0') || (swmd->shrinkType == MOD_SHRINKWRAP_PROJECT)) {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
|
||||
@@ -450,7 +450,7 @@ static void deformVerts(ModifierData *md,
|
||||
|
||||
if (ctx->object->type == OB_MESH && sdmd->vgroup_name[0] != '\0') {
|
||||
/* mesh_src is only needed for vgroups. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
SimpleDeformModifier_do(sdmd, ctx, ctx->object, mesh_src, vertexCos, verts_num);
|
||||
@@ -472,7 +472,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
|
||||
if (ctx->object->type == OB_MESH && sdmd->vgroup_name[0] != '\0') {
|
||||
/* mesh_src is only needed for vgroups. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
|
||||
@@ -186,7 +186,7 @@ static void deformVerts(ModifierData *md,
|
||||
Mesh *mesh_src = nullptr;
|
||||
|
||||
/* mesh_src is needed for vgroups, and taking edges into account. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
|
||||
smoothModifier_do(smd, ctx->object, mesh_src, vertexCos, verts_num);
|
||||
|
||||
@@ -206,7 +206,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
Mesh *mesh_src = nullptr;
|
||||
|
||||
/* mesh_src is needed for vgroups, and taking edges into account. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
BKE_mesh_wrapper_ensure_mdata(mesh_src);
|
||||
|
||||
@@ -90,7 +90,7 @@ static void deformVerts(ModifierData *md,
|
||||
const ModifierEvalContext *ctx,
|
||||
Mesh *mesh,
|
||||
float (*vertexCos)[3],
|
||||
int verts_num)
|
||||
int /*verts_num*/)
|
||||
{
|
||||
SurfaceModifierData *surmd = (SurfaceModifierData *)md;
|
||||
const int cfra = int(DEG_get_ctime(ctx->depsgraph));
|
||||
@@ -113,8 +113,7 @@ static void deformVerts(ModifierData *md,
|
||||
nullptr, (ID *)mesh, nullptr, LIB_ID_COPY_LOCALIZE);
|
||||
}
|
||||
else {
|
||||
surmd->runtime.mesh = MOD_deform_mesh_eval_get(
|
||||
ctx->object, nullptr, nullptr, nullptr, verts_num, false);
|
||||
surmd->runtime.mesh = MOD_deform_mesh_eval_get(ctx->object, nullptr, nullptr, nullptr, false);
|
||||
}
|
||||
|
||||
if (!ctx->object->pd) {
|
||||
|
||||
@@ -1579,7 +1579,7 @@ static void deformVerts(ModifierData *md,
|
||||
|
||||
if (smd->defgrp_name[0] != '\0') {
|
||||
/* Only need to use mesh_src when a vgroup is used. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
surfacedeformModifier_do(md, ctx, vertexCos, verts_num, ctx->object, mesh_src);
|
||||
@@ -1601,7 +1601,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
|
||||
if (smd->defgrp_name[0] != '\0') {
|
||||
/* Only need to use mesh_src when a vgroup is used. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
|
||||
@@ -164,12 +164,8 @@ void MOD_previous_vcos_store(ModifierData *md, const float (*vert_coords)[3])
|
||||
/* lattice/mesh modifier too */
|
||||
}
|
||||
|
||||
Mesh *MOD_deform_mesh_eval_get(Object *ob,
|
||||
BMEditMesh *em,
|
||||
Mesh *mesh,
|
||||
const float (*vertexCos)[3],
|
||||
const int verts_num,
|
||||
const bool use_orco)
|
||||
Mesh *MOD_deform_mesh_eval_get(
|
||||
Object *ob, BMEditMesh *em, Mesh *mesh, const float (*vertexCos)[3], const bool use_orco)
|
||||
{
|
||||
if (mesh != nullptr) {
|
||||
/* pass */
|
||||
@@ -201,23 +197,6 @@ Mesh *MOD_deform_mesh_eval_get(Object *ob,
|
||||
BKE_mesh_orco_ensure(ob, mesh);
|
||||
}
|
||||
}
|
||||
else if (ELEM(ob->type, OB_FONT, OB_CURVES_LEGACY, OB_SURF)) {
|
||||
/* TODO(sybren): get evaluated mesh from depsgraph once
|
||||
* that's properly generated for curves. */
|
||||
mesh = BKE_mesh_new_nomain_from_curve(ob);
|
||||
|
||||
/* Currently, that may not be the case every time
|
||||
* (texts e.g. tend to give issues,
|
||||
* also when deforming curve points instead of generated curve geometry... ). */
|
||||
if (mesh != nullptr && mesh->totvert != verts_num) {
|
||||
BKE_id_free(nullptr, mesh);
|
||||
mesh = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (mesh && mesh->runtime->wrapper_type == ME_WRAPPER_TYPE_MDATA) {
|
||||
BLI_assert(mesh->totvert == verts_num);
|
||||
}
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
||||
@@ -35,12 +35,8 @@ void MOD_previous_vcos_store(ModifierData *md, const float (*vert_coords)[3]);
|
||||
/**
|
||||
* \returns a mesh if mesh == null, for deforming modifiers that need it.
|
||||
*/
|
||||
Mesh *MOD_deform_mesh_eval_get(Object *ob,
|
||||
BMEditMesh *em,
|
||||
Mesh *mesh,
|
||||
const float (*vertexCos)[3],
|
||||
int verts_num,
|
||||
bool use_orco);
|
||||
Mesh *MOD_deform_mesh_eval_get(
|
||||
Object *ob, BMEditMesh *em, Mesh *mesh, const float (*vertexCos)[3], bool use_orco);
|
||||
|
||||
void MOD_get_vgroup(
|
||||
Object *ob, Mesh *mesh, const char *name, const MDeformVert **dvert, int *defgrp_index);
|
||||
|
||||
@@ -347,7 +347,7 @@ static void deformVerts(ModifierData *md,
|
||||
|
||||
if (wmd->defgrp_name[0] != '\0' || wmd->texture != nullptr) {
|
||||
/* mesh_src is only needed for vgroups and textures. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
warpModifier_do(wmd, ctx, mesh_src, vertexCos, verts_num);
|
||||
@@ -369,7 +369,7 @@ static void deformVertsEM(ModifierData *md,
|
||||
|
||||
if (wmd->defgrp_name[0] != '\0' || wmd->texture != nullptr) {
|
||||
/* mesh_src is only needed for vgroups and textures. */
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
|
||||
@@ -300,10 +300,10 @@ static void deformVerts(ModifierData *md,
|
||||
Mesh *mesh_src = nullptr;
|
||||
|
||||
if (wmd->flag & MOD_WAVE_NORM) {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, vertexCos, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, vertexCos, false);
|
||||
}
|
||||
else if (wmd->texture != nullptr || wmd->defgrp_name[0] != '\0') {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, nullptr, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
waveModifier_do(wmd, ctx, ctx->object, mesh_src, vertexCos, verts_num);
|
||||
@@ -324,10 +324,10 @@ static void deformVertsEM(ModifierData *md,
|
||||
Mesh *mesh_src = nullptr;
|
||||
|
||||
if (wmd->flag & MOD_WAVE_NORM) {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, vertexCos, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, vertexCos, false);
|
||||
}
|
||||
else if (wmd->texture != nullptr || wmd->defgrp_name[0] != '\0') {
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, verts_num, false);
|
||||
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, nullptr, false);
|
||||
}
|
||||
|
||||
/* TODO(@ideasman42): use edit-mode data only (remove this line). */
|
||||
|
||||
Reference in New Issue
Block a user