On Retina displays : node-editor shift-a node creation does not create the node in the right place... #35920

Closed
opened 2013-06-29 20:51:15 +02:00 by David Jeske · 10 comments

%%%--- Operating System, Graphics card ---

Macbook Pro Retina (and other HiDPI retina displays, when they exist)

- Blender version with error, and version that worked ---

broken in 2.67b and all previous versions

- Short description of error ---

Node editor new nodes created in the wrong place on Macbook Pro Retina.

- Steps for others to reproduce the error (preferably based on attached .blend file) ---
  1. Open the node-editor on a Macbook Pro Retina display
  2. use the shift-a menu to add a node
  3. WITNESS: the new node is created in the wrong place

I've done some digging into this bug, and it seems to be caused by the fact that uv-editor and node-editor (which share the grid drawing code) do not adjust their drawing for U.pixelsize. This causes the mouse event (x,y) coordinates to be transformed to the wrong place on the node-editor canvas when U.pixelsize is not 1.0. Not sure what the right fix is though.
%%%

%%%--- Operating System, Graphics card --- Macbook Pro Retina (and other HiDPI retina displays, when they exist) - Blender version with error, and version that worked --- broken in 2.67b and all previous versions - Short description of error --- Node editor new nodes created in the wrong place on Macbook Pro Retina. - Steps for others to reproduce the error (preferably based on attached .blend file) --- 1. Open the node-editor on a Macbook Pro Retina display 2. use the shift-a menu to add a node 3. WITNESS: the new node is created in the wrong place ----------- I've done some digging into this bug, and it seems to be caused by the fact that uv-editor and node-editor (which share the grid drawing code) do not adjust their drawing for U.pixelsize. This causes the mouse event (x,y) coordinates to be transformed to the wrong place on the node-editor canvas when U.pixelsize is not 1.0. Not sure what the right fix is though. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%Reverted my initial fix which checked DPI factor but not pixelsize,
had a look into this and think it would be best if SpaceNode.cursor stored UI_view2d_region_to_view only, and the node editor can scale the value how it likes when using.

That, or the value could be scaled on RNA access.%%%

%%%Reverted my initial fix which checked DPI factor but not pixelsize, had a look into this and think it would be best if SpaceNode.cursor stored UI_view2d_region_to_view only, and the node editor can scale the value how it likes when using. That, or the value could be scaled on RNA access.%%%

%%%I dont mean to be rude or annoying, but please, give this a second view. This is a very annoying thing to deal with, it is not only time consuming but also discouraging when working on large tree nodes. I wish I could help. Thank you so much to whoever takes the time.%%%

%%%I dont mean to be rude or annoying, but please, give this a second view. This is a very annoying thing to deal with, it is not only time consuming but also discouraging when working on large tree nodes. I wish I could help. Thank you so much to whoever takes the time.%%%

%%%Claudio D. We know this is really a bad problem, just not many devs have OSX+Retina displays to test with.

I have a patch that works on linux to make the display show non 1.0 Pixelsizes but Im not certain that the mouse coordinates are handled the same way.%%%

%%%Claudio D. We know this is really a bad problem, just not many devs have OSX+Retina displays to test with. I have a patch that works on linux to make the display show non 1.0 Pixelsizes but Im not certain that the mouse coordinates are handled the same way.%%%
Author

%%%I'm going to take another look at this in a couple days. This was actually the very first coding/bug I tried to work on in blender, and it turned out to be just a bit too deeply buried in coordinate transformation and dpi handling choices.

I think I better understand what is "wrong" with it now, so I'll take another look. %%%

%%%I'm going to take another look at this in a couple days. This was actually the very first coding/bug I tried to work on in blender, and it turned out to be just a bit too deeply buried in coordinate transformation and dpi handling choices. I think I better understand what is "wrong" with it now, so I'll take another look. %%%
Member

%%%Both me and Brecht have checked it (for hours), and it's going to be not a very trivial fix. Too risky to rush in before 2.68, so it gets moved to next release.%%%

%%%Both me and Brecht have checked it (for hours), and it's going to be not a very trivial fix. Too risky to rush in before 2.68, so it gets moved to next release.%%%

%%%re-committed temp workaround. noted as not real fix but at least it works on all non retina displays with non-default DPI.%%%

%%%re-committed temp workaround. noted as not real fix but at least it works on all non retina displays with non-default DPI.%%%
Author

%%%For when this is fixed...

After looking at the issue, I think a part of the solution is for node-space zoom to adjust for pixelsize -- making the outliner objects appear the same size on screen for retina and non-retina at the same zoom level. This is both consistent with the Apple recommended way of handling retina, and much more sane in the face of many different DPI displays, including upcoming UltraHD.

I know there is concern about how this affects UV-editor and images, and what 1:1 mapping means in the image editor. I think in most practical situations it will be best if a given view-transform zoom-level (in memory or saved in a file) is adjusted for pixelsize, such that it appears the same physical size in inches when loaded or moved between displays. The "1:1" menu option should achieve 1:1 pixel mapping, and to do this, it will need to adjust for pixelsize and set the proper view-transform zoom-level based on the current display DPI. This means that a window is shown on a display with a different DPI (dragging or save/load), it will no longer be shown 1:1: Reselecting the 1:1 menu option on that display will reset it to 1:1 for that display. Also it may be useful to add a widget to the UV viewport which shows the current ratio of UV image pixels to raw-display pixels, to make this clear.

the truth is that DPI scailng introduces a virtual coordinate system where it is both inconvenient and difficult to try to achieve 1:1 mapping. For example, if a user today selects different Retina scaling modes, it adjusts the virtual "pixelsize" even while physical screen pixels remain the same.

%%%

%%%For when this is fixed... After looking at the issue, I think a part of the solution is for node-space zoom to adjust for pixelsize -- making the outliner objects appear the same size on screen for retina and non-retina at the same zoom level. This is both consistent with the Apple recommended way of handling retina, and much more sane in the face of many different DPI displays, including upcoming UltraHD. I know there is concern about how this affects UV-editor and images, and what 1:1 mapping means in the image editor. I think in most practical situations it will be best if a given view-transform zoom-level (in memory or saved in a file) is adjusted for pixelsize, such that it appears the same physical size in inches when loaded or moved between displays. The "1:1" menu option should achieve 1:1 pixel mapping, and to do this, it will need to adjust for pixelsize and set the proper view-transform zoom-level based on the current display DPI. This means that a window is shown on a display with a different DPI (dragging or save/load), it will no longer be shown 1:1: Reselecting the 1:1 menu option on that display will reset it to 1:1 for that display. Also it may be useful to add a widget to the UV viewport which shows the current ratio of UV image pixels to raw-display pixels, to make this clear. the truth is that DPI scailng introduces a virtual coordinate system where it is both inconvenient and difficult to try to achieve 1:1 mapping. For example, if a user today selects different Retina scaling modes, it adjusts the virtual "pixelsize" even while physical screen pixels remain the same. %%%
Member

%%%Fix for adding nodes in retina is now in svn
Code also cleans up some of the ugly 'cursor' code in node system.

The generic issues with how to handle high-dpi screens properly will need to be revisited later. I would prefer to gather information for how Windows/Linux or even Android handles this now. Once some more developers have high-dpi themselves it will be an easier topic to revisit too.%%%

%%%Fix for adding nodes in retina is now in svn Code also cleans up some of the ugly 'cursor' code in node system. The generic issues with how to handle high-dpi screens properly will need to be revisited later. I would prefer to gather information for how Windows/Linux or even Android handles this now. Once some more developers have high-dpi themselves it will be an easier topic to revisit too.%%%
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
4 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#35920
No description provided.