[Bf-blender-cvs] [8f22feefbc2] blender-v2.90-release: Fix T79440: Deform modifiers fail in edit-mode when not first
Campbell Barton
noreply at git.blender.org
Mon Aug 3 10:02:50 CEST 2020
Commit: 8f22feefbc2014154ea59da24b43ff316c5e1d17
Author: Campbell Barton
Date: Mon Aug 3 17:52:53 2020 +1000
Branches: blender-v2.90-release
https://developer.blender.org/rB8f22feefbc2014154ea59da24b43ff316c5e1d17
Fix T79440: Deform modifiers fail in edit-mode when not first
Lattice, armature & curve only worked when an edit-mesh was passed in,
the mesh argument was being ignored.
Regression in 9f5833798caf9
===================================================================
M source/blender/modifiers/intern/MOD_armature.c
M source/blender/modifiers/intern/MOD_curve.c
M source/blender/modifiers/intern/MOD_lattice.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index b62c03d1b03..e7f47a09d95 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -165,10 +165,15 @@ static void deformVerts(ModifierData *md,
static void deformVertsEM(ModifierData *md,
const ModifierEvalContext *ctx,
struct BMEditMesh *em,
- Mesh *UNUSED(mesh),
+ Mesh *mesh,
float (*vertexCos)[3],
int numVerts)
{
+ if (mesh != NULL) {
+ deformVerts(md, ctx, mesh, vertexCos, numVerts);
+ return;
+ }
+
ArmatureModifierData *amd = (ArmatureModifierData *)md;
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c
index 760e4717b6d..42adf305ee9 100644
--- a/source/blender/modifiers/intern/MOD_curve.c
+++ b/source/blender/modifiers/intern/MOD_curve.c
@@ -150,10 +150,15 @@ static void deformVerts(ModifierData *md,
static void deformVertsEM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *em,
- Mesh *UNUSED(mesh),
+ Mesh *mesh,
float (*vertexCos)[3],
int numVerts)
{
+ if (mesh != NULL) {
+ deformVerts(md, ctx, mesh, vertexCos, numVerts);
+ return;
+ }
+
CurveModifierData *cmd = (CurveModifierData *)md;
bool use_dverts = false;
int defgrp_index = -1;
diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c
index b1a9258ec51..bf891c4938b 100644
--- a/source/blender/modifiers/intern/MOD_lattice.c
+++ b/source/blender/modifiers/intern/MOD_lattice.c
@@ -130,10 +130,15 @@ static void deformVerts(ModifierData *md,
static void deformVertsEM(ModifierData *md,
const ModifierEvalContext *ctx,
struct BMEditMesh *em,
- struct Mesh *UNUSED(mesh),
+ struct Mesh *mesh,
float (*vertexCos)[3],
int numVerts)
{
+ if (mesh != NULL) {
+ deformVerts(md, ctx, mesh, vertexCos, numVerts);
+ return;
+ }
+
LatticeModifierData *lmd = (LatticeModifierData *)md;
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
More information about the Bf-blender-cvs
mailing list