Commit Graph

201 Commits

Author SHA1 Message Date
Campbell Barton
1944bca49a Tool System: use tools for node editor 2018-11-27 18:43:08 +11:00
Campbell Barton
1f8360171c Keymap: share annotation tool keymaps between spaces
Not sharing caused duplication in the keymap and
required a factory class generator.

Simplify tool & keymap definitions by sharing them.

It's highly unlikely we will ever want these to use different keys
once they're set as the active tool.
2018-11-27 17:52:15 +11:00
Campbell Barton
09f97f937d Cleanup: move non-toolbar panels out of the toolbar 2018-11-27 15:25:52 +11:00
Brecht Van Lommel
43325e98da Tools: add Select tool, with transform tweak on drag and no click delay.
For users that want the 2.7 LMB keymap behavior, this provides a way of
working without tools interfering. For RMB select this operator is quite
redundant with the Cursor tool, we may have to find a solution for that.

Note that we also might later add transform tweak to the transform tools,
when nothing is selected. But this is important for existing users who
preferred the existing workflow.
2018-11-25 20:09:43 +01:00
Campbell Barton
a6eb9a3e21 Tool System: uv lasso/box select options
These tools now support (new, add, subtract),
(xor, and) could be supported but are complicated by UV's sticky
selection modes.
2018-11-23 17:52:52 +11:00
Antonioya
e85aa8b8da GP: Change cursor for primitves 2018-11-21 10:52:46 +01:00
Campbell Barton
7de712e1e5 Fix uv-sculpt use w/ tool-system 2018-11-21 17:56:10 +11:00
Campbell Barton
6aa7cea3c2 Cleanup: rename extrude gizmo 2018-11-21 09:25:55 +11:00
Campbell Barton
34b9bd3a9b Gizmo: initial extrude support for non mesh types 2018-11-21 09:09:34 +11:00
Campbell Barton
a19ee4e926 Tool System: define tools for lattice editmode 2018-11-20 21:41:39 +11:00
Campbell Barton
640eb00670 Tool System: define tools for meta-ball editmode 2018-11-20 18:52:56 +11:00
Brecht Van Lommel
bf7af31e9f Keymaps: left click select keymap changes
Both the active tools and selection are now on LMB, which leads to
various conflicts.

For that reason the LMB keymap now has a couple of differences
compared to before. These changes do not affect the RMB keymap.

* Context Menu: W -> RMB
* Select Tool activate: None -> W
* Set Cursor: RMB -> Shift+RMB
* Loop Select: Alt+LMB -> double click LMB
* Mask Feather Vertex Slide: Shift+RMB -> Ctrl+Shift+RMB
* Node Select: only with LMB now, no RMB

The idea behind the W key Select Tool shortcut is that various
tools can't be combined with selection, unlike the RMB keymap.
So this works as a quick shortcut to drop a tool
and go back to selection.

Tools: set Select Box tool as default, rather than Cursor.

This goes along with coming LMB select keymap changes,
where we want the user to be able to LMB click to select by default,
rather than set the cursor.
The cursor will still be directly setabble with shift+RMB.
2018-11-16 09:54:50 +11:00
Campbell Barton
5215c42e3c Revert "Keymap: remove 3D cursor keymap"
This reverts commit 8ecc51e87f.

This is needed for keymaps that dont include cursor placement by
default.
2018-11-16 09:44:19 +11:00
Campbell Barton
8ecc51e87f Keymap: remove 3D cursor keymap
Rely on 3D view keymap, fixes T57843
2018-11-16 07:59:00 +11:00
William Reynish
165c447691 Tool System: add curve tilt tool 2018-11-15 22:31:47 +11:00
Campbell Barton
349d85eb9e Missed when moving tool keymaps 2018-11-15 13:34:47 +11:00
Campbell Barton
27eba3867a Keymap: move tool system keymaps into the default keymap
Note that tools can still define their keymaps,
since it's useful for add-ons.
2018-11-15 12:45:45 +11:00
Campbell Barton
f91b797b2b Tool System: remove duplicate gpencil draw UI
Tool properties showed options twice.
2018-11-14 19:19:04 +11:00
Campbell Barton
f4d4f50212 UI: move gpencil paint into topbar only layout
Tool properties were duplicating UI elements.
2018-11-13 20:59:25 +11:00
Campbell Barton
4503c96a17 Cleanup: remove redundant checks 2018-11-13 17:04:57 +11:00
Campbell Barton
b657e9875c Tool System: use enum for gp sculpt/weight paint
Fixes T57525
2018-11-13 16:52:39 +11:00
Campbell Barton
ab2fa6d3f4 Keymap: more more standard keys for select tools
This uses shift to extend, ctrl to de-select, both to intersect.
2018-11-13 14:05:20 +11:00
Antonioya
473465aae2 GP: Add brush parameter to Shapes tools
Need the brush to define thickness and color of the primitive (line, box, circle)
2018-11-10 20:33:37 +01:00
Antonioya
2618d0e8e2 GP: Make Sculpt and Edit Toolbar consistent 2018-11-09 22:20:39 +01:00
Campbell Barton
80a7c57e5e Tool System: add grease pencil primitive tool 2018-11-09 17:12:07 +11:00
Campbell Barton
80109c976c Brush: split out vertex paint tool & blend mode
- Vertex & weight paint now use the 'blend' setting.
- Weight paint now has it's own tool setting,
  since weight paint doesn't deal with color - we'll likely
  support different tools eventually.
2018-11-06 18:06:33 +11:00
Campbell Barton
a90bcdf93d Tool System: use tool type enum to access brushes
Previously the brush names were used which had the limit that:

- Brush names that were deleted wouldn't show up in the toolbar.
- Naming collisions between user defined brushes and existing tools
  broke tool selection.

Now brushes are created as needed when tools are selected.

Note, vertex/weight paint combine tool and blend modes,
this should be split out into a separate enum.
2018-11-06 12:39:51 +11:00
Campbell Barton
8fcc04edce Cleanup: avoid using instance to get enum 2018-11-05 13:54:43 +11:00
Campbell Barton
642fe9e0f2 PyAPI: use keywords for ToolDef.from_fn.with_args
Enforces explicit names,
allows for keywords to be forwarded to the dictionary.
2018-11-05 11:58:23 +11:00
Campbell Barton
2f8a45e314 Tool System: support passing in args to ToolDef functions
Needed since class aren't yet defined
so we can't access their namespace.

This avoids intermediate draw functions.
2018-11-05 07:12:57 +11:00
Campbell Barton
179358e6c4 UI: Don't nest sculpt scrape/flatten
These are different enough not to be grouped.
2018-11-04 10:33:51 +11:00
Campbell Barton
628a0209a4 Cleanup: missed last commit 2018-11-04 10:32:04 +11:00
Campbell Barton
2402c56a67 UI: move gpencil tool-draw code to topbar
The grease pencil UI was showing twice in tool properties space.
Move to top-bar because this UI is meant as quick convenience access
which is expanded on in the tool properties editor.
2018-11-04 10:29:40 +11:00
Campbell Barton
f267921774 UI: remove grease pencil icons
Grease pencil tool now uses an icon for each tool,
previously it mapped icons to tool icons which is now not needed
because for each tool a different brush can be selected which has it's
own icon.
2018-11-03 20:35:34 +11:00
Campbell Barton
e53cb83d07 UI: separate sculpt from smooth, flatten 2018-11-03 20:35:34 +11:00
Antonioya
55a743fade GP: Add Draw Brush selector to topbar 2018-11-02 19:28:36 +01:00
Campbell Barton
ac8d787327 Tool System: brushes are now categorized by tool
The toolbar now shows brush types, the brush selector now
only shows brushes matching the current tool type.

Details:

- Add's Paint.tool_slots (used by the toolbar).
- Removed custom grease pencil brush tool code.
- Bumped subversion.

See T57526 for details.
2018-11-02 19:40:39 +11:00
Campbell Barton
c469c72405 Cleanup: grease pencil RNA naming
Follow naming conventions for boolean's,

Also rename enable_settings -> use_settings_postprocess.
2018-10-31 11:51:15 +11:00
Campbell Barton
3224b79289 Cleanup: remove redundant 'gpencil_' prefix
Also rename 'gpencil_brush_type' -> 'tool' & correct typo.
2018-10-31 11:51:15 +11:00
Campbell Barton
6be7a98906 PyAPI: raise error when toolbar panels use tabs
Add-ons that register panels in the toolbar can
no longer use 'bl_categories' (tabs).
2018-10-26 15:05:07 +11:00
Campbell Barton
869b1a8d6e Tool System: draw circle-select brush outline 2018-10-25 21:05:47 +11:00
Antonioya
f77eafed33 GP: Add transform tools to Toolbar 2018-10-23 13:03:46 +02:00
William Reynish
96fef7db5a Icons: update geometry icons
- Tweaked icons for Box Select, Circle Select & Lasso Select.
- Tweaked icons for Rip Region & Rip Edge.
- Added icons for Bone Envelope, Bone Size, Pose Breakdown,
  Pose Push & Pose Relax.
- Added icons for curve Extrude, Extrude Cursor.

Also removed grease pencil mirror tool which wasn't an active tool,
and is now consistent with regular Edit Mode.
2018-10-21 16:23:15 +11:00
Campbell Barton
16882ca535 Image Space: make 'UV Edit' a separate mode
This is needed for splitting UV into its own editor, see: T54744
2018-10-19 20:15:18 +11:00
Campbell Barton
60d7740fe6 Tool System: option for transform drag action
See: T57203
2018-10-19 11:54:26 +11:00
Campbell Barton
321c8232bc Tool System: expose shear tool x/y option 2018-10-18 13:55:01 +11:00
Campbell Barton
3e0c87b27d Keymap: use tweak event for shear 2018-10-18 13:06:23 +11:00
Campbell Barton
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
Campbell Barton
48034f0eb3 Tool System: add gizmo for shear tool 2018-10-16 22:06:23 +11:00
Campbell Barton
e75169974c Fix UI error in annotation tool 2018-10-16 09:13:26 +11:00