Page MenuHome

Nodes: Improvements to edge panning in the node editor.
ClosedPublic

Authored by Lukas Tönne (lukastoenne) on Jun 29 2021, 1:38 PM.

Details

Summary

New operator property to toggle edge panning in the keymap: This is disabled by default to avoid edge-panning in cases where it gets distracting, such as adding a new node. Only the explicit translate operator(s) (GKEY or drag) have this enabled now.

Restore the initial view rect on edge pan cancel: The initial view rect is now stored in the edge pan operator data. When an operator with edge panning is cancelled it can now call the UI_view2d_edge_pan_cancel function to restore the original View2D rect.

Zero delay in node editor scrolling: Delay is useful when scrolling through long lists, such as in the outliner, but makes node scrolling feel sluggish and unresponsive. The lower scroll speed here makes a fast response the better option.

Zoom influence feature: Somewhat slower scrolling in UI-space when zoomed out. With the 0.5 zoom influence factor nodes behave as if zoom factor is halved, otherwise it gets too fast when zoomed out. Previously scrolling would always be constant-speed in UI space, now it's half-way between UI space and node (view) space.

Diff Detail

Repository
rB Blender
Branch
node-scrolling-improvements
Build Status
Buildable 15498
Build 15498: arc lint + arc unit

Event Timeline

Lukas Tönne (lukastoenne) requested review of this revision.Jun 29 2021, 1:38 PM
Lukas Tönne (lukastoenne) created this revision.
  • Only reset the node view when links are cancelled.
Lukas Tönne (lukastoenne) requested review of this revision.Jun 29 2021, 6:21 PM

I've tested settings with zero "delay" on the scrolling, which feels quite nice and reactive. Also slightly slower speed here:

#define NODE_EDGE_PAN_MAX_SPEED 30 /* In UI units per second, slower than default. */
#define NODE_EDGE_PAN_DELAY 0.0f

  • Zero delay in node editor scrolling.

Zoom influence factor for edge scroll speed.

This allows modifying the scroll speed based on the View2D zoom factor.
With influence 0.0 (default behavior) the speed will be constant in
UI space as before.
At maximum influence 1.0 the speed will instead max out in the view
space, i.e. scrolls slower in UI space when zooming out.
At intermediate values the zoom influence is proportionally reduced,
for example at influence 0.5 the view will scroll as if zoom factor is
half of the actual zoom.

This feature is used in the node editor to slow down scrolling a bit
when zoomed out.

Increase default node scroll speed again.

With the zoom influence feature the max speed at default zoom can be
increased again.

Lukas Tönne (lukastoenne) retitled this revision from Improvements to edge panning in the node editor. to Nodes: Improvements to edge panning in the node editor..Jul 9 2021, 9:12 AM
Lukas Tönne (lukastoenne) edited the summary of this revision. (Show Details)

Hmm, testing this I like all of the changes except for the removal of the delay. Without it, I find the panning feels robotic, instant, and too often makes big changes when I just want to move the view slightly. It loses the subtlety and elegance it had before.

Obviously this is going to be somewhat subjective, and that's just my opinion. But I wonder if we would want to try committing this without the change to the delay and see how that does.

Without it, I find the panning feels robotic, instant, and too often makes big changes when I just want to move the view slightly. It loses the subtlety and elegance it had before.

Obviously this is going to be somewhat subjective, and that's just my opinion. But I wonder if we would want to try committing this without the change to the delay and see how that does.

I like it instant and robotic. To me it just feels sluggish with delay. What do we do now.

Added back some of the delay in node edge panning.

In the interest of getting this patch finished i've added back some of the delay for smooth scrolling. It's faster than the previous value, so please check if that works for you.

Sorry for the delay. I'm sorry to be picky, but after testing for a while I find 0.4 or 0.5 much better for the delay. Maybe we could get another opinion? @Pablo Vazquez (pablovazquez), do you have a moment to test this patch with different values for NODE_EDGE_PAN_DELAY?

release/scripts/presets/keyconfig/keymap_data/blender_default.py
1928–1931

I think this should use the other notation, like transform.translate

  • Merge branch 'master' into node-scrolling-improvements
  • Bump scroll delay in node editor up to 0.5 seconds.

Increased the delay to 0.5 seconds now.

release/scripts/presets/keyconfig/keymap_data/blender_default.py
1928–1931

This does not appear to work, it looks like the properties list for nested macro operators expects names in the "TRANSFORM_OT_translate" format.

Thanks, this seems good to go now.

release/scripts/presets/keyconfig/keymap_data/blender_default.py
1928–1931

Ah, sorry. I figured it would be consistent here.

This revision is now accepted and ready to land.Aug 24 2021, 4:06 PM