Page MenuHome

Display modifier in Edit Mode doesn't work For Lattice
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Windows 10
Graphics card: GTX 1660

Blender Version
Broken: 2.82a
Worked: 2.79

Short description of error
In the modifier Armature that is applied to a Lattice object the button "Display modifier in Edit Mode" doesn't work. You can activate the button, but nothing happens.

Exact steps for others to reproduce the error
The problem remains even with a simpler scene.
Create a cube -> Create Lattice -> Add Lattice modifier to the cube -> Create armature -> Add Armature modifier to the Lattice -> Select some Lattice vertexes in Edit Mode and create a Vertex Group, name it after the armature bone.
Now, if we move the bone in Pose Mode and then try to work with Lattice in Edit Mode, the button "Display modifier in Edit Mode" still does not work

Related Objects

Event Timeline

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Jun 2 2020, 12:43 AM
Richard Antalik (ISS) updated the task description. (Show Details)

Not sure if this is a viewport or a modifier issue. Eg.

  • modifier that does not calculate the right results.
  • viewport that does not draw the right results.
diff --git a/source/blender/draw/intern/draw_cache_impl_lattice.c b/source/blender/draw/intern/draw_cache_impl_lattice.c
index bb313b31deb..f8c9baad2a2 100644
--- a/source/blender/draw/intern/draw_cache_impl_lattice.c
+++ b/source/blender/draw/intern/draw_cache_impl_lattice.c
@@ -141,6 +141,8 @@ static LatticeRenderData *lattice_render_data_create(Lattice *lt, const int type
   LatticeRenderData *rdata = MEM_callocN(sizeof(*rdata), __func__);
   rdata->types = types;
 
+  /* `lt` contains the deformed BPoints.*/
+  rdata->bp = lt->def;
   if (lt->editlatt) {
     EditLatt *editlatt = lt->editlatt;
     lt = editlatt->latt;
@@ -171,8 +173,6 @@ static LatticeRenderData *lattice_render_data_create(Lattice *lt, const int type
     }
   }
 
-  rdata->bp = lt->def;
-
   rdata->dims.u_len = lt->pntsu;
   rdata->dims.v_len = lt->pntsv;
   rdata->dims.w_len = lt->pntsw;

fixes the drawing part, but shows that the (presumably) depsgraph uses the incorrect Lattice to evaluate related objects. in this case the cube. Leading to other unwanted behaviors.

Jeroen Bakker (jbakker) updated the task description. (Show Details)
Bastien Montagne (mont29) changed the subtype of this task from "Report" to "Bug".
Jeroen Bakker (jbakker) renamed this task from Display modifier in Edit Mode doesn't work to Display modifier in Edit Mode doesn't work For Lattice.Jun 2 2020, 2:52 PM

P1446 somewhat shows that the deformation does not feed back to the editlatt.