[Bf-committers] Cheap Tweak Mode
K. Richard Rhodes
krich at frontiernet.net
Sat Jan 15 10:15:53 CET 2005
looking at the code and testing the patch, ummm... it works and isn't
too intrusive. why go through tuhopuu for it ?
K
On Sat, 2005-01-15 at 01:29 -0500, zippy wrote:
> VEry much, but it should be tested first in tuhopuu, I my self have
> wished for this for a while. Cant wait to test it.
>
> On Jan 15, 2005, at 1:14 AM, Chris Want wrote:
>
> > Alright, maybe this is more like funboard territory,
> > but since I wrote some actual code, I'll post here.
> >
> > I've been modelling a bit lately with blender, and it's
> > mostly been great. The one thing I find annoying is
> > having to press 'g' all the time to move one little vert.
> > Wings has 'Tweak mode' that allows you to grab a vert,
> > drag it, and let it go in one nice move. Blender almost
> > has that: you can click on a vert with your right mouse,
> > and drag in a straight line and it'll start moving...
> > the only thing missing is dropping it when you let go
> > of the mouse button. The attached patch allows you to let
> > go of the vert when you let go of the mouse. It's only a
> > few lines of code and it doesn't work perfectly (blender's
> > transform code gives me a headache). Anyways, I guess the
> > question is: is this a desirable behavior?
> >
> > Regards,
> > Chris
> > Index: source/blender/src/editobject.c
> > ===================================================================
> > RCS file: /cvsroot/bf-blender/blender/source/blender/src/editobject.c,v
> > retrieving revision 1.157
> > diff -u -p -r1.157 editobject.c
> > --- source/blender/src/editobject.c 12 Jan 2005 22:28:12 -0000 1.157
> > +++ source/blender/src/editobject.c 15 Jan 2005 06:00:35 -0000
> > @@ -185,6 +185,8 @@ float prop_cent[3];
> >
> > float centre[3], centroid[3];
> >
> > +int tweak_mode = FALSE;
> > +
> > void mirrormenu(void);
> >
> > void add_object_draw(int type) /* for toolbox or menus, only
> > non-editmode stuff */
> > @@ -6200,7 +6202,10 @@ void transform(int mode)
> > /* no-numpad option OR typemode remaps padminus */
> > if (((U.flag & USER_NONUMPAD) || typemode) && event==PADMINUS)
> > event = MINUSKEY;
> >
> > - switch(event) {
> > + if (tweak_mode && !get_mbut()) {
> > + breakloop= 1;
> > + }
> > + else switch(event) {
> > case ESCKEY:
> > case LEFTMOUSE:
> > case RIGHTMOUSE:
> > @@ -6722,7 +6727,9 @@ void std_rmouse_transform(void (*xf_func
> > while(get_mbut() & mousebut) {
> > getmouseco_areawin(mval);
> > if(abs(mval[0]-xo)+abs(mval[1]-yo) > 10) {
> > + tweak_mode=TRUE;
> > xf_func('g');
> > + tweak_mode=FALSE;
> > while(get_mbut() & mousebut) BIF_wait_for_statechange();
> > return;
> > }
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at projects.blender.org
> > http://projects.blender.org/mailman/listinfo/bf-committers
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
More information about the Bf-committers
mailing list