Commit Graph

61 Commits

Author SHA1 Message Date
18f53d8822 Cleanup: comment block alignment 2018-01-10 19:57:02 +11:00
c90452e111 BLI_rect: Function to calculate a matrix from 2 rctf's 2017-08-27 16:19:34 +10:00
bddb4de47c Fix T51845 2017-06-23 11:05:54 +03:00
6f3f891c58 Rename BLI_rct*_init_pt_size -> radius 2017-03-08 23:23:39 +11:00
4a4d71414e BLI_rect: add init from point functions
Initialize a rectangle from point+size.
2017-03-05 20:51:23 +11:00
32c65faeb9 Cleanup: redundant assignment in rect resize 2017-01-02 13:56:19 +11:00
a7ac59414b Cleanup: rename line to segments, avoids confusion
Differentiate between lines and segments.
2015-11-13 07:48:05 +11:00
2927fa4450 correct own error in rectangle clamping 2015-10-17 18:52:05 +11:00
e6aa464757 BLI_rect: add BLI_rctf_clamp
Clamp one rect within another.

This is done inline in the UI code, which gets verbose.
2015-10-17 00:03:29 +11:00
99cf636e84 Cleanup: redundant struct qualifiers 2015-10-17 00:02:07 +11:00
6cee6607a2 UI: avoid subtracting shadow from winrct
For popup interactions we need to know if events are in the region or not,
however subtracting the shadow isn't so reliable, since its not always added to all sides of a popup.

Instead, get the winrct value from a popup using the block rect, otherwise the winrct as-is.
2015-08-18 14:16:58 +10:00
Julian Eisel
939948c233 File Browser Arrow Keys Navigation
Adds support for selecting/deselecting files in File Browser using the
arrow keys. All directions (up, down, left, right) are possible.

When to Select, When to Deselect?
Standard behaviour is selecting, however if we move into a block of
already selected files (meaning 2+ files are selected) we start
deselecting

Possible Selection Methods
Simple selection (arrow-key): All other files are deselected
Expand selection (Shift+arrow key): Add to/remove from existing
selection
ill-Expand selection (Ctrl+Shift+arrow key): Add to/remove from existing
selection and fill everything in-between

From which file do we start navigating?
From each available selection method (Mouse-, Walk-, All-, Border
Select), we use the last selected file. If there's no selection at all
we use the first (down/right arrow) or last (up/left arrow) file.
(Ideally, the view would automatically be set to the new selection, but
this behaviour overlaps with an other patch I've been working on, so
prefer to do that separately)

(Also tweaks color for highlighted file for better feedback)

D1297, Review done by @campbellbarton, thx a lot :)
2015-06-11 17:20:29 +02:00
3cee9d6939 Simplify recent commit 2015-03-25 20:29:38 +11:00
3eb33b804d Fix T44118: Rotated background image disappears
Image clipping didn't take rotation into account.
2015-03-25 19:49:14 +11:00
6a4567b9ab BLI Rect: utility function to transform a point using 2 rect's 2014-03-09 15:48:09 +11:00
b8b412230b Code Cleanup: use iroundf
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
72d950ba49 Rectangle API: add single axis intersection check 2013-12-06 18:48:55 +11:00
63caaa2b12 Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
2013-11-26 06:39:14 +11:00
Lukas Toenne
61c411068b Patch #37274: Circle select for node editor, by Henrik Aarnio (hjaarnio).
Circle select was missing from node editor, and C key was assigned to now defunct "show cyclic dependencies". This patch remaps the key and adds circle select operator.
Functions to check intersection between rctf/rcti and a circle were also added to rct.c for code cleanliness and consistency.
2013-11-06 19:21:42 +00:00
9b5be450d8 text rendering: shadow offset was causing text to clip, now check for clipping without the shadow since not-drawing characters because of subtle effect is rather annoying. 2013-06-06 21:43:52 +00:00
d466e1d3b4 add BLI_rcti,f_recenter()
fix for uninitialized variable use in radial_control_get_properties() and bad cast in bpy api's foreach_parse_args()
2013-03-19 10:54:52 +00:00
221a383366 use 'bool' for BLI_/BKE_ functions. 2013-03-09 05:35:49 +00:00
f68e9db583 add padding for node view-all, view-home operators. 2013-01-11 04:34:15 +00:00
634b22fc46 code cleanup: spelling labda -> lambda 2012-12-11 14:18:37 +00:00
fae6c35ca7 code cleanup: quiet -Wdouble-promotion, disabled this warnings for a few files since its done throughout the code in some places. 2012-11-04 07:18:29 +00:00
c3ca19800c refactor screen foreach functions to accept float[2] arguments rather then int pairs.
overall means less converting between float and int (and short in some cases).
2012-10-10 01:22:19 +00:00
3ff23b753e rect/point clamping function: BLI_rct*_clamp_pt_v 2012-09-22 12:23:17 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
56b28635e7 code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our naming convention. 2012-08-23 18:25:45 +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
ab662a1e02 fix for own commit r49991, this exposed bad logic in rect copy function. 2012-08-18 20:54:43 +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
c985a40abb fix for own error confusing FLT_MIN with -FLT_MAX (didnt get into a release, dont include in log) 2012-08-07 18:41:47 +00:00
7cc5af4ef3 minor refactor for rect functions. more consistent naming. 2012-07-15 00:29:56 +00:00
9e09005e49 add is_quad_convex_v2(), SET_UINT_IN_POINTER, GET_UINT_FROM_POINTER macros & some minor edits. 2012-07-14 00:33:58 +00:00
38f91db37c add bli rect min/max functions. 2012-07-12 09:24:17 +00:00
993dfd7d2a add bli rect funcs BLI_rctf_init_minmax, BLI_rcti_init_minmax 2012-07-12 08:31:23 +00:00
a5127dba57 vector versions of BLI_in_rctf / BLI_in_rcti, (BLI_in_rctf_v, BLI_in_rcti_v)
use where possible.
2012-07-11 18:17:48 +00:00
bddc7dfc20 style cleanup: remaining BLI files. 2012-05-12 15:13:06 +00:00
1f3e453509 fix [#30848] Edge Selection fails when the following Conditions met:
summery: when both verts are outside the viewport

this is in fact a very old annoyance but good to resolve.
fix by doing segment/rectangle intersection between the edge and the viewport so it works when the both verts are outside the view.
2012-04-10 07:30:08 +00:00
a97825dfd7 stule cleanup for rct.c and fix for error in last commit. 2012-03-13 01:55:25 +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
3a81f23e09 warning cleanup for -Wdouble-promotion 2011-08-19 16:21:29 +00:00
9296060082 Fix print_rctf not printing y max correct. 2011-05-23 14:51:31 +00:00
ed0167175b bugfix [#26505] zoom in selected keys on graph editor
measure uv vertex distance in screen pixels rather then image.
2011-03-15 03:02:12 +00:00
Nathan Letwory
7900b5949f doxygen: blender/blenlib tagged. 2011-02-27 20:37:56 +00:00
8b7482892b made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors. 2011-02-14 17:55:27 +00:00
81d5e4f8df bugfix [#22819] Grease Pencil: OpenGL render incorrect if view mode, OK with cursor mode
also made drawing in camera view stick to the camera border (belated durian request),
useful for animation review without worrying about screensize moving the overlay about.
2010-08-25 08:31:52 +00:00