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.
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.
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.
- 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
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).
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.
- 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'
- 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.
- 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
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...
- 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.
- 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)
- 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. :)
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?
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.
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)
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 |)