Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
team.
There are 3 options here:
1) Keep range (previous behaviour)
2) Seconds - allows a specified offset in seconds around current frame
3) keyframes - zoom to include a number of keyframes around the cursor
Options 2 and 3 have their own properties to tweak the behaviour and all
options can be found in User Preferences->Interface under the 2D
viewports section.
Number 3 will probably need some refinement so commiting here for the
hwoozeberry team to test first.
|
|
|
|
Term pointer is overloaded already.
|
|
|
|
scene frame, bound to numberpad zero.
|
|
reached
There are a couple of things that I don't like here, but it seems like
the best way to handle this for now.
|
|
Make the UI API more consistent and reduce confusion with some naming.
mainly:
- API function calls
- enum values
some internal static functions have been left for now
|
|
This reverts commit 507712db3fd7aa7bb903f6860f5a4eb29aa2be02.
Error was quite an old compiler, which had further warnings/errors.
Old compilers can just have this defined in BLI_math
|
|
Avoid using roundf function, since it's oly defined in C99
|
|
Hide zoom settings that have no use in UI/shortcuts definitions.
|
|
|
|
|
|
|
|
|
|
View2D had some inconsistencies making it error prone in some cases.
- Inconstant checking for NULL x/y args.
Disallow NULL args for x/y destination pointers, instead add:
- UI_view2d_region_to_view_x/y
- UI_view2d_view_to_region_x/y
- '_no_clip' suffix wasn't always used for non-clipping conversion,
switch it around and use a '_clip' suffix for all funcs that clip.
- UI_view2d_text_cache_add now clips before adding cache.
- '_clip' funcs return a bool to quickly check if its in the view.
- add conversion for rectangles, since this is a common task:
- UI_view2d_view_to_region_rcti
- UI_view2d_region_to_view_rctf
|
|
|
|
|
|
|
|
image, mce, view2d and view3d now have matching pan speed.
|
|
|
|
|
|
|
|
- move cache reset into view2d and comment about the rationale for resetting cache there.
- missed other places where view2d zoom level can change (smoothview, borderzoom, home and file reload)
- comment about DPI wasn't correct.
|
|
Issue is not noticeable with default font, but i18n one can use more than 500Mo of ram when cached in undreds of different sizes.
Campbell had already done most of the work in rBa780e7f3f09f and rB6b283f116829, just had to call BLF_cache_clear() in _exit funcs of VIEW2D_zoom & co operators.
|
|
|
|
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
|
|
OPERATOR_CANCELLED.
|
|
update some descriptions, others were removed and operators tagged as internal.
add a script to detect duplicate operator descriptions.
|
|
when running viewport operations with exec() rather then invoke(), perform the action immediately rather then using smoothview.
makes viewport operations usable from python scripts.
|
|
related functions.
|
|
Actually, happened in any view2D... Just added a call to WM_event_add_mousemove() in view_pan_apply, so that overed/active button is refreshed in this case.
|
|
|
|
indent.
also indent case's within the switch (we already did both of these almost everywhere)
|
|
|
|
|
|
Fix for 2.66a
Some editors in Blender (Like Graph) have "maxzoom" set to 0, which caused the
MMB zoom sensitivity to be minimal. That used to be much more responsive, restored
it to how it worked before.
|
|
|
|
CTRL + MMB zoom in 2d editors now depends on 'max zoom' level. This makes
zooms in UI (very limited) go smoother, but for fcurve or timeline it's same.
|
|
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.
|
|
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 :)
|
|
- 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 :)
|
|
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.
|
|
- 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).
|
|
User preference "Zoom Scale" didn't work correct for 2d views.
(was calculating center of region badly).
|
|
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
|
|
|