Commit Graph

543 Commits

Author SHA1 Message Date
6bfa7c8157 Crease transformation
Behavior is a bit different. Instead of showing the weird two value thing like the old transform did, it always show the weight variation in +/- that is applied to every edge. Works a bit like scale. Move away from center to increase, move closer to decrease (between -1.0 and 1.0).
Works with PET (not using connection yet).

Also removed some missed global Trans variable abuse.
2005-04-04 23:37:15 +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
4db0cbc741 Push/Pull (aka: non proportionnal resize, original idea by Robert Tiess) slipped in my last commit a bit, so might as well finish it.
Accesible with Shift-P (was free), the behavior is much like Shrink/Fatten. Pull mouse toward you to pull toward center, push away to push away. Constraint and PET works with it too, of course.
2005-03-31 22:18:08 +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
05685e6ca7 Context parameter for Transform.
For tex space edit, crease (soon) and future use.


Manipulator assumes no context.
2005-03-27 21:25:15 +00:00
b8d59ccb69 Transform goodies;
- Added icons for the Widgets to blenderbuttons pic
- Added in header - if widget in use - three buttons to choose widget type
  (hold shift for combo widgets)
- Hotkey CTRL+space now switches widgets on/off

I also noticed negative scaling doesn't work satisfying yet;
- for scale widget, using center didn't work correct anymore (fixed)
- negative scaling didn't even get applied! (fixed)
- but; scaling somethig negative now flips back to positive... ????

Last one i need Martin P for! Note that I had to change Mat3ToSize....
2005-03-27 18:17:48 +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
ea15126d75 axisProjection can take care of zero-length vector so we don't need to check anymore. Was giving some problems with cameras looking perfectly down.
Also removed all NEWTRANSFORM defines, using the new code all the time now.
2005-03-25 03:28:08 +00:00
d02b83cf66 - Fix for CTRL (and possible ALT, SHIFT) as hotkey; now also works while
moving mouse around :)
- Shift+D duplicate uses new transform
2005-03-23 18:50:03 +00:00
7c1303bf25 Bug fix #2375
Akey in ipowindow didn't deselect anymore. Or worse... each main refresh
in ipowindow selected all ipos!

Was related to trying to fix mess from jK's commit last year... now its
scientifically ok again! :)
2005-03-23 16:55:22 +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
1f203ac7f1 - Nothing to see hear, move along, move along. 2005-03-22 14:57:14 +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
ca030aeab7 - apologies, accidentally commited code w/ game engine disabled 2005-03-20 20:36:46 +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
Stephen Swaney
c87eb1d628 Added curly braces around an #ifdef NEWTRANSFORM.
Needed when NEWTRANSFORM was not defined.
2005-03-19 13:26:03 +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
17bd00a851 So! Finally a show-off of the *power* of Martin P's work! :)
- Made framework for 3d Transform Manipulators (widgets)
- The Manipulators act like '2d buttons', by default with LeftMouse and with
  while-hold-move-release
- Implemented now: Translation Widget, which allows:
  - four hotspots for axis grab or view-aligned grab
  - center defined by 'around' setting
  - SHIFT+LMB gives planar constraint on other 2 axes
  - works in Object mode and Edit mode (not posemode yet)

Enable it with (temporal) icon in 3D header. All other 'normal' transforms
then keeps working btw.

On the todo for this widget:
- choice for Global, Local or Normal orientation

The way the widgets are going to work is in review still. Commit is also for
Matt for his proposal/paper on topic.
Some notes regarding this project;

- no life updates (on mouse over) like 3DS, I think that's neurotic
- on click, dominant axis changes to theme defined "Transform" color, other axes disappear, like maya
- manipulater size is fixed preset, independent zoom.
- manipulator follows selection, and is located based on 'around' mode

Unresolved;

- in maya, when you select 2 or more objects, the manipulator draws on the 'active' object, also interesting
- what to do with G,R,S hotkeys? It could switch the manipulator "mode"...
- header button/menu for manipulator mode?
2005-03-17 21:31:49 +00:00
07c26eb397 Fixed constraint center calculation. Much smarter to do it when calculating transformation center...
Fixed Extrude constraint. Needed to premul the normal by the object's matrix to but it in global space.

Also, moved the Locking Axis modifier (for constraints) from Alt to Shift. Alt was conflicting with middle mouse button emulation (reported in the test builds forum).

Tilt Transformation.
2005-03-16 21:55:57 +00:00
60b0e67e32 Fixed edit mode armature bug reported by Gabio (transdata conversion wasn't setting data center correctly).
Brought back Shrink/Fatten. Changed the behavior a bit, move the cursor to the right to move toward the normal, to the left to move backward. Please comment.
Only works with meshes, defaults to resize otherwise.
2005-03-13 20:17:39 +00:00
7d520a16c4 Made warp use TransData members instead of G.obedit. Made it work with PET and Objects at the same time. 2005-03-13 02:15:32 +00:00
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
8eef3cfd9c New transform project;
- restored 'Warp' (Shift+W). Should work like before, including type mode
  and holding ctrl/shift modifiers
- added CTRL event in queue, to only redraw when you press it. looks nicer.
2005-03-08 17:29:33 +00:00
bd874641a9 Bug fix #2260
"Select group, Parent" menu crashed when parent was in other scene.
Simply added extra check in code.
2005-03-01 14:03:59 +00:00
c2e6ced9b8 - added "hide" flag for MetaElem. Hidden MetaElem doesn't influence polygonisation.
It is useful for large scenes, when you work with lot of MetaElems. Example:

  http://e-learning.vslib.cz/~hnidek/pics/deer.jpg

  (PildaNovak's model)

- shortcuts for hiding of MetaElems:
   H ......... hide all selected MetaElems
   Shift-H ... hide all unselected MetaElems
   Alt-H ..... unhide all hidden MetaElems

- items in header menu of 3dview
2005-02-21 10:40:30 +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
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
66736db301 Bug 2057
Hotkeys comma and dot (around cursor, median) didn't work for user option
"global pivot". Now all 3d windows are set correctly.
2005-02-12 12:06:30 +00:00
78f133b8a7 Bug found by Bassam; in certain occasions reading a file calls setscreen()
without the (ugly) global curarea being set.
Fixed the crash in his sample by nicely passing on 'current area' as
argument.
2005-01-31 18:37:54 +00:00
Chris Want
732f608e33 Doing the hotkey modifiers for select non-manifold the Ton way. 2005-01-30 21:33:12 +00:00
Chris Want
3180afe2cf Correcting the logic of the hotkey modifiers for select
non-manifold. If you want it so all three modifiers are needed
(e.g. ctrl-alt-shift-MKEY) use:

  if ( !(~G.qual & (LR_SHIFTKEY | LR_ALTKEY | LR_CTRLKEY)) )

instead of

  if ( G.qual & (LR_SHIFTKEY | LR_ALTKEY | LR_CTRLKEY) )

(which really allows any modifier, alone or in combination, to work).
2005-01-29 21:34:45 +00:00
136ecd4644 Modified interface texture font support, which should work nicely with the freshly added bFTGL library.
Also removed some redundant #include's on some files.
2005-01-21 14:48:03 +00:00
9fddd2bdec Added experimental option to use GL textured interface fonts.
Set preferred method in userprefs->language & font.
Kinda requested by Kaito, i'm sure he regrets after seeing
my code changes.

This commit includes a patch provided by Jacques Baurain,
which seemed nescessary to handle font sizing properly.
Thank you !
2005-01-19 13:53:43 +00:00
3c921cc8e8 The "teac" (measurement info) patch from Campbell Barton
Cleaned code somewhat (half the size!) and applied some changes:
- made it compatible with selection flags for new mesh editing (edge/face)
- renamed 'face angles' to 'edge angles' and made it display angles for
  2 selected edges too
- removed the confusing convention that always drawed the info if one
  of the vertices of edge/face/angle was selected. now it only displays on
  minimum of 1 full edge or face selected.
- made it react to "zbuf occluded selection" option (for zbuffered text)
- made it also colorize text for white theme color (TH_TEXT)

On larger meshes this info still draws very confusing. The idea of displaying
the info on 1 vertex selected was probably to show values while grabbing,
although that didnt really work for angles. One idea could be, for transform,
that it draws all lenghts/angles/areas that get changed during transform

All in all, still useful addition tho!
2005-01-08 21:16:24 +00:00
a9128a5109 Bug fix, after irc report sk1p:
frame-sliding (LMB) in action, nla, sound and ipo window went into very
tight while loop, causing cpu to choke. Added nice idle.

Bug fix, found self while testing:
- relative.blend, editmode
- delete part, exit editmode
- enter editmode, undo twice, exit editmode -> crash

The trick to copy 'old' locations of vertices to keys isnt undo-resistant
yet. This fix at least doesnt crash, but copying doesnt work when undo-ing
back to previous editmode session (indices just differ from current mesh...)
2004-12-12 21:13:07 +00:00
74256b8b7d Bug fix #1972
AKEY didn't toggle open/close outliner. It'll be back temporal, until
definitely defined what to do with selections in it.
2004-12-06 09:57:01 +00:00
4193f1cd7f Bug fix #1946
Editmode Mesh, edge selectmode, not zbuffer on. Selecting edges didnt give
a small disadvantage to the already selected one, making it hard to select
edges that are extreme close or on top of each other.
2004-12-03 18:04:33 +00:00
25165da42d Fixed the very annoying display of User Settings Menu when Blender window
is wider than 1280 pixels. It now keeps scale at 100% then, without zoom.
2004-12-03 16:32:24 +00:00
541e36fe11 Added new option:
In renderwindow, press AKEY to see the alpha in B&W. Another AKEY shows
normal RGB again. This uses glColorMask, an opengl 1.0 function.
Really needed it for debugging alpha in rendering. :)
2004-12-02 21:22:17 +00:00
47230dbf75 Bug fix #1939
Combining panorama scene and Sequencer effect on scene (like glow) crashed.

Found two other issues;

- on click in sequencer, the image output window didn't redraw correct, but
  only when a render window was opened. Caused by missing 'activate' call
- added a pause in dragging-frame loop to make it idle friendly
2004-12-02 18:12:18 +00:00
e2d4750f41 Bug reported by Wavez;
Leftmouse select option doesn't work with "Emulate 3 button mouse" option.
The latter maps middle mouse to ALT+leftmouse, frustrating loop select for
example.

Add tooltip to say this, made option to disable automatic on load (version
check) and made buttons redraw to show option being disabled.

Note; wrapping middle mouse to ALT+RMB will frustrate 1 button mices... the
current code for leftmouse-select is a hack at best, better do this good
when we have proper event handlers system.
2004-11-29 12:15:25 +00:00
230784b824 Bug fix #1893
Option to switch left/right mouse didn't work for floating panels. It then
still selected stuff behind the button.
Was due to using wrong variable for events.
2004-11-26 20:20:42 +00:00
3e8d8f4825 Since the outliner is now the default (rather than the OOPS
Schematic), we now call it 'Outliner' in the menu.
2004-11-14 13:35:57 +00:00
9393dd08af Fixed showstopper (thnx intrr!) bug in sequencer + global undo.
This was actually a wrong pointer check in fileread that caused no harm
in past, but with UI-less file save it wreaked havoc!

Decided to add undo in sequencer window after all... it also involved
saving Meta strip settings in files. Very nice :)
2004-11-13 12:55:59 +00:00
7777fa9ae2 - Bug located in outliner (missing break) by sgefant, thnx!
- On click on camera object in outliner, world buttons didnt display always

Plus; commented out the calls to select items with rightmouse. This is too
much WIP for official release, too much not working, and Matt prefers time
to further work on it as well.
2004-11-08 23:31:01 +00:00
061cde65a6 To end the issues with AA (International) Fonts; the .bfont.tff now is
compiled in (datatoc) and doesn't need installation anymore.

Also reviewed weird path conventions for searching AA fonts;

- U.fontdir is only used as standard search path for fileselecting
- U.fontname stores only full path to AA font if used one
- If a font cannot be found, it always falls back to the compiled in one
- If .B.blend is saved with default font, U.fontname is not set

Also added a button in usermenu "restore default".

When this works as expected, I'll commit changes for installation too.
2004-11-08 15:46:57 +00:00
fcd0a3f9d2 Undo for lattice editmode added. 2004-11-07 21:14:21 +00:00
1ba95262f6 More undo goodies;
- Undo for editmode Font object
- Undo for posemode :)
  (btw; it also means posemode remains active on file load)
2004-11-07 20:11:42 +00:00
ac0bb78a20 Tweaked the force_draw() calls, to allow headerprint() to work while
doing a transform. Solves bug reported by Brecht about this.
2004-11-07 18:20:44 +00:00
0f84375d7a Lotsa undo stuff added;
- ALT+U undo menu shows history for global undo as well
- Added undo pushes for buttons window more consistantly
- Added it & tested for ipowindow too
- Added it in outliner
- And quite some missing occasions for 3d window editing
2004-11-07 16:49:46 +00:00