Maniphest T67442

Modifier re-evaluation makes editing dimensions unreliable
Confirmed, NormalTO DO

Assigned To
None
Authored By
Robert (blablaalb)
Jul 22 2019, 1:25 PM
Tags
  • BF Blender
  • User Interface
  • Modeling
  • Papercut
Subscribers
Bastien Montagne (mont29)
Brecht Van Lommel (brecht)
Campbell Barton (campbellbarton)
Evan Wilson (EAW)
Jacques Lucke (JacquesLucke)
ned (killyourmods)
Richard Antalik (ISS)

Description

Currently editing dimensions uses the bounding box that's recalculated while dragging.

This can cause a feed-back loop as the objects scale is used by some modifiers which calculate a new bounding based on the scale which is then used in dimensions.

In the case of armature modifier - any zero scaled axis makes causes the mesh to scale into a single point, making any further changes to the dimensions not have any effect.


Original report:

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GT 620/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-18 14:52, hash: rB38d4483c6a51
Worked: Blender 2.79

Short description of error
If object is rigged scrolling its dimension value toward zero causes object to disappear, even if right mouse button has been clicked in order to cancel a scaling. So blender accepts a scale of zero even if left mouse button hasn't been released yet, Is it an expected behavior in Blender 2.8?

Exact steps for others to reproduce the error

  • Select the cube.
  • Scroll any of its dimensions value toward zero without releasing the left mouse button
  • Cancel scrolling by right mouse button click.

Event Timeline

Robert (blablaalb) created this task.Jul 22 2019, 1:25 PM
Robert (blablaalb) updated the task description.Jul 22 2019, 1:29 PM
Robert (blablaalb) updated the task description.
Robert (blablaalb) updated the task description.Jul 22 2019, 2:11 PM
Brecht Van Lommel (brecht) changed the task status from Unknown Status to Unknown Status.Jul 22 2019, 2:37 PM
Brecht Van Lommel (brecht) claimed this task.
Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).

This is just not supported, for modifiers and constraints to work well objects should not have zero scale.

Robert (blablaalb) renamed this task from Object disappears after changing its dimensions to zero. to Unable to cancel scaling a object by right mouse button..Jul 22 2019, 3:00 PM
Robert (blablaalb) changed the task status from Unknown Status to Unknown Status.
Robert (blablaalb) updated the task description.
Robert (blablaalb) updated the task description.Jul 22 2019, 3:03 PM
Robert (blablaalb) added a comment.Jul 22 2019, 3:14 PM
In T67442#730340, @Brecht Van Lommel (brecht) wrote:

This is just not supported, for modifiers and constraints to work well objects should not have zero scale.

I mean object disappears as soon as one of its dimensions reaches the value of 0, even if mouse button hasn't been released. Blender 2.79 accepts input only after user releases the LMB.

Evan Wilson (EAW) added a subscriber: Evan Wilson (EAW).EditedJul 22 2019, 3:27 PM

I am unable to reproduce, see the attached clip. Pressing the right mouse button cancels scaling for me.

Windows 7
GeForce GTX 470
RC2

Robert (blablaalb) added a comment.EditedJul 22 2019, 3:37 PM

You can see that object disappeared even though after I reached the value of 0 I didn't release the button and continued scaling it in opposite direction.

Robert (blablaalb) removed a subscriber: Robert (blablaalb).Jul 31 2019, 9:10 AM
Jacques Lucke (JacquesLucke) lowered the priority of this task from 90 to 50.Aug 7 2019, 2:03 PM
Jacques Lucke (JacquesLucke) added a subscriber: Jacques Lucke (JacquesLucke).

The issue only happens when the armature modifier is enabled.

Dalai Felinto (dfelinto) removed Brecht Van Lommel (brecht) as the assignee of this task.Dec 23 2019, 4:33 PM
Dalai Felinto (dfelinto) added a project: Tracker Curfew.
Sybren A. Stüvel (sybren) added a subscriber: Sybren A. Stüvel (sybren).Jan 27 2020, 6:21 PM

This seems to be a problem with undo:

  • Open the example blend file.
  • See that the armature object is selected.
  • Follow the steps to reproduce (so cube has zero dimension, even though right-click was used to cancel).
  • The actions so far were: select the cube, change its dimensions, cancel changing its dimensions.
  • Press Ctrl+Z.
  • The armature object becomes selected, but the cube is still invisible.

To me this means that the right-click was indeed interpreted by Blender as a form of undo. However, it was incomplete as the cube still has zero scale. Manually setting the scale back to 1 makes the cube visible, so this is not something that's impossible for Blender to do. However, restoring the zero-scale situation requires either a real undo or a change in a different property than was dragged. This might be a limitation of the current UI system?

Sybren A. Stüvel (sybren) added a project: User Interface.Jan 27 2020, 6:21 PM
Richard Antalik (ISS) changed the task status from Confirmed to Needs Information from User.Feb 5 2020, 4:22 PM
Richard Antalik (ISS) added a subscriber: Richard Antalik (ISS).

I have re-triaged this report and can not reproduce it.
Can you please check if this is still an issue in latest build?
https://builder.blender.org/download/

Aaron Carlisle (Blendify) removed a project: Tracker Curfew.Feb 10 2020, 10:31 PM
Jacques Lucke (JacquesLucke) changed the task status from Needs Information from User to Needs Information from Developers.Feb 12 2020, 2:55 PM

The issue does not seem to be fixed. The behavior is still quite unexpected. However, I agree that this might be a limitation. Not sure if this is necessarily a limitation of the UI system though. The right click does not seem to trigger an undo (my breakpoint in BKE_undosys_step_undo_with_data_ex wasn't hit).

To me it is more likely that this is a limitation of the Dimensions property itself (and the fact that it is a run-time property). I'm not sure about that..

We could change it so that a right click actually does an undo, but that change requires more discussion and I'm not sure about other implications.

Bastien Montagne (mont29) added a project: Modeling.Mar 20 2020, 4:53 PM
Bastien Montagne (mont29) changed the subtype of this task from "Report" to "Known Issue".
Bastien Montagne (mont29) added a subscriber: Bastien Montagne (mont29).
  • Undo has nothing to do here, right-click is supposed to reset state of object as it was before init of transform operation, without any undo or redo. it just cancels current WIP changes.
  • It is indeed a known limitation, dimension is not an actual property, but a virtual value computed from scale, parenting, etc.

It is probably fixable one way or another, but almost certainly not trivial. so will consider as known issue for now.

Bastien Montagne (mont29) renamed this task from Unable to cancel scaling a object by right mouse button. to Unable to cancel setting/dragging dimension of an object to zero by right mouse button..Mar 20 2020, 4:55 PM
Bastien Montagne (mont29) changed the task status from Needs Information from Developers to Confirmed.
Julian Eisel (Severin) moved this task from Backlog to Known Issues on the User Interface board.Jun 26 2020, 6:23 PM
ned (killyourmods) added a subscriber: ned (killyourmods).Jul 19 2020, 12:28 AM
ned (killyourmods) added a comment.Jul 19 2020, 12:34 AM
This comment was removed by ned (killyourmods).
Campbell Barton (campbellbarton) added a subscriber: Campbell Barton (campbellbarton).EditedSep 4 2020, 7:55 AM

This is caused by the armature modifier results with non-invertible matrices.

The mesh gets transformed by the modifier into a single point, the new bounding box is then used to calculate dimensions - which can't give a useful result.

I looked into using invert_m4m4_safe/safe_ortho, while it does resolve this bug, the results from the modifier are quite unreliable/glitchy.

Another solution could be to store the objects bounding box at the point where editing dimensions starts, then re-use it for further dimension calculations.
Currently the UI API doesn't support custom begin/end events, although they could be added, it would only resolve the issue during a single interactive drag action.

Moving this to a TODO.

Campbell Barton (campbellbarton) renamed this task from Unable to cancel setting/dragging dimension of an object to zero by right mouse button. to Modifier re-evaluation makes editing dimensions unreliable.Sep 4 2020, 7:57 AM
Campbell Barton (campbellbarton) updated the task description.
Campbell Barton (campbellbarton) changed the subtype of this task from "Known Issue" to "To Do".
Campbell Barton (campbellbarton) moved this task from Backlog to Papercuts on the Modeling board.Sep 4 2020, 8:05 AM
Campbell Barton (campbellbarton) added a project: Papercut.
Sybren A. Stüvel (sybren) removed a subscriber: Sybren A. Stüvel (sybren).Sep 4 2020, 11:16 AM