Commit Graph

20503 Commits

Author SHA1 Message Date
Campbell Barton
3b57504c09 error in last commit 2017-08-03 20:05:43 +10:00
Campbell Barton
c3eac16eb7 Manipulator: disallow negative scale when resizing 2017-08-03 20:04:22 +10:00
Campbell Barton
c8d02fce93 Manipulator: use matrix to convert view coords
Was doing this with property get/set but this made view operations
require refreshing manipulator properties.
Simplify by operating on properties in their own space.

Also disable clamping for now since it assumes pixel-space.
2017-08-03 19:45:56 +10:00
Campbell Barton
e92cf80a5c Fix for last commit
Missed check for non-camera view frame
2017-08-03 18:09:11 +10:00
Campbell Barton
fe8fcb4343 Manipulator: render border widget
Note there are issues clamping & updating,
will resolve as part of changes to cage2d widget.
2017-08-03 17:57:00 +10:00
Campbell Barton
4fada2e10f Manipulator: Use 2D manipulators in the 3D view
Also split update flag into draw-steps,
since drawing 3D manipulators was tagging 2D as being refreshed.
2017-08-03 15:12:47 +10:00
Campbell Barton
fc9da74942 Manipulator: use default for cage2d dimensions
Also minor cleanuup, assign new vars for manipulator group.
2017-08-03 11:28:26 +10:00
Campbell Barton
acde5bb669 Cleanup: split 3D view manipulators by type 2017-08-03 08:30:58 +10:00
Campbell Barton
be7de5f239 Cleanup: warnings 2017-08-03 08:08:47 +10:00
Campbell Barton
cd2bb7831d Cleanup: rename selectionbase -> select_id 2017-08-03 08:01:09 +10:00
Campbell Barton
ca67cdb73c Merge branch 'master' into blender2.8 2017-08-03 07:14:02 +10:00
Joshua Leung
3e6f5f3643 GraphEdit Handle Drawing: Fix handle-vertex size regression (2.7 -> 2.8)
Keyframe handle vertices (the circles on the ends of the handles)
should always be larger than the central vertex. This brings back the
"outer" radius value from the old gluDisk(), and doubles it to get the
necessary diameter, to scale it properly.

TODO's:
- Get rid of all fills inside these circles
- Make the central vertex square-shaped again
2017-08-03 01:52:07 +12:00
Joshua Leung
440bce242d Keyframe Drawing: Fix 2.7 -> 2.8 regressions
* Outlines of keyframes were too thick and ugly

* Size differences between keyframe types was being swallowed
  by the pixel-fudge factor, leaving colour as the only distinguishing
  factor (bad!)
2017-08-03 01:25:55 +12:00
Campbell Barton
b569151ffb Manipulator: add area lamp manipulator 2017-08-02 19:22:35 +10:00
Campbell Barton
dc4ded855a Manipulator: Make cage2d usable in the 3D view 2017-08-02 19:22:29 +10:00
Campbell Barton
1b51c34e8b Manipulator: correct cage-2d scale update 2017-08-02 08:34:59 +10:00
Bastien Montagne
636289b755 Fix multi-units drawing re precision handling.
This is still far from prefect, but yet much better than what we had so
far (more consistent with inheritent precision available in floats).

Note that this fixes some (currently commented out) units unittests, and
requires adjusting some others, will be done in next commit.
2017-08-01 16:42:35 +02:00
Campbell Barton
110d6832a8 Fix typo in 2d-cage manipulator 2017-08-01 21:22:17 +10:00
Campbell Barton
4c38d84e73 Cleanup: double promotion 2017-08-01 13:35:26 +10:00
Campbell Barton
8ddaa6a4e2 Merge branch 'master' into blender2.8 2017-08-01 10:38:36 +10:00
Campbell Barton
a372638a76 Cleanup: use static vars where appropriate 2017-08-01 09:06:34 +10:00
Campbell Barton
2b7edb77c9 Fix fcurve color assignment 2017-08-01 08:27:35 +10:00
Brecht Van Lommel
becb413f29 Fix T52224: auto IK not respecting length, after recent bugfix. 2017-07-31 19:22:03 +02:00
Bastien Montagne
b6cb7b2c92 Fix two issues with recent changes to number display while editing them.
* Numbers with units (especially, angles) where not handled correctly
regarding number of significant digits (spotted by @brecht in T52222
comment, thanks).
* Zero value has no valid log, need to take that into account!
2017-07-31 15:43:14 +02:00
Campbell Barton
538b191a03 Correct last commit, for-loop included NULL check 2017-07-31 11:39:17 +10:00
Campbell Barton
49c0ad1188 Revert "Fix manipulator handles getting added each refresh"
This reverts commit 122706db9c.

Would loose manipulators, will check for duplicates instead.
2017-07-30 15:38:32 +10:00
Campbell Barton
1ee11b5085 Merge branch 'master' into blender2.8 2017-07-29 08:49:34 +10:00
Campbell Barton
fb1cd7648f Cleanup: quiet picky ubsan warnings 2017-07-29 08:42:32 +10:00
Campbell Barton
0e26707bce Merge branch 'master' into blender2.8 2017-07-29 06:44:04 +10:00
Campbell Barton
214bbd4c02 Replace magic numbers with deprecated names
The names aren't meaningful but means it wont
accidentally use valid names.

Also remove textured-font setting
2017-07-29 06:27:40 +10:00
Campbell Barton
f3782c0a9e Fix T52195: Sculpt from Python fails
When calling sculpt from Python,
setting 3D 'location' but not 2D 'mouse' stopped working in 2.78.

Now check if the operator is running non-interactively and
skip the mouse-over check.
2017-07-29 06:05:43 +10:00
Campbell Barton
c558763ef5 Merge branch 'master' into blender2.8 2017-07-29 01:46:27 +10:00
Campbell Barton
e038830650 Resolve T45301 by adding option for old behavior
Some users really liked previous behavior,
so making it an option.

Cursor Lock Adjustment can be disabled to give something close to
2.4x behavior of cursor locking.

When lock-adjustment is disabled placing the cursor the view.
This avoids the issue reported in T40353
where the cursor could get *lost*.
2017-07-29 01:37:51 +10:00
Campbell Barton
2eb2655181 Cleanup: clear deprecated UI flags
Also adds cursor-lock flag, to be used in next commit.
2017-07-29 01:28:58 +10:00
Bastien Montagne
38eabcb858 Fix potential 'divide-by-zero' in our UI fitting code.
Reported by coverity, better fix even if highly unlikely to happen...
2017-07-28 10:56:41 +02:00
Bastien Montagne
304e5541cb Fix T52208: Using UI_BUT_REDALERT flag for UI_BTYPE_KEY_EVENT buttons crashes Blender.
but pointer was not assigned in that case...
2017-07-28 10:38:47 +02:00
Sergey Sharybin
03d258d613 Copy on write: Prevent crash when duplicating object with particle system
Transform system was using global main, which might have been pointing to a
freed scene layer.
2017-07-27 16:28:16 +02:00
Jeff Knox
f1d6bad4b6 Fix T51776: Make sure button icons are updated on Ctrl-ScrollWheel 2017-07-27 12:55:17 +02:00
Julian Eisel
980efaf4fd Fix button text overlapping with shortcut text in popups
The purpose of the keymap strings is probably for un-embossed menu items
like seen in most pulldowns. I can't see a reason for also adding that
string for regularly drawn buttons within popups, we don't add it
anywhere else in the UI either. So this commit makes sure shortcut
strings are only added to buttons that are drawn like pulldown-menu
items.
2017-07-27 12:28:16 +02:00
Julian Eisel
492b5d0bc3 Minor code style corrections 2017-07-27 12:28:16 +02:00
Aleksandr Zinovev
c72eb6288e Fix Label colors in popups 2017-07-27 12:28:16 +02:00
Aleksandr Zinovev
72e228a155 Fix: use click style if a pie was spawned by release or click event 2017-07-27 12:28:16 +02:00
Julian Eisel
920bff5224 Fix button text overlapping with shortcut text in popups
The purpose of the keymap strings is probably for un-embossed menu items
like seen in most pulldowns. I can't see a reason for also adding that
string for regularly drawn buttons within popups, we don't add it
anywhere else in the UI either. So this commit makes sure shortcut
strings are only added to buttons that are drawn like pulldown-menu
items.
2017-07-27 11:49:41 +02:00
Julian Eisel
129c3ac7b3 Minor code style corrections 2017-07-27 11:44:51 +02:00
Aleksandr Zinovev
ec22809025 Fix Label colors in popups 2017-07-27 10:27:29 +03:00
Aleksandr Zinovev
3e8b2288f5 Fix: use click style if a pie was spawned by release or click event 2017-07-27 10:13:40 +03:00
Campbell Barton
b01d38ef7d Manipulator: remove names
They weren't used anywhere,
both C & Py manipulators better assign to vars (no lookup needed).
2017-07-27 07:43:15 +10:00
Sergey Sharybin
723f2b292f Fix T52186: Crash on bevel
bContext is not always available in transform, so need to use explicit
scene and scene layer to create evaluation context from.
2017-07-26 16:33:44 +02:00
Campbell Barton
2e83897f91 Cleanup: typedef enums
Manipulator enum types are easy to confuse, use typedefs.
2017-07-26 18:00:26 +10:00
Campbell Barton
8c3ecc9651 Workaround for crash drawing face-maps after undo 2017-07-26 05:10:20 +10:00