[Bf-committers] Patch for constrain-to-plane

Martin Poirier bf-committers@blender.org
Sun, 25 Jan 2004 20:04:11 -0800 (PST)


--- Bill Baxter <baxter@cs.unc.edu> wrote:

Really nice patch. If you're interested on working on
the transform function again, I'll be reworking in up
in the next month, cleaning the functionnality,
splitting in sub functions for cleaner code and add a
lot more constraining (in relation to edges, vertices,
faces, ...). Maybe you can help me.


> - hitting the Ctrl- combo again switches to Local
> axes, then back to 
> unconstrained, just like regular XY

This highlights a nice problem with grab and local
axis constraining. Easy to fix for edit mode (I was
going to commit a fix today), but a lot harder for
object mode. And not only because the code is all
mixed up.

> - I fixed the TABKEY to highlight the *first* thing
> when you use it to 
> go into typemode.  Currently, like for 'g' mode, if
> you hit TAB it 
> highlights the Dy first, which is odd.
> - I also updated the ScaleX header string to
> indicate active constraints 
> (like the Dx Dy Dz header already does)

Good call

> Thanks to Theeth for pointing me in the right
> direction.
> He also said this was a change that had already been
> discussed and 
> approved.  I hope he wasn't lying!  I just spent a
> big chunk of my 
> afternoon on this!

I wasn't. We're under feature freeze right now for a
2.32 release, but you can be sure this will be in 2.33
(unless we rework transform() before then, in that
case, it will be better even).

> - I think typein mode should indicate the current
> insertion point.  I 
> could do that with maybe a little caret indicator? 
> I think a standard 
> cursor would be misleading because it's not really a
> real edit field.  
> But it would be nice to be able to _see_ clearly
> that you did indeed 
> type the decimal point.

Typing mode is more of a hack than a clearly planned
feature. It's also planned for rework, obviously.

> - I think there should be better smarts in
> translating mouse motion for 
> GKEY and SKEY modes in the constrained case. 
> Currently it just projects 
> mouse motion onto the constraint axis/plane, but
> that behaves poorly 
> when the axis is nearly perpendicular to the screen.
>   3DSMAX and those 
> guys have a bit more complicated behavior to handle
> those cases.

Trivial fix for edit mode, you just need to insert a
matrix multiplication before the snapping code call.

> Thanks!  I hope you like this patch and put it in! 
> Please bang on it a 
> lot since it is my first attempt to modify Blender
> (and I just started 
> using blender last week....)  So I could have missed
> some cases of how 
> the transform() function gets called.

I didn't looked at it all that much, but it seemed
rather nice and good.

Martin

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/