Regression: Nodes: Background dots clipping is visible #114110
Labels
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
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#114110
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background dots in node editor are clipped by borders.
But that clipping is not correct on too large zoom.
Fix: Deduce the reason of that behavior, and change iteration amount to +1 or add zoom factor multiplication in somethere.
@harley tiniest regression in the world in
04285c2d0e
Oh..
Nodes: Background dots clipping is visibleto Regression: Nodes: Background dots clipping is visibleYes, I struggled with clipping of those dots. Before my patch (which was more about the sizing and placement of them) there were many times that they would be shown on top of the scroll bar, which I really hated. Fairly certain (away from computer) that in the example above the next column of them would in the space used by the scroll bar. That the scroll bar is not currently show makes it look odd, but not as odd as having dots on the scroll bar. It’s a fun bit of code if you want to try to improve it.
Ah, yes, I know this struggle well from some web apps I've worked on in my day job. The dynamic-width translucent "floating" scrollbars are so pretty and modern, but quite a pain when they clash with the background content.
That said, the dots are definitely clipping farther from the scrollbars than they need to be. In this screenshot, I've panned so the dots near the scrollbars are as close as they can get before they clip (and both scrollbars are active and at full width):

Looks like there's an extra scrollbar width/height being added to the margin.
Anyway, I'll try taking a look at this while everyone else is busy with BCON 2023
The link to my PR above should point you at the code nicely and you’ll probably find it fun to play with.
The complications here are how we want things to scale. Generally we want everything scaling linearly. But… we also have “line width” adjustment which we use like a “minimum feature size”, so small things like lines become thicker independent of interface scaling. In this case with the dot grid we want the line width to affect the size of each dot but only use ui scale for the dot placement.
For this particular issue, if we want to make sure the dots don’t show in the scroll bar space you need to make sure this applies when you change scale and when selecting “wide lines” because that makes those wider. There is probably a function somewhere that returns the current width of that region’s scroll bar so you can probably get as you accurate as you can stand. I think, but not sure, that those dots might be changing their opacity near that edge so they don’t just pop in and out abruptly.
Anyway, there’s lots in there to have fun with. Don’t hesitate to ask questions.
Hm? No, i don't see the issues in the fact that dot's is drawn under scrollbar.
In the fact, i'd not like idea of changing grid density by hovering cursor over scrollbar.
Thanks, @Harley! I definitely respect the complexity here, and I appreciate you taking the time to explain it (in the midst of BCON 2023, no less!). If I'm able to make an improvement here, it will only be because I have the luxury of investing as much time as I choose—no pressure to move on to other priorities.
Looks like this is just a matter of needing to scale
V2D_SCROLL_WIDTH
andV2D_SCROLL_WIDTH
based on the zoom factor.I noticed that when I zoomed in the amount of empty space got even bigger, and that whan I zoomed out the amount of space got very small:

If I divide

V2D_SCROLL_WIDTH
andV2D_SCROLL_WIDTH
byzoom_x
, then the amount of space looks correct at multiple zoom levels:I created #114219 with that fix, but there is maybe one more detail to work out...
The dots are clipped when their center would overlap with the scrollbar area, which means that a dot can still overlap the scrollbar by up to its radius:

I can fix that by also subtracting the dot radius from the rectangle's width/height, but there's a catch:
max_point_size
then I've made the margin a bit bigger than it needs to be in most cases.So @Harley please let me know if you'd like me to add one of those two adjustments to my PR, or if it's fine to allow that little bit of overlap.
I'd also like to add that I personally don't think this clipping around the scrollbars is necessary at all. I think it looks perfectly fine for the grid dots to go underneath the scrollbars, just like it's fine for the nodes and noodles to be underneath them.
@Harley I posted a question for you in one of my previous comments, but I suspect it may have slipped through the cracks as it was in the midst of the conference. Could you take a look when you get a chance?