Commit Graph

154 Commits

Author SHA1 Message Date
7db00f0826 Usability:
Ancient annoying thing for zooming in 2d views: when a view was restricted to keep
aspect ratio, it only allowed vertical or horizontal MMB-drag zooms, depending 
portrait or landscape size of editors. Same for trackpad and magic mouse.

Now vertical zoom drag always works for editors like buttons, nodes.
2013-01-12 11:00:27 +00:00
16ca65e4a9 Solving nasty annoyance:
Trackpad zoom (swipe + CTRL) direction was inverted compared to MMB-drag
or scrollwheel usage. In the 3D viewport it was OK, in all others not.

Now the same physical gesture maps identical to zooming everywhere. Or to
recap (with blender factory settings)

Zooming in:
- MMB-drag, move mouse towards screen
- Scroll wheel, move finger towards screen
- Magic Mouse, move finger towards screen
- Trackpad 2-finger swipe: move fingers toward screen.

To make this extra confusing: this is only consistent if you set your system
to inperpret trackpad swipes as "inverted" (pan view left = swipe to right).
This is a typical default, although Apple wants you to call this "Unnatural" :)

Next commit will be testing on laptop if all pinch gestures zoom consistent.

And following to that, a sensible user preference to map trackpad use for
Blender yourself, to invert system defaults again. :)

Blame and thanks goes to Sebastian Koenig, for his perseverance on getting this
solved :)
2013-01-06 11:16:49 +00:00
dfc63e98bc Trackpad fixes & changes:
- UV Image editor and other 2d views didn't zoom for CTRL+swipe yet.
  (2 finger trackpad, 1 finger mighty mouse)

- Switched defaults for 3D window swiping...
  - default rotate view
  - SHIFT for translate
  - CTRL for zooms

This makes all editors use 'swipe' like 'middle mouse', and not
like scrollwheel (as in releases).

This is nice for consistancy, but it still feels a bit weird...

Of course users can config this in keymaps. We need a sensible
default though, and to make a 2D input input device behave like
middle mouse seeems more sensible than like a 1D wheel...

Proposal therefore for defaults:

- 1D scrollwheels: zoom in 3d, zoom in 2d, but scroll for list views.

- 2D trackpads: pan for all 2d views, rotate for 3D

I'll check with frequent trackpad users about this and we can freeze it
before release. Give it a try :)
2012-12-29 13:21:01 +00:00
fa28e50ac2 Region scrollbar fix!
Now scrollbars correctly hide and show, making space for the actual contents
in a region. It solves several old hacks, and puts view2d code a bit more
back in control as well. 

Implementation notes:

- The view2d mask feature is working again
- The #define V2D_SCROLL_HORIZONTAL_HIDE means: "turn on hiding".
- Code for UI_view2d_region_reinit() is enforcing better standard view settings

But... two hack/patches needed to be added:

- Region panel drawing: if after generating the button panels it appears
  a scroller hides or reveils, it calls all the generating code again.
  (a simple scale doesn't work due to rounding differences in layout code)

- View2d code that maps 'tot' and 'cur' rects: if this code detects that
  the mask changes, it calcs the map code again.

Also a bugfix (issue in 2.65)

- The left/bottom area split widget was drawing 1 pixel too large sometimes, 
  leaving bad trails on moving area dividers.
2012-12-26 13:05:39 +00:00
2a5cabb039 code cleanup and minor changes
- use DummyRNA_NULL_items to replace empty enums.
- replace calloc with malloc in copy_dverts since its copied over after.
- add wmGesture->userdata, so operators that use gestures have somewhere to store their own data (not used yet).
2012-12-22 01:08:42 +00:00
4d8f340d3e Bug fix, own collection:
User preference "Zoom Scale" didn't work correct for 2d views.
(was calculating center of region badly).
2012-12-21 16:11:50 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
34f674c60e Make zoom direction consistent all over the editors
Was discussed in De Balie with lots of artists and we agreed it makes more
sense to behave this way
2012-10-13 16:42:12 +00:00
affb060c20 Revert part of 51209 -- MOUSEZOOM inversion should be done in lots of other
places as well, but it's quite large change to be done before 'a' release.

For now ignore zoom inverse for 2d view to keep things consistent,
would be re-implemented for all areas after this.
2012-10-09 11:38:42 +00:00
58e8d0b57e OSX zoom pinch was using inverted direction 2012-10-09 09:38:05 +00:00
de6e47ab3d Correction to zoom-t-mouse formula which was broken since view2d drag zoom refactoring 2012-10-08 17:41:27 +00:00
cd560a1e6a Made View2D drag zoom behave in the same way as zoom in 3d viewport
Initially issue was caused by opposite MMB-Drag zoom direction in nodes editor.

Made it so MMB-Drag in negative axis direction (down for Y axis and left for
X axis) would zoom in, moving in opposite direction will zoom out.

This could kind of break muscule memory, but after discussion with Campbell
decided it's not so big a problem -- seems users weren't related on direction
of zoom in and just waved mouse around until zoom is correct. And now muscule
memory should even be a bit better -- drag zoom is unified between different
areas.
2012-09-28 12:01:21 +00:00
a8ec2a536d fix [#31476] DopeSheet GreasePencil Mode Window won't scroll up 2012-09-28 09:12:02 +00:00
0af15a08da correct own typo from r43404 2012-09-28 09:00:42 +00:00
a12f5bbc7d correct debug/test assignment being left in the UI_view2d_smooth_view() so it always recalculated. 2012-09-26 20:14:30 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
aa2d84da37 style cleanup:
also remove some redundant conversions int -> short -> int
2012-09-09 00:00:21 +00:00
7b84a75a22 Fix zooming in/out preview in sequencer
It was a regression since disabling Y-axis zooming in sequencer.
Now check region type and allow all kind of zooming for preview
region.
2012-08-26 16:41:03 +00:00
f4ab3b9d8b sequencer zooms horizontal only from mouse wheel and plus buttons. 2012-08-23 14:49:20 +00:00
c92ab5c3ef code cleanup: use rect size macros 2012-08-21 20:34:05 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
26f073b327 macros for rectangle center and size 2012-08-20 15:29:02 +00:00
7d3e854aeb add hook now has option to add to active bone (mango request). 2012-08-13 08:54:33 +00:00
3c2b4107de confusion minf/fmin, broke msvc 2012-08-12 19:41:47 +00:00
c140ccb9fd 2d smoothview now scales back the time to move for smaller view zoom/panning.
also the compositor bounds (used for scroll bars), were only calculated when pressing the home key in 2.63, how this is updated on draw
2012-08-12 19:35:47 +00:00
9cce2d8645 smooth-view for 2d views, graph editor, sequencer, node view, works with border zoom, view selected, view all. 2012-08-12 01:07:31 +00:00
5e0f254afa utility functions for getting/setting rectangles for operators. 2012-08-08 20:38:55 +00:00
2a98e83abd style cleanup 2012-07-21 16:21:42 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
a6ebffe182 style cleanup: interface 2012-03-30 01:51:25 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
4c3bb77012 style cleanup: spaces aroudn operators for operator definitions. 2012-03-22 07:26:09 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
9d49fa0e63 style cleanup - spelling corrections & update some incorrect comments. 2012-03-03 11:45:08 +00:00
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
e1dd245a1e more keymap edits
- make sure defaults are not assumed (so reuse last settings doesnt
override)
- replace 0/1 for TRUE/FALSE defines.
2012-01-16 16:12:03 +00:00
23806a2b7d support for quick jump to scroll area with middle mouse clicking on scroll area (become used to this for qt and gtk apps) 2012-01-15 17:26:30 +00:00
d6e0d0fd89 Fix for [#28978]
Disabling mode switching in panning in 2d as it is disabled in 3d also.
Apparently, it is a not good idea to call modal method from a modal method as the last won't be canceled.
2012-01-08 05:10:52 +00:00
4924abaad6 replace fabs with fabsf where both input and output are floats. 2011-11-19 01:10:05 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
274b9c8fb8 whitespace cleanup 2011-09-25 12:31:21 +00:00
8dbc7a3ba3 Merging r40345 through r40365 from trunk into soc-2011-garlic 2011-09-19 15:47:05 +00:00
f157a543c6 /blender/editors: Removed final points in UI strings and messages.
Plus a few cuts in very long lines…
2011-09-19 12:26:20 +00:00
0eda51f2ea Fixing issues with i18n stuff:
- Make gettext stuff draw-time. so switching between languages
  can happens without restart now.
- Added option to translate visible interface (menus, buttons, labels)
  and tooltips. Now it's possible to have english UI and localized tooltips.
- Clean-up sources, do not use gettext stuff for things which can be
  collected with RNA.
- Fix issues with windows 64bit and ru_RU locale on my desktop
  (it was codepage issue).
- Added operator "Get Messages" which generates new text block with
  with all strings collected from RNA.
- Changed script for updating blender.pot so now it appends
  messages collected from rna to automatically gathered messages.
  To update .pot you have to re-generate messages.txt using "Get Messages"
  operator and then run update_pot script.
- Clean up old translation stuff which wasn't used and most probably
  wouldn't be used.
- Return back "International Fonts" option, so if it's disabled, no
  gettext lookups happens on draw.
- Merged read_homefile function back. No need in splitting it.

TODO:
- Custom fonts and font size.
  Current font isn't nice at least for russian locale, it's
  difficult to read it.
- Put references to messages.txt so gettext can merge translation when
  name/description of some property changes.
2011-09-15 13:20:18 +00:00
Xiao Xiangquan
77926a7f9d select uiStyle according to UserDef and update lang-packs 2011-07-16 18:28:24 +00:00