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

James Deery james.deery at jadex.org
Wed Nov 11 00:49:49 CET 2009


Hi,

That does look interesting. Rather fun to play with too.

I've been working from the principle or progressive enhancement and  
I've got an actual patch to get basic horizontal scrolling working  
cross-platform. It compiles on Windows XP and Ubuntu Karmic, but I  
can't actually test if it works, so it would be great if someone  
running Windows or Linux with a trackpad with horizontal scroll or a  
tilt-wheel mouse could check it out. It's on the tracker:

https://projects.blender.org/tracker/index.php?func=detail&aid=19857&group_id=9&atid=127

The next, more interesting part would be to get all the data from the  
MacBook trackpads or Magic Mice and map it to view operators, but I'm  
not sure what the best way to do this is. With just 2D scrolling,  
pinch and rotate there are 4 dimensions. Do we want a new event type  
for each of these or a more generic event? Would that end up leading  
to lots of special cases in the operator callbacks? If we add support  
for more gestures it could get quite messy, and maybe only any good on  
one platform (although it could extend to multi-touch monitors,  
whatever support for those there is on each platform).

Any suggestions on the best way to proceed with this?

James

On 10 Nov 2009, at 09:56, Damien Plisson wrote:

> My previous answer was from the standard events provided by the API.
>
> In fact, the trackpad (or the magic mouse) can be used as a  
> multitouch tablet. You can try by yourself this simple app showing  
> this:
>
> http://lericson.blogg.se/code/2009/november/multitouch-on-unibody-macbooks.html
>
> Damien
>
> Le 5 nov. 2009 à 17:35, Damien Plisson a écrit :
>
>> Unfortunately, only the two-fingers gestures (pan, rotate, magnify)
>> return continuous values, the three-fingers ones (swipe) give only
>> discrete (-1/0/+1) values per gesture, and thus can't be used for a
>> zoom operation.
>>
>> Damien
>>
>> Le 5 nov. 2009 à 12:22, William Reynish a écrit :
>>
>>> Hi James and Damien,
>>>
>>> The smooth scrolling patch sounds great. As you point out, OS X has
>>> very slick scrolling because it doesn't treat scrolling like lots of
>>> fast clicks, but more like a single smooth movement. Scrolling  
>>> slowly
>>> in Blender exposes how choppy the experience currently is, and so
>>> having smooth scrolling in Blender would be really nice.
>>>
>>> As for trackpads, this is something we can really look into  
>>> exploiting
>>> better. In the short term, omnidirectional scrolling would be very
>>> nice, and in the longer term, multi-touch gestures too. It the  
>>> Blender
>>> Conference it struck me just how many people were carrying not only
>>> laptops, but shiny new Macbook Pro's, all of which support  
>>> multitouch
>>> gestures in the trackpad.
>>>
>>> At the moment it's really inefficient moving around in 3D using a
>>> laptop, and tapping into multitouch can really help make pans,  
>>> orbits
>>> and zooms fast and natural for laptop users. We can explore  
>>> different
>>> ways of using multiple fingers and scrolling to make these things  
>>> much
>>> easier for laptop users, like:
>>>
>>> Two-finger scrolling: pan around in any direction
>>> Alt + two-finger scrolling: Orbit around
>>> Three-finger scrolling: zoom
>>>
>>> This way the two-finger scrolling becomes nice and consistent, but  
>>> we
>>> can just as easily explore other mappings.
>>>
>>> Cheers,
>>>
>>> -William
>>>
>>>
>>>
>>> On 5 Nov, 2009, at 10:52 AM, Damien Plisson wrote:
>>>
>>>> Hi James,
>>>>
>>>> I agree with you that the handling of the trackpad features of the
>>>> macbooks would be very useful, especially since they don't  
>>>> provide a
>>>> MMB, and that LMB and RMB can't be pressed at the same time.
>>>>
>>>> I'll more in favor of a smooth option (your second one, the first  
>>>> one
>>>> is too jerky especially for rotate), with the handling of the two
>>>> other gestures (pinch & rotate for zoom & rotation).
>>>> These two are documented in the 10.6 SDK, but are functional,  
>>>> though
>>>> undocumented from 10.5. And it should even be possible to have them
>>>> included in a 10.4 built (even if functional only 10.5+).
>>>>
>>>> Anyway, these need more important changes in non OSX (thus
>>>> multiplatform) parts of Blender code.
>>>> One idea for such "additional per OS" features would be to  
>>>> provide an
>>>> "operator call" event to ghost, to provide OS specific options  
>>>> while
>>>> maintaining a cross-platform common base in WM/event.
>>>> But this is more a long term objective at a very early  
>>>> brainstorming
>>>> status.
>>>>
>>>> We need the UI experts advice too for this...
>>>>
>>>> Damien
>>>>
>>>>
>>>> Le 5 nov. 2009 à 00:46, James Deery a écrit :
>>>>
>>>>> 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
>>>>> _______________________________________________
>>>>> Bf-committers mailing list
>>>>> Bf-committers at blender.org
>>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>>
>>>> _______________________________________________
>>>> Bf-committers mailing list
>>>> Bf-committers at blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>
>>> _______________________________________________
>>> Bf-committers mailing list
>>> Bf-committers at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



More information about the Bf-committers mailing list