mm this is almost working now. but when you want to cancel with a RMB during transfom it actually accepts too
cheers! Daniel Salazar www.3developer.com 2011/2/16 Joshua Leung <[email protected]> > Revision: 34921 > > http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34921 > Author: aligorith > Date: 2011-02-17 01:24:52 +0000 (Thu, 17 Feb 2011) > Log Message: > ----------- > Bugfix: "Tweaking" Markers was working incorrectly > > WM_modal_tweak_exit() was making incorrect use of the user-pref option > "Release Confirms Transform", indicated by confused coder comment > (<quote>"XXX: WTH is this?"</quote>). > > This manisfested when moving markers by just click-dragging and > existing marker, and having it "drop" whereever the mouse was released > regardless of the user-pref option. This was quite confusing as it was > inconsistent with the way that all other transforms worked when this > option is off, where you would usually start the transform (click- > drag), release the button, move around a bit, and then finally click > to end. > > Modified Paths: > -------------- > trunk/blender/source/blender/windowmanager/intern/wm_event_system.c > > Modified: > trunk/blender/source/blender/windowmanager/intern/wm_event_system.c > =================================================================== > --- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c > 2011-02-16 21:57:26 UTC (rev 34920) > +++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c > 2011-02-17 01:24:52 UTC (rev 34921) > @@ -2099,21 +2099,29 @@ > /* for modal callbacks, check configuration for how to interpret exit with > tweaks */ > int WM_modal_tweak_exit(wmEvent *evt, int tweak_event) > { > - /* user preset or keymap? dunno... */ > - // XXX WTH is this? > - int tweak_modal= (U.flag & USER_RELEASECONFIRM)==0; > + /* if the release-confirm userpref setting is enabled, > + * tweak events can be cancelled when mouse is released > + */ > + if (U.flag & USER_RELEASECONFIRM) { > + /* option on, so can exit with km-release */ > + if (evt->val == KM_RELEASE) { > + switch (tweak_event) { > + case EVT_TWEAK_L: > + case EVT_TWEAK_M: > + case EVT_TWEAK_R: > + return 1; > + } > + } > + } > + else { > + /* this is fine as long as not doing km-release, otherwise > + * some items (i.e. markers) being tweaked may end up > getting > + * dropped all over > + */ > + if (evt->val != KM_RELEASE) > + return 1; > + } > > - switch(tweak_event) { > - case EVT_TWEAK_L: > - case EVT_TWEAK_M: > - case EVT_TWEAK_R: > - if(evt->val==tweak_modal) > - return 1; > - default: > - /* this case is when modal callcback didnt get > started with a tweak */ > - if(evt->val) > - return 1; > - } > return 0; > } > > > _______________________________________________ > Bf-blender-cvs mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-blender-cvs > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
