Commit Graph

981 Commits

Author SHA1 Message Date
fadad895b2 T58338 Edit Mode rotation doesn't work if object is far away from world origin
The fix code was done by Brecht Van Lommel, I only tested that the solution works.
2018-12-03 16:26:52 +01:00
4f997c0ebb Revert "Transform: use scene-orientation for MMB axis constraint"
This reverts commit 78a6c2e12c.
2018-11-29 21:52:38 +11:00
535984a848 Cleanup: simplify transform orientation cycling
Remove dummy first index, store a pointer to the user orientation
instead of having it store twice (which could get out of sync).
2018-11-29 12:49:02 +11:00
78a6c2e12c Transform: use scene-orientation for MMB axis constraint
Follows the change made for axis keys.
2018-11-28 19:48:19 +11:00
6491d50d02 Transform: default to user-defined orientation
Previously we tried this but reverted (see 64d40c82c3)
because there wasn't a predictable set of keys to use global-space.

Now the keys are swapped:

- 'GX' always transforms in the user defined orientation.
- 'GXX' always transforms in global space.

As before 'GXXX' cycles back to disabling constraints.

This does have a down side that GXX won't be used for local-space
when the user has global space set.
Also, when global is the user-orientation, pressing GX and GXX
does the same thing.

Note: examples here use GX but could be any transform-mode/axis.
2018-11-28 10:15:02 +11:00
621405ee0f Merge branch 'master' into blender2.8 2018-11-27 11:41:33 +11:00
9a5df92c1b Fix T56872: Edge slide gives invalid normals
Add the ability to skip overwriting normals.
2018-11-27 11:40:32 +11:00
7493848008 3D View: remove 3D cursor
Use 3D cursor from the scene (was previously used for local-view).
2018-11-26 14:02:09 +11:00
774471dd45 Fix custom matrix orientation being written to scene 2018-11-21 12:58:06 +11:00
55e719ec35 Merge branch 'master' into blender2.8 2018-11-14 17:21:34 +11:00
d7f55c4ff5 Cleanup: comment block tabs 2018-11-14 17:10:56 +11:00
3064da1200 Keymap: move builtin keymaps from C to Python
This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.

Notes:

- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/blender_default.py`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907
2018-11-09 11:33:06 +11:00
eb8ddaee4c Transform: support for custom matrix property
Needed for situations when we can't use the orientation.

With extrude the initial extrusion recalculates normals for edges
and vertices which then don't give a useful axis.
2018-11-01 07:55:53 +11:00
9c23e24543 Fix T57504: Scaling 3D cursor crashes 2018-10-31 11:51:15 +11:00
c8e6134386 Fix T56499: Adapt incremental snapping to orthographic viewport scale. 2018-10-30 14:22:30 -03:00
6d49b623e2 WM: space, region type filtering for paint cursor
Avoids calling poll on mouse-move for unrelated space/region types.
2018-10-25 16:06:47 +11:00
321c8232bc Tool System: expose shear tool x/y option 2018-10-18 13:55:01 +11:00
a5467637f2 Cleanup: use mul_m3_series 2018-10-18 11:50:22 +11:00
80fb943e4f Transform: map mouse input to shear direction 2018-10-17 17:18:30 +11:00
9273b91eef Transform: show arrows for 'custom' ratio input
Arrows are now shown for vertex/edge slide.
2018-10-17 17:14:36 +11:00
5b9ab20fe4 Transform: axis support for shear tool 2018-10-16 22:06:23 +11:00
c52485c16a Editor Transform: use the dial3d drawing in the rotation operation 2018-10-03 17:45:56 -03:00
dfce96dbf7 Dial3d Gizmo: Add the Incremental Angle option to snap. 2018-10-03 17:45:55 -03:00
2d21eb79ad Units: Support for fixed units
Users can select the main unit they want to use now.
Previously the displayed unit always depended on the magnitude of the value.
The old behavior can be restored by switching to the "Adaptive" mode for length, mass and time units.

Meters, kilograms and seconds are the default units for new and old scenes.

The selected unit is also the default unit for user input.
E.g. if cm is selected, whenever the user inputs a unitless number into a field of type length, it will be interpreted as cm.

Reviewer: brecht

Differential: https://developer.blender.org/D3740
2018-10-03 10:20:16 +02:00
e44dfbbba5 Transform: enable shrink-wrap even offset by default
Holding Alt now disables.
2018-10-03 13:10:11 +10:00
58adc58661 Merge branch 'master' into blender2.8 2018-09-27 15:49:59 +02:00
a247b53084 Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3732
2018-09-27 15:36:35 +02:00
9dad2a0e08 GP: Fix Alt+S problem with multiframe edition
The stroke must not be recalc, because the number of points does not change,so the triangulation of fill is the same.
2018-09-20 12:54:19 +02:00
f1c8c25a3e UI: rename Translate/Grab to Move in UI, shortcuts stay the same. 2018-09-06 12:22:09 +02:00
ae57383648 Cleanup: comment blocks 2018-09-02 18:28:27 +10:00
6901712734 Transform: Use grid_scale to configure the incremental snapping.
`gridview` is no longer being set and also does not match the new grid's drawing.
2018-08-24 18:04:36 -03:00
eb7b450c0c Cleanup: style 2018-08-10 08:14:22 +10:00
2b41b208c7 Merge branch 'soc-2018-bevel' into blender2.8 2018-08-09 19:52:07 +05:30
85cac2221c Fix T56279: Grease Pencil transformations show a help line with wrong origin
As grease pencil use multiedit frames instead of multiobject edit, this fix solves the issue.

In the future maybe will need modifications if we add multiobject support, but we need a solution now.
2018-08-09 16:14:29 +02:00
936d1cef6e Merge branch 'blender2.8' into soc-2018-bevel
Conflicts:
	release/scripts/addons
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
	source/blender/editors/space_outliner/outliner_draw.c
2018-08-01 14:16:41 +02:00
c06bed25c7 Fix T56187: Crash using cursor tool in Edit/Sculpt and Weight Paint mode
The transform tried to calculate the multiframe falloff, but there was not any stroke to do that.
2018-08-01 10:17:05 +02:00
f06884b18a Cleanup: style, duplicate includes 2018-07-31 20:11:55 +10:00
66da2f537a New Grease Pencil object for 2D animation
This commit merge the full development done in greasepencil-object branch and include mainly the following features.

- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.

You can get more info here:

https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/

This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.

Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-31 10:50:43 +02:00
e91bdb10e9 Merge branch 'master' into blender2.8 2018-07-26 15:51:29 +10:00
44370a307c UI: hide transform constraints when not used 2018-07-26 15:44:27 +10:00
4e6bcd10e5 Merge branch 'blender2.8' into soc-2018-bevel 2018-07-21 19:29:15 +05:30
8cd7828792 GWN: Port to GPU module: Replace GWN prefix by GPU 2018-07-18 11:49:15 +02:00
7b3a18f0aa Cleanup: moving shading type into View3DShading.
So all shading settings are in this struct and can be reused in the OpenGL
render engine.
2018-07-17 14:59:07 +02:00
57ab7daa2a GPU_matrix: use Blender's naming conventions
Thanks to @sergey for review
2018-07-15 15:34:13 +02:00
5ebebcfbff WM: rename manipulator to gizmo internally 2018-07-14 23:49:00 +02:00
64d40c82c3 Revert "Transform: default constraint to user orientation"
This reverts commit 8121010310.

After user feedback this has the downside of having no predictable
way of transforming in global space.

Since toggling between global/user is reversed when global is
the user axis.
2018-07-11 10:26:49 +02:00
fc20fa2908 Merge branch 'master' into blender2.8 2018-07-10 07:42:16 +02:00
f9107eae6a Keymap: minor changes for keymap display 2018-07-10 07:41:49 +02:00
8121010310 Transform: default constraint to user orientation
Previously global was always used before the current orientation,
the order is now reversed, which assumes the user wants to first
use the value they set, with the global secondary.
2018-07-10 06:58:43 +02:00
8a816fd3bc Merge branch 'master' into blender2.8 2018-07-10 06:53:12 +02:00