[Bf-committers] User Preferences Option for Multitouch Gestures

patrick boelens p_boelens at msn.com
Wed Mar 21 03:04:19 CET 2012

Ah ok, I didn't know that was considered bad practice, sorry.
In my mind it made sense to tackle it at the source; "why send a trackpad event if you're not gonna use it anyway" kind of thought.
I can see where you're coming from though. Are there any other major decouplings/ separation like this in Blender that should be taken into account?

As for this case, I'm actually a bit stuck as well. Doing the check from GHOST would make the clear distinction of either pushing an GHOST_EventWheel event or a GHOST_EventTrackpad one.
Catching the GHOST_EventTrackpad in wm_event_system, I can now do a check for the USER_MULTITOUCH flag. If true, do MOUSEZOOM, MOUSEROTATE or MOUSEPAN accordingly.
Then the else if where I get stuck: I can do a check to see if the event was GHOST_kTrackpadEventScroll, but then how do I treat it?
Setting the event type to MOUSEZOOM won't work because of the UI amonst other things, and I can't just set it to WHEELUPMOUSE or WHEELDOWNMOUSE either, since it received a GHOST_EventTrackpad.
What would the correct approach be in this case?


PS: Am I even correct in asking for this here, or would questions like these better belong on IRC?

> Date: Mon, 19 Mar 2012 15:13:18 -0400
> From: significant.bit at gmail.com
> To: bf-committers at blender.org
> Subject: Re: [Bf-committers] User Preferences Option for Multitouch Gestures
> Is it acceptable to use DNA from GHOST? I've wanted to access
> U.ndof_sensitivity from there for example, but avoided this approach.
> You could catch these events in the window manager and discard them.
> This has the same effect for the user, and keeps things separated
> nicely in the code.
> Mike Erwin
> musician, naturalist, pixel pusher, hacker extraordinaire
> On Mon, Mar 19, 2012 at 3:03 PM, patrick boelens <p_boelens at msn.com> wrote:
> >
> > Hello everyone,
> >
> > I'm new to the mailing list, so I hope I'm following correct procedures and such. If not, then by all means please let me know! =)
> > Inspired by Campbell's videos for the current Sourcerers competition I decided to give the Blender source code one more try. The first goal I set for myself was to create an option in the user preferences for enabling and disabling multitouch gestures on MacBooks. Personally I've always found in quite annoying and was stumped to find it automatically gets enabled when you're on a MacBook, with no way of turning it off. I'd therefore like to ask if this would be a good feature to commit into trunk.
> > I've attached a link to the .diff file and would really appreciate it if someone could look it over to see if I did things correctly, regardless of whether or not it should be included in Blender.
> >
> > Thanks in advance and hope to talk more soon,
> > Patrick
> >
> > The .diff: http://www.pasteall.org/30184/diff
> >
> > _______________________________________________
> > 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