Commit Graph

10 Commits

Author SHA1 Message Date
7b081fe3b7 Local axis constraint started.
Works with edit data and in object mode with single selections (only one object selected).

Also started adding constraint stuff in headerprints. Only for Translation for now.

Pressing X,Y,Z (and the Ctrl versions) toggle between global, local and off like it used to do.
2005-03-07 02:21:04 +00:00
a61c0d7995 need to use MIN2 instead of min for compatibility with other compilers. 2005-03-04 03:52:09 +00:00
f458405069 Fixed resize constraining. Was using same function as translation but this is no go for unaligned axis.
Made a generic snapGrid function. Now, each transform needs to define it's snapping parameters in their init. This is needed because of the constraint branching.
2005-03-04 00:07:16 +00:00
58b3022b52 Fixed a bug in the constraint projection code. It only worked correctly when locking the Z axis because of a malformed if clause.
Renamed the constraints defines to CON_*

Renamed the fonctions used to interactively select a constraint (with MMB). The previous naming scheme was obscure at best.

Added a CON_SELECT flag when selecting interactively. (Following the idea of the patch joeedh submitted).
New behavior when selecting a constraint interactively, not only does it highlight the axis that will be selected, it also makes it the current constraint.

Holding down Ctrl when selecting a constraint with MMB now does the same as hitting Ctrl-AXIS. That is, it locks that axis (planar constraint on the normal plane).

- - - - -

To all those who posted suggestions, I'm not forgetting them:
- broken / desoto with the plane draw thingy,
- RobertT's push/pull transformation (that was from before the new code even)
- UnNamed's MMB interactive idea as we discussed on IRC
and all the others that I've noted down somewhere.

Next for today, I'll have a look at local constraint (object's axis).
2005-03-01 19:22:29 +00:00
cfd5439bc6 Fixed Constraint projection code in perspective mode. When using a planar constraints, it follows the movement of the mouse exactly instead of just casting on the plane.
In user terms: the motion on screen of the selection follows the motion of the mouse pointer.

Gives some errors when the constraint plane is nearly perpendicular to the view port though.

Added a debug print function for 4D vectors to arithb.c

Optimised the 3D -> view projection functions in view.c (a bit).
2005-02-27 19:14:21 +00:00
9f678340b5 Fixed some bugs with Shear and Resize, was acting weird in object mode when parenting was involved.
Changed the meaning of mtx and smtx for objects. It's now uniform accross the board.

Added TD_OBJECT as a TransData flag. Objects is requiring exception code here and there, use a flag instead of G.obedit. Will document what the exceptions are for people who wants to add more transformations.

Split TransData in two.

Note to Ton:
You'll have to change posemode to use the new structure. I've left some variables as part of TransData to have a compilable version in CVS, remove them when you stop using them.
Check MetaElement and Object conversion for example on how to use TransDataExtension (though I'm sure you can figure it out by yourself).

And that's it. Not much coding time in the week days. :\
2005-02-23 02:23:50 +00:00
7ad68dd4a6 Daily commit for transform() project, to prevent conflicts with Martin's
work. :)

- added static and (void) and some style stuff  in transform.c
- first additions in code for posemode (do not even try now!)
- fixed warnings in previous commit martin (gcc only)

Note; posemode old transform had complex dependencies on redraw (Hos' home
grown dep graph), which is first being restored. Including old style
set_base_flags_for_editing. Tomorrow!
2005-02-20 19:00:00 +00:00
4e39c4361f Making transform's code more Blenderish with a proper extern include file (BIF_transform.h) and extern function calls (BIF_*).
On a side note, Shear was fixed in last commit, just forgot to mention it. It wasn't acting correctly in Edit Mode (and Desoto was poking me about it every sunday).
2005-02-20 01:25:10 +00:00
09f21e45d7 First commit for the transform coding for me!
- fixed warnings in compile (transform.h struct defines)
- drawPropCircle was on wrong location in editmode
- removed prop circle drawing for old transform (sorry, but we're going to
  move soon anyway!)
- removed spaces from transform.c
2005-02-19 16:37:48 +00:00
d2f4ba4549 Initial new transform commit.
Disabled behind defines. Uncomment //#define NEWTRANSFORM in transform.h to enable.

Use at your own risk

For more info, see Wiki: http://wiki.blender.org/bin/view.pl/Blenderdev/TransformRefactoring
And tuhopuu mailing list: http://projects.blender.org/pipermail/tuhopuu-devel/

Notes for Ton (things that could need bulldozing:
- TransData conversions. Objects is ok, but others could be rechecked. (some still use totsel). Need to add pose mode support.
- Need more icons in the PET mode dropdown (in the 3D view header) for the new modes
- Add new transform calls to Toolbox and Menus and the one right after Extrude.

That's pretty much all I can think of now.
2005-02-14 02:53:36 +00:00