Display modifier in Edit Mode doesn't work For Lattice #77184

Closed
opened 2020-05-30 03:49:17 +02:00 by Anton Lents · 10 comments

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

#77184.blend

**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 [#77184.blend](https://archive.blender.org/developer/F8571609/T77184.blend)
Author

Added subscriber: @AntonLents

Added subscriber: @AntonLents

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

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.

Screenshot from 2020-06-02 09-39-30.png

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. ![Screenshot from 2020-06-02 09-39-30.png](https://archive.blender.org/developer/F8571663/Screenshot_from_2020-06-02_09-39-30.png)
Jeroen Bakker changed title from Display modifier in Edit Mode doesn't work to Display modifier in Edit Mode doesn't work For Lattice 2020-06-02 14:52:49 +02:00
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

This comment was removed by @lichtwerk

*This comment was removed by @lichtwerk*
Member

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

[P1446](https://archive.blender.org/developer/P1446.txt) somewhat shows that the deformation does not feed back to the `editlatt`.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2022-02-07 05:58:49 +01:00

This is now working (possibly, although I didn't bisect 3681a619de).

Now the deformed lattice is shown in edit-mode, although selected vertices aren't (reported separately: #95574 (Lattices don't display selected vertices with modifier "Edit Mode" enabled)).

This is now working (possibly, although I didn't bisect 3681a619de). Now the deformed lattice is shown in edit-mode, although selected vertices aren't (reported separately: #95574 (Lattices don't display selected vertices with modifier "Edit Mode" enabled)).
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#77184
No description provided.