Commit Graph

209 Commits

Author SHA1 Message Date
Campbell Barton
be0c8ed734 Keymap: correct keymap names
Generated names include the current context mode
which is irrelevant for generic 3D view tools.
2018-12-14 12:17:00 +11:00
Campbell Barton
c0b7bdd38b Revert "Tweak UI message of Ruler tool."
This reverts commit 1bf0a4f4d0.

This is a bug, clicks shouldn't remove rulers since it's too easy
to accidentally click instead of dragging.
2018-12-12 09:52:52 +11:00
Bastien Montagne
1bf0a4f4d0 Tweak UI message of Ruler tool.
It's much simpler to just click on one end, than dragging it outside of
view. ;)

Related to T59084.
2018-12-10 15:53:53 +01:00
Charlie Jolly
2c19c9b2f6 GP: Draw Mode: Add Arc Primitive
This adds an elliptical arc primitive.
Press CKEY for toggling closed/open arc.
Press FKEY key for flipping arc.

Additional changes to gpencil primitives.
Increases default edges of circle to 64.
Keymap changes to allow primitives to be drawn with Shift or Alt key.
Allow Plus/Minus key to adjust number of edges.

Missing: Toolbar icon

Differential Revision: https://developer.blender.org/D4024
2018-12-03 22:11:38 +00:00
Campbell Barton
8c9d632128 Cleanup: de-duplicate default object tools 2018-11-30 09:06:36 +11:00
Campbell Barton
bb4e53faf2 Tool System: add tools for edit-mode surface 2018-11-30 09:02:11 +11:00
Campbell Barton
1a8d998868 Tool System: support for dynamic tooltips
Tools can define a function that generates the tooltip using a function,
this takes the tools keymap as an argument which can be used
to extract keys to include in the tip.
2018-11-28 23:53:27 +11:00
Campbell Barton
b1d67e6aab Tool System: add node links cut tool 2018-11-28 17:37:40 +11:00
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