Pivot point broken after scaling a flat object to 0 in a dimension #57767

Closed
opened 2018-11-10 18:31:19 +01:00 by Andrew · 6 comments

Windows 10

Broken: 2.80 2c2c996a1b
Worked: 2.79

Pivot point is broken after scaling an already flat object to 0 in its flat dimension.
After that, only 'individual origins' seems to work. All other pivot point modes seem to default to the object origin.

Steps to reproduce:

  • Open blender.
  • Add bezier (or circle, etc) (shift + a > curve > bezier).
  • In object mode, scale z to 0 (s + z + 0 + enter)
  • Enter edit mode (tab)
  • Select one point (right-click)
  • Make sure pivot point is set to Median Point (hold period > median point)
  • Optionally, switch to top-down orthographic (click ortho z / numpad-7)
  • Rotate selection (r)

image.png

Windows 10 Broken: 2.80 2c2c996a1b2 Worked: 2.79 Pivot point is broken after scaling an already flat object to 0 in its flat dimension. After that, only 'individual origins' seems to work. All other pivot point modes seem to default to the object origin. Steps to reproduce: - Open blender. - Add bezier (or circle, etc) (shift + a > curve > bezier). - In object mode, scale z to 0 (s + z + 0 + enter) - Enter edit mode (tab) - Select one point (right-click) - Make sure pivot point is set to Median Point (hold period > median point) - Optionally, switch to top-down orthographic (click ortho z / numpad-7) - Rotate selection (r) ![image.png](https://archive.blender.org/developer/F5479848/image.png)
Author

Added subscriber: @cs32

Added subscriber: @cs32
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Philipp Oeser self-assigned this 2018-11-12 12:07:16 +01:00
Member

Confirmed, will have a look...

Confirmed, will have a look...

This issue was referenced by 036e95bb21

This issue was referenced by 036e95bb21fa32ea6f30a32e7892af42c44cfa5a
Member

OK, had a look at this again and here are (some) findings:

first off a little detour [just as a background, nothing wrong here...]

  • since the introduction of multi-object-editing [or specifically 844a17a3d9], each TransDataContainer stores matrices [4x4, 3x3, ..., inverse matrix in imat,... derrived from the objects obmat]
  • prior to above commit, those matrices were computed "on demand" all over the place
  • now for e.g editmode above local matrices are used also for converting the global transform center to the local transform center, see calculateCenterLocal()

now to where this fails:

  • a scale of zero in a matrix is not invertible
  • 2.79 suffers the same [unsolvable] problem, BUT:
  • matrix inversion was changed in 01c75c3765 from own code to EIGEN for performance reasons
  • if matrix inversion fails in EIGEN, it will return a zero matrix (this will result in a local transform center of 0/0/0 all the time)
  • if matrix inversion failed in previous blender code, it would do something 'smart' and return a 'partially inverted' matrix [everything inverted, failing components set to 1]

So my suggestion to workaround this situation would be to bring back the "old" invert_m4_m4() and use that as fallback if EIGEN fails.
This would make the local transform center appear correct, see D4804

other notes:

  • the helpline (see drawHelpline) is unaffected because it uses t->center_global
  • T_LOCAL_MATRIX seems unused? [was introduced in 844a17a3d9], see D4805 for removal
OK, had a look at this again and here are (some) findings: first off a little detour [just as a background, nothing wrong here...] - since the introduction of multi-object-editing [or specifically 844a17a3d9], each `TransDataContainer` stores matrices [4x4, 3x3, ..., inverse matrix in `imat`,... derrived from the objects `obmat`] - prior to above commit, those matrices were computed "on demand" all over the place - now for e.g editmode above local matrices are used also for converting the global transform center to the local transform center, see `calculateCenterLocal()` now to where this fails: - a scale of zero in a matrix is not invertible - 2.79 suffers the same [unsolvable] problem, BUT: - matrix inversion was changed in 01c75c3765 from own code to EIGEN for performance reasons - if matrix inversion fails in EIGEN, it will return a zero matrix (this will result in a local transform center of 0/0/0 all the time) - if matrix inversion failed in previous blender code, it would do something 'smart' and return a 'partially inverted' matrix [everything inverted, failing components set to 1] So my suggestion to workaround this situation would be to bring back the "old" `invert_m4_m4()` and use that as fallback if EIGEN fails. This would make the local transform center appear correct, see [D4804](https://archive.blender.org/developer/D4804) other notes: - the helpline (see `drawHelpline`) is unaffected because it uses `t->center_global` - `T_LOCAL_MATRIX` seems unused? [was introduced in 844a17a3d9], see [D4805](https://archive.blender.org/developer/D4805) for removal
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
3 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#57767
No description provided.