Commit Graph

28 Commits

Author SHA1 Message Date
71b561c03f Bug #2467
For non-uniform scaled + rotated objects, the normal aligned Manipulator
got deformed (on multiple selected faces) or pointed wrong. Needed the
famous Transpose of Inverted Matrix trick here.
2005-04-24 19:50:07 +00:00
d8f23c8d3c Reflecting the discussions on Transform Manipulators...
Here you can see the notes and pictures:
http://www.blender3d.org/cms/Manipulator_Widgets.548.0.html

The alternative rotate widgets are still under rt=2 and rt=3.

Still enough work todo here, but hope it's a good step forward!
2005-04-24 13:22:24 +00:00
3dbae624d3 * Brought over a 'mode' parameter to drawcircball to prevent
further loss of Hos' hair during tuhopuu merges.

This doesn't change any user functionality. 'Mode' can be
GL_LINE_LOOP for a circle outline (as it currently is), GL_POLYGON
for a filled circle, or whatever gl mode you like.
2005-04-20 08:26:22 +00:00
097726eb50 For the manipulator freaks; rotate widget with 'arcs' now displays the
transparant grey (ghosted) rotation where mouse click started.
2005-04-16 12:35:42 +00:00
8b664b924b In localview the Manipulator didnt center at correct 3d cursor location. 2005-04-15 21:39:36 +00:00
4ea8947ea7 Merged all the internal transform includes into transform.h and moves it to /src to /include.
Split the conversion fonctions and sorting functions from transform.c into transform_conversions.c
Update MSVC 6.0 projectiles and SConscript accordingly.
Editview still included transform.h, replaced that for BIF_transform.h, the external include.
2005-04-10 18:33:19 +00:00
9ec8778288 SoftBody:
- on add new SoftBody, it creates automatically edges in Mesh now, gives
  too confusing results otherwise
- if no edges exist in mesh, it also doesnt add diagonals for faces in
  softbody

Transform;

- fixed stupid 'used unitialized' gcc warning (sorry theeth!)
- made dualAxisConstraint() accept string too
- little cleanup of prints in using Manipulators
2005-04-03 20:13:10 +00:00
bbcc63326e New minimal & 2D drawing type for Manipulators; try F10 "rt" on 5 (or 6 for
same style in trackball arcs)

Full collection can be found temporally here;
http://www.blender.org/bf/rt.html
2005-04-03 13:12:08 +00:00
312c8d146c Removed casting warnings from transform_manipulator.
PET is now checked as a transform flag during transform. Much cleaner that way for NOPET context (extrude, duplicate)
Added Sphere as a new PET falloff mode (icon and all) and reordered them around in a more logical fashion (IMHO).

Also brought back Subsurf toggle with Shift-O (was supposed to be for PET object mode but that was canned).
2005-04-01 18:39:39 +00:00
7532aa248f Transform fixes
Connected PET for mesh had an infinite loop in some case. Fixed an made a bit faster.
Renamed the numinput flag.
Corrected a conflict in TransInfo flags. This was a crash waiting to happen.
NO_CONSTRAINT flag now correctly used to disable MMB and constraint hotkeys when needed.


Added check for the manipulator flag when drawing them before applying transformation matrix. Was really weird when doing MMB with rotation.
2005-03-31 21:02:35 +00:00
c3abdd9608 Cleanup of widget code;
- made more general calls with args for drawing types
- made it accept transparency for all modes (used while transform now)
- added argument to detect 'combo' mode, gave offsets to translate/scale
  handles in combos.
- added 'pie chart' on view-aligned rotate for widget
- made trackball for rotate widget rt==4 behave compatible
- removed redundant code for 'ghosting'
2005-03-28 14:00:49 +00:00
9cfcd5d82e Two small fixes in transform, committed so Martin can work...
- scale negative draws widget OK (scale widget only now)
- scale negative threshold (for flip) was on vertical Y, now is perpen-
  dicular to center of axis.
2005-03-27 19:54:18 +00:00
fe3b127e23 Added Manipulator Combo mode, with translate/rotate/scale combined. Center
remains translate though. Can be activitated as 4th CTRL hotkey cycle.
2005-03-25 16:59:04 +00:00
aab0b1535f Transform stuff for TEST!
- 4th rotation widget styling, activate with Scene buttons, Anim panel, "rt"
  on "4".
- drawing constraint lines replaced with widget compatible styling.
  (functionality unchanged)

Fix;
- click on center for Rotate widget didn't switch to local/normal in all
  cases
2005-03-23 11:49:54 +00:00
1a4138e184 - Removed temporal hack that switched manipulator type on G, R, S hotkeys.
That was blocking immediate hotkey access for normal blendering.
- New, experimental, hotkey to switch: CTRLKEY! Added code in such a way
  it detects a CTRL key press and release without using it as modifier.
  Pressing CTRL will cycle through the 3 manipulator types.

- Fix for yesterday's commit; click on centerpoint for switching
  orientation happened too on a click for other widgets. Not nice...
2005-03-22 15:01:36 +00:00
a8a73e8097 Transform widget update
- now support for global/local/normal orientation.
- LMB click on center switches orientation mode
- in object mode, local (now) only displays on single object selected
- in editmode, Normal orientation is derived from faces selected
- if no normal can be found, it shows local orientation

Currently implemented, for test, in Mesh editmode and PoseMode.

Note for PoseMode; the 'translation widget' shows on "IK" bones but
doesn't translate, it rotates instead. Pretty interesting to use the
translate widget for it...least cluttered display I think.

Note for Matt; I tried MMB click for switching orientation... it's just
weird that way... such clicks, repeatedly, with mousewheels isnt nice
either.
2005-03-21 22:51:05 +00:00
bc77092959 Added string to BIF_setSingleAxisConstraint() function for headerprint.
Needed for martin to further work on print stuff
2005-03-21 17:52:45 +00:00
981df9983f Transform:
- cleaner code for selection of handles in transform widget. in ortho views
  selecting the center handle defaults, to prevent Inf. overflows for
  perpendicular handles. While holding SHIFT it works the opposite!

- removed redraws on modifier (CTRL, SHIFT) key release. that ensures you
  can apply to grid nicely (functioned that way in all blender releases)
2005-03-21 16:36:43 +00:00
1f8b5912ff More transform widget goodies;
- added 'ghosting' for while using translate/scaling widget
- added 'pie chart' ghost to denote angle while using rotate widget
- added settings to tweak widget in User menu (InfoWindow) "View & Control"
  - Size: total widget size as percentage of window size
  - Handle: as percentage of widget radius
  - Hotspot: for clicking handles, in pixels
  - Fized Size: option to make Widget size independent of window size
  Not sure if all of these are useful to keep, but makes for good testing
  in this stage.

Also: made #define to use new transform to be set TRUE by default now. :)
2005-03-21 14:20:04 +00:00
dedad185ba Three rotate manipulators to play with;
G.rt = 0: one handle for each rotate axis
G.rt = 2: traditional half-circle rotate handles
G.rt = 3: mixed version
2005-03-20 17:25:00 +00:00
c2140d28c1 - Fixed flipped orientation of getViewViewvector(), was opposite in ortho
versus perspective.
  Note for Martin; still an issue with defining what positive/negative
  rotation is in perspective... needs more math here!
- Added Transform Widgets for PoseMode
- made adding bones in EditMode setting G.moving, so it doesn't draw other
  selected objects nor Widgets

Warning in commit of Martin yesterday: Trackball and initTrackball were
declared static, whilst also in transform.h. Quez; why are these functions
exported in the .h file?
2005-03-20 09:45:54 +00:00
e65b0beea8 Ton broke a couple of things in his last commit including PET in rotation mode and local axis constraints on objects.
Bringing that back and enabling PET in trackball rotate.

Changed the rotation manipulator drawing code to really align the Trackball rotate ball with the view (using getViewVector) so that it always looks centered on the selection.
This was particularly ugly in perspective mode with a selection far from the center of the screen: http://www.clubinfo.bdeb.qc.ca/~theeth/screenie.jpg

Moved getViewVector from transform_constraints.c to transform_generics.c since it is not really a constraint related function. Also made it independant on the TransInfo structure so it might be useful elsewhere too.
2005-03-20 02:00:16 +00:00
52417aeb6e - added helper lines in rotation widget
- switched to Local mode for widgets by default, will be a key/button later
2005-03-19 22:03:14 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
35ab8a32a1 Global G.moving got nice define flags, and additional meaning.
- move object mode
- move editmode/pose mode
- move with widgets
2005-03-19 20:27:13 +00:00
e07f2f1226 New version of rotate handlers. I like it! Now the rest of you ;) 2005-03-19 18:54:45 +00:00
a2ed880c9f Transform widgets; Scale and Rotate versions
To use; press the (temporal) icon in header. Switching widget types is by
pressing G, R or S once, if current widget type is different it switches,
otherwise it goes to normal Transform().

Widgets need a bit test for picking accuracy, correct drawing etc.
The rotate widget has a center button for 'trackball' rotate. That latter
can also be used for hotkey-based rotate.

In current code, all widgets remain in "Global" space, also in editmode.
Also widget updates while using normal transform has to be done.

2 Bugfixes:
- rotate in PoseMode had error for 2d 'around' center
- transform in postemode could crash, due to typo (& or |)
2005-03-19 12:17:06 +00:00
ecdf0d3412 Forgot to cvs add a file!
Also did the SConscript file.

MSVC users have to add this!
2005-03-17 21:46:05 +00:00