[Bf-committers] Horizontal scrolling support (mainly on Mac)

James Deery james.deery at jadex.org
Thu Nov 5 00:46:57 CET 2009


Hi,

I've been playing with Blender recently and couldn't help feeling it  
could benefit from supporting horizontal scrolling. Particularly the  
full two dimensional scrolling provided by OS X, and especially the  
two finger scrolling on the trackpads. I've had a look at the event  
system and have come up with two ways of doing this.

The first is simply to add extra parameters and constants to the  
various mouse wheel events to allow for left and right wheel events.  
This seems to easily apply to Windows and X11 too.

But OS X handles scroll events differently, more like pixel based  
mouse movement than the click-based events on Windows and X11, so I  
though about creating a new event type, distinct from "wheel" events.  
I called this a "mouse pan". I ended up changing a lot more with this  
approach, including additions to the view operators. This gives much  
smoother scrolling and almost works for non-constrained zooming, but  
needs a fair bit more work.

So I have two patches, both only apply to OS X at the moment:

http://demo.jadex.org/scroll-simple.patch
http://demo.jadex.org/scroll-pan.patch

I don't think either are ready to apply as they are and I'm sure there  
will be differing opinions on my key mapping. The first patch would  
obviously work better cross-platform, but I think something is  
potentially being missed. So is it worth me continuing down the second  
root? Ie, is there any chance of it being accepted?

Any comments and suggestions?

James


More information about the Bf-committers mailing list