Commit Graph

3041 Commits

Author SHA1 Message Date
f5df1efa2f Cleanup: warnings 2018-11-22 05:26:18 +11:00
2ab798feb0 transform_snap_object: Use the texture space bound box to test the need to snap to meshes in edit mode.
Before a value for bound box was stored in a local cache.
2018-11-21 14:38:56 -02:00
96e39af948 transform_snap_object: Fix snap to curves.
Use `BKE_curve_texspace_get` instead `BKE_curve_boundbox_get`.
The snap to curve, even out of edit mode, is not done on the displist. So test a boundbox that covers the points seens in edit mode.
2018-11-21 13:07:51 -02:00
77a80d9f2f Gizmo: show dial handle for unconstrained extrude
Now only show an arrow when extrude was constrained on an axis.
2018-11-21 17:15:53 +11:00
1a551328b4 Gizmo: set operator options before execution
Avoid setting all operator options every redraw,
instead set them before invoking.
2018-11-21 16:00:00 +11:00
a86a1292f3 Gizmo: workaround for extrude modifying normals for XYZ axis
This was done for the normal gizmo, but not the XYZ handles.
2018-11-21 12:58:06 +11:00
774471dd45 Fix custom matrix orientation being written to scene 2018-11-21 12:58:06 +11:00
ac5889a9ee Correct editbone root-select check
Mistake in recent commit.
2018-11-21 12:58:06 +11:00
63150511a2 Gizmo: use Y-axis for armature extrude on normal
For bones it's useful to extrude a bone aligned to the existing bone.
2018-11-21 12:14:28 +11:00
04d09014e9 Gizmo: set the extrude transform constraint matrix 2018-11-21 11:45:16 +11:00
5b45434be4 Transform: use root/tip for bone normal orientation
When there are no fully selected bones,
use the normal of bones which only have the root/tip selected as a
fallback.

Without this, the extrude gizmo isn't very useful
since extrude is often used with only the tip selected.
2018-11-21 11:32:08 +11:00
6aa7cea3c2 Cleanup: rename extrude gizmo 2018-11-21 09:25:55 +11:00
d3a75c48fd Cleanup: move extrude gizmo to transform module
Since this is no longer mesh only, move out of mesh,
rename next.
2018-11-21 09:20:19 +11:00
5aa728ec7e Cleanup: style 2018-11-21 05:25:52 +11:00
1824aad3f3 GP: Set Gizmo orientation for edit mode 2018-11-20 16:04:19 +01:00
82eecc6c00 Multi-Objects: Calc origin w/ all edit-objects
D3924 by @Leon95 w/ code de-duplication.
2018-11-20 16:26:46 +11:00
64920a8feb GP: Harmonize Sculpt Struct and field names
Changed the following names:

- GP_EditBrush_Data->GP_Sculpt_Data
- eGP_EditBrush_Types->eGP_Sculpt_Types
- eGP_EditBrush_Flag->eGP_Sculpt_Flag
- eGP_BrushEdit_SettingsFlag->eGP_Sculpt_SettingsFlag
- GP_BrushEdit_Settings->GP_Sculpt_Settings
- GP_EDITBRUSH_FLAG*->GP_SCULPT_FLAG*
- GP_EDITBRUSH_TYPE*->GP_SCULPT_TYPE*
- GP_BRUSHEDIT_FLAG_*->GP_SCULPT_SETT_FLAG_*
2018-11-18 19:30:20 +01: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
184ab749c3 Merge branch 'master' into blender2.8 2018-11-13 14:25:36 +11:00
fe566a30f3 Cleanup: use lowercase 2d/3d in function names 2018-11-13 14:21:42 +11:00
aee0446b6b Add a lot of update tagging to operations with NLA tracks and strips. 2018-11-12 16:18:33 +03:00
3d0383d259 Fix T57737: crash displaying expanded tooltip for transform tool
Maniphest Tasks: T57737

Differential Revision: https://developer.blender.org/D3923
2018-11-09 16:32:47 +01: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
64ec05b64d Cleanup: remove some useless BKE_library and BKE_main includes.
Makes it simpler to make some changes...

Also fix order of some includes (use alphabetical please).
2018-11-07 20:58:54 +01:00
798cdaeeb6 Implement an Armature constraint that mimics the modifier.
The main use one can imagine for this is adding tweak controls to
parts of a model that are already deformed by multiple other major
bones. It is natural to expect such locations to deform as if the
tweaks aren't there by default; however currently there is no easy
way to make a bone follow multiple other bones.

This adds a new constraint that implements the math behind the Armature
modifier, with support for explicit weights, bone envelopes, and dual
quaternion blending. It can also access bones from multiple armatures
at the same time (mainly because it's easier to code it that way.)

This also fixes dquat_to_mat4, which wasn't used anywhere before.

Differential Revision: https://developer.blender.org/D3664
2018-11-06 10:56:08 +03:00
689cf14447 Transform Snap: Refactoring to avoid duplicate code. 2018-11-02 23:55:02 -03:00
4a013e5dd5 Fix T57540: 3D Cursor snap in editing mode ignoring changed geometry. 2018-10-31 20:47:51 -03: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
32de646d3d Multi-Objects: Calculate Transform origin w/ all editmode meshes
D3550 by @Leon95
2018-10-23 17:55:02 +11:00
9b5183769b Cleanup: compiler warnings 2018-10-19 14:51:55 +11:00
60d7740fe6 Tool System: option for transform drag action
See: T57203
2018-10-19 11:54:26 +11:00
5869bf5002 Cleanup: fix compiler warnings. 2018-10-18 12:19:06 +02:00
321c8232bc Tool System: expose shear tool x/y option 2018-10-18 13:55:01 +11:00
9b5cf593a6 Gizmo: tweak sorting to avoid view-aligned shear 2018-10-18 13:00:16 +11:00
678c200309 Gizmo: remove 'Click Anywhere' option
Having an invisible gizmo caused event handling problems (see: T56603).

This is hard to avoid since gizmos are similar to buttons in the way
they have priority over the regular keymap.

Transform events use tweak so events to fall though to the general
view 3d keymap (for cursor placement for eg).
2018-10-18 12:36:39 +11:00
a5467637f2 Cleanup: use mul_m3_series 2018-10-18 11:50:22 +11:00
eee8153299 Gizmo: depth sort shear gizmos 2018-10-18 11:50:22 +11:00
e6adf9ac9a Fix T57096: Crash when scaling bones
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3777
2018-10-17 15:09:01 +02:00
8e071e76de Gizmo: change axis used for shear handles
The shear direction should be more obvious this way.
2018-10-17 17:47:09 +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
3f3eae675a Cleanup: naming
'mp' was a reference to 'manipulator'
2018-10-16 22:09:27 +11:00
48034f0eb3 Tool System: add gizmo for shear tool 2018-10-16 22:06:23 +11:00
5b9ab20fe4 Transform: axis support for shear tool 2018-10-16 22:06:23 +11:00
95f2604ea7 Cleanup: indentation 2018-10-11 08:20:35 +11:00
f81e8903b4 Fix T55202: 3D Cursor Snapping not working correctly in Edit Mode.
Use `mesh_eval_final` in this case.
2018-10-09 10:24:15 -03:00