Commit Graph

78 Commits

Author SHA1 Message Date
Campbell Barton
159a7e8b38 UI: replace transform hand icon w/ 4 arrows
The hand doesn't have a hotspot which you might want using manipulators
2018-04-28 09:14:02 +02:00
Campbell Barton
617534327a Cleanup: style, duplicate includes 2018-04-28 09:02:22 +02:00
Campbell Barton
6866547517 Fix cursor switching w/ transform redo
Recent cursor changes stopped number button continuous grab.
2018-04-25 10:15:20 +02:00
Campbell Barton
3ae4aa720f Cleanup: indentation 2018-04-25 10:10:00 +02:00
Ines Almeida
574c0fe38f Manipulators/Tools: always draw a cursor while interacting
Cursor can be a system one or drawn with OpenGL.
Before, dragging the transform manipulator would hide the cursor and reset it to the initial positon.
2018-04-23 00:59:01 +02:00
Campbell Barton
863f0434ec Fix T51691: Shear cursor input scales w/ zoom
Use relative value from cursor movement.
2017-06-02 20:40:41 +10:00
Campbell Barton
d508b69e44 Cleanup: gcc7.1 warnings 2017-05-16 12:46:52 +10:00
Sergey Sharybin
e138cdeeb6 Transform manipulator: Allow first clicking Shift before selecting axis
Avoids possible jumps when one is trying to do some really preciese tweak.

Quite striaghtforward change for mouse input initialization: take Shift
state into account. However, this will interfere with the axis exclusion
which is currently also uses Shift (the feature to move something in a
plane which doesn't have selected axis). This is probably not so commonly
used feature (nobody in the studio even knew of it) and the only downside
now would be that such a constrainted movement will become accurate by
default. That's easy to deal from user side by just unholding Shift key.

Reviewers: brecht, mont29, Severin

Differential Revision: https://developer.blender.org/D2418
2017-01-18 12:18:54 +01:00
Campbell Barton
a57d9f725f Fix crash running transform in background mode 2016-01-29 15:12:57 +11:00
Campbell Barton
1554a4c2a0 Transform: bend-mouse-input error initializing
Missed from transform-mouse-input changes.
2015-12-17 19:45:29 +11:00
Campbell Barton
8d8bc24dd5 Cleanup: double-conversion warnings 2015-12-02 15:52:47 +11:00
Campbell Barton
833ef0cfdd Transform input: don't change initial cursor value
Store previous coords in cursor data instead.
2015-11-12 22:58:35 +11:00
Campbell Barton
e6abc3ad57 Transform: Support storing virtual cursor location
Grabbing now doesn't 'jump' when shift is released (matching rotation modes).

This simplifies most logic for transform input,
where mouse input callbacks can choose to use the 'virtual' cursor,
which accounts for precision when shift is held.
2015-10-30 18:24:02 +11:00
Campbell Barton
e0c60985b6 Transform: Replace t->imval w/ t->mouse.imval
Initial mouse position was saved in two different places

D1588 by @mauge
2015-10-28 23:31:15 +11:00
Campbell Barton
19137e86bb Fix T46606: Trackball Rotate jumps releasing shift 2015-10-27 21:49:51 +11:00
Campbell Barton
8cd9d784c7 Replace sqrt with hypot for wipe-effect & transform code 2014-06-14 17:34:52 +10:00
Sergey Sharybin
c918f24edb Tweaks to bevel and crease transform
They were using INPUT_SPRING in a way which didn't allow
it to easily redo the operator because INPUT_SPRING internally
is stored as a ration between old value and new one and crease
and bevel were converting this to value delta.

Now made it special input type INPUT_SPRING_DELTA which is
storing delta of the spring, meaning now values in the redo
panel kind of makes sense -- they mean how much to add/remove
to the crease/bevel weight.

Expect to be no functional changes from interactive transform
POV, just a bit more convenient to use redo panel.
2014-06-03 22:05:33 +06:00
Campbell Barton
c67bd49e56 Code cleanup: use 'const' for arrays (editors) 2014-04-27 00:25:15 +10:00
Joshua Leung
b1932477a7 Spelling error fixes 2014-04-25 13:19:21 +12:00
Campbell Barton
7199e2288f Code cleanup: use sqrtf when input and output are float 2014-03-28 14:53:37 +11:00
Campbell Barton
5816aa42bf code cleanup: minor transform refactor
redraw flag were mixing up types - int/char/bool, add enum type to use instead.
2013-10-23 06:48:36 +00:00
Campbell Barton
b00a8122e3 improve warp transform so it can be used as a general bending tool too. 2013-10-13 01:09:23 +00:00
Campbell Barton
7998b2f6a7 transform - use 2d float's for the viewport center (allows for vector math functions to be used more easily). 2013-10-12 03:42:06 +00:00
Campbell Barton
f3518d9d76 fix for crash changing transform modes rotate/edge-slide/grab. setCustomPoints() assumed allocated member was big enough which wasnt the case when switching from rotate. 2013-04-24 15:06:42 +00:00
Campbell Barton
e0464a0549 code cleanup: remove unused vars in edge slide, only store the initial vertex coords rather then a copy of the whole vertex, name edge slide directions a/b rather then up/dowb. 2013-04-19 02:22:23 +00:00
Campbell Barton
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
Campbell Barton
b2feb19c02 fix for memory leak in transform when changing transform modes within transform
(if you held down the R-key for example).
2013-02-11 02:06:19 +00:00
Campbell Barton
518bfbb1c9 style cleanup 2013-02-02 04:58:03 +00:00
Campbell Barton
c734808fb0 fix error with flipped vertex slide failing, also fix bug where you could be flipped and in proportional vertex slide mode. 2013-01-31 22:18:37 +00:00
Campbell Barton
2e154f7ce5 vertex slide was using flipped value, wasnt so noticable unless you types in a value. 2013-01-15 03:35:31 +00:00
Campbell Barton
e0388a881b fix for own error with unwrap selection checking uvedit_have_selection() failed with no UV layer.
also add some safety checks for BM_ELEM_CD_GET_* macros.
2013-01-14 08:02:06 +00:00
Campbell Barton
5e9ee25328 style cleanup 2012-12-14 04:38:52 +00:00
Brecht Van Lommel
0c3103ac85 Fix #33500: when transforming, tapping shift twice and holding did not enable
precision mode. Not really the intended way to use this but it revealed a bug
in the event handling here.
2012-12-13 07:32:31 +00:00
Campbell Barton
869efe927c style cleanup 2012-06-10 22:13:17 +00:00
Campbell Barton
d2a37d464a code cleanup: double promotion warnings 2012-05-22 21:16:59 +00:00
Campbell Barton
3896ad4cbb code cleanup: spelling 2012-05-20 21:23:26 +00:00
Campbell Barton
ed679693c9 style cleanup: whitespace/indentation 2012-05-19 13:55:54 +00:00
Campbell Barton
d20c129a9c style cleanup: whitespace/operators 2012-05-09 09:24:15 +00:00
Campbell Barton
5da2135eef code cleanup: double promotion & some style cleanup 2012-05-03 21:35:04 +00:00
Campbell Barton
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
Campbell Barton
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
Campbell Barton
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
Brecht Van Lommel
4344d84c02 Fix #29483: edge slide gives nan when zoomed in close. Cause was integer
overflow leading to negative value for sqrt().
2011-12-03 13:16:32 +00:00
Campbell Barton
96d73bfdcf replace VECCOPY with copy_v3_v3, same for 2d copy, also added vec copy functions for int & char. 2011-11-07 01:38:32 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton
818c098004 comment own recent memory leak fix since it broke edge slide. 2011-10-13 14:32:45 +00:00
Campbell Barton
19b9329885 fix for leak when switching between transform rotation modes. 2011-10-13 04:44:39 +00:00
Campbell Barton
018fa1540e whitespace edits, make formatting for functions consustent at least within the file. 2011-09-28 05:53:40 +00:00
Campbell Barton
9f766c71b0 use event->mval rather then subtracting ar->winrct.x / y from event->x / y 2011-05-20 07:40:05 +00:00
Campbell Barton
5f5cdf9d00 for bug [#27358] Transform bug when transform > 500
mouse coords would with cont. grab would wrap at short.
use mouse coords as int rather then short.

this problem still happens on linux because of XTranslateCoordinates
2011-05-12 16:47:36 +00:00