Commit Graph

268 Commits

Author SHA1 Message Date
Campbell Barton
ec664636e7 3D View: add back transform tool
Further changes are planned in T64928,
this is just the initial basic version.
2019-05-24 01:38:07 +10:00
William Reynish
5a1c888834 UI: Hide Add Cube from toolbar.
This was still a proof of concept tool needing further development. Hiding this for now.

It can return in future releases with further development.

See https://developer.blender.org/T57210 for details.
2019-05-21 10:56:49 +02:00
William Reynish
958e00cebf UI: Use expanded icon row for Select tool modes 2019-05-06 15:59:34 +02:00
William Reynish
688c7240be UI: Add Annotate tool to Sculpt and Paint mode toolbars
Users have requested to have the Annotate tool added to Sculpt Mode. It can be useful for annotating while sculpting.

  - Remove Measure tool from the tools_annotate group
  - Add Measure tool to object and edit mode toolbar
  - Add Annotate tools to Sculpt and Paint modes

Differential Revision: https://developer.blender.org/D4785
2019-05-03 09:41:34 +02:00
Campbell Barton
928becec60 UV Sculpt: improve tool-system integration
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).

Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.

- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
  select different brushes.
- Make UV sculpt use paint paint tool slots
  (using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
  S/P/G keys to switch tools.
2019-05-01 20:32:38 +10:00
Campbell Barton
fb9fcaa507 Cleanup: unused vars 2019-04-19 07:52:53 +02:00
Campbell Barton
5b0f0421ef Cleanup: mark unused arguments in UI scripts
Quiet's pylint W0613 warning, also remove some unused args.
2019-04-19 07:32:24 +02:00
Brecht Van Lommel
93e876c4f8 UI: don't expand selection tool option enum
This was taking too much space.
2019-04-18 06:52:05 +02:00
Brecht Van Lommel
f45b91a1c5 Fix tool system Python errors if there is no active object. 2019-04-16 15:33:20 +02:00
Campbell Barton
14884cda1f Gizmo: move transform to a persistent option
Based on feedback from animators, this is useful to keep as a view
option (as in 2.7x).

Now the transform gizmos can be enabled from the popover,
the tools still work for location/scale/rotation.
The transform tool has been removed.

See T63518
2019-04-13 20:58:25 +02:00
Campbell Barton
e49da07184 Cleanup: style 2019-04-10 00:06:13 +10:00
Bastien Montagne
79c178b015 18N for tools definitions: make them resilient to None context.
Dynamic callbacks generating lists of tools should accept None context,
not crash on it.

Similar to what we do with dynamic RNA enums, when NULL/None context is
given, assume we are in 'introspection' mode and return as many things
as possible.

This is currently essentially used by i18n messages extraction tool
(where getting all possible entries is kind of mandatory ;) ).

Also add some initial missing tranlations for complex cases that cannot
be automated, there'll likely be more of that kind...
2019-03-31 18:47:54 +02:00
Brecht Van Lommel
21f35661c1 Fix cramped display of tool setting enums in workspace tab. 2019-03-29 17:56:42 +01:00
Campbell Barton
53f4fc7da9 Cleanup: style 2019-03-20 10:44:13 +11:00
Campbell Barton
d4156b46d7 Tool System: use categories for tool identifiers
Tools that come with Blender use 'builtin' or 'builtin_brush' prefix.
2019-03-15 16:48:01 +11:00
Campbell Barton
3400fe3ece Tool System: split UI label from tool identifiers
Prepare for exposing tool registration to the Python API.

- Generated tools can use their own prefix so naming collisions
  won't happen between hard coded & generated tools.
- Add-on authors can use the add-on name as a prefix.

Currently the names match, renaming will happen next.
2019-03-15 14:53:08 +11:00
Antonioya
6eaaa9c3d3 Fix T62507: Removing Annotation layers removes layers option
Now, when the layer is removed, the Annotation title is removed too to get the same situation when you start using annotations.
2019-03-12 19:49:46 +01:00
Campbell Barton
d8daeeb930 UI: Avoid redundant text argument to UnifiedPaintPanel methods
Now when the text argument is omitted, use the default name
matching how regular properties work.

Avoids passing in the same name which RNA has,
matches UILayout.prop behavior.

Also use keyword only for optional arguments.
2019-03-12 16:31:02 +11:00
Campbell Barton
e6eb7b9cce Tools: Only show cursor tool in wpaint mode when a pose object exists 2019-03-12 10:54:39 +11:00
William Reynish
0f20696846 Icons: Add Links Cut icon to Node Editor, plus other tweaks
- Tweaks to Paint Mode Fill and Sample tool icons
- Tweaks to GP Add Primitive icons
2019-03-11 23:22:41 +01:00
William Reynish
d5a024c72d Tools: Add Selection tools to Texture Paint toolbar when Face Selection is enabled.
Consistent with the other paint modes.
2019-03-11 13:45:15 +01:00
William Reynish
6cab5abbc3 Tools: Re-order Weight Paint toolbar
-Group gradient with the other paint tools
-Nest the two Sample tools together
-Keep painting tools first, secondary tools after
-Make sure toolbar doesn't jump when selection is enabled
2019-03-08 15:07:18 +01:00
Campbell Barton
90f4ff95ed Image: use sample size instead of radius
It wasn't possible to sample a 2x2 region.
2019-03-08 00:43:20 +11:00
Campbell Barton
1901595898 Tool System: use set/add/subtract for all lasso select operators 2019-03-07 23:45:58 +11:00
William Reynish
cee53160d2 Tools: Add Radius tool to Grease Pencil toolbar
Icon pending.
2019-03-07 11:12:30 +01:00
Campbell Barton
219e2f976d Tool System: use set/add/subtract for all box select operators 2019-03-07 20:34:10 +11:00
William Reynish
e52e0c83d7 UI: Re-order toolbar in Curve Edit mode
Makes it more consistent with Mesh Edit mode, and uses same logic for grouping.
2019-03-07 09:58:56 +01:00
Campbell Barton
48e48653c2 Tool System: add radius option to the image sample tool 2019-03-07 18:03:40 +11:00
Campbell Barton
254f2e7390 Tool System: add annotation tool to image editor
Also add place-holder measure tool.
2019-03-07 14:09:28 +11:00
Campbell Barton
68a0d35036 Tool System: add select tools to particle edit 2019-03-06 01:26:30 +11:00
Campbell Barton
2a811e6955 Tool System: add node circle select tool 2019-03-05 23:29:49 +11:00
Campbell Barton
8d8d113b73 Tool System: use set/add/subtract for all circle select operators
This applies changes from the 3D view circle select to other operators.
2019-03-05 22:26:45 +11:00
Antonioya
8df5e0eb66 GPencil: New extrude operator
Keymap: E   - Extrude Gizmo supported.

If the extrude points are the first or last of the stroke, the stroke is extended.

If the extrude points are in the middle of the stroke, a new stroke is created because the grease pencil strokes can be only with 2 extremes and fold the stroke to get a new point gets very bad results.

Still pending define a new icon. Also, it could be good to set by default XYZ axis in the gizmo.

Note: There is a change in the transform_gizmo_extrude_3d.c gizmo for OB_MODE_EDIT_GPENCIL. This change must be undo when the mode will be integrated into OB_MODE_EDIT, but while we have both modes, we need to keep this code in order to keep running the gizmo.
2019-03-04 19:40:50 +01:00
William Reynish
e49d7b9363 UI: Add descriptive tooltip to Curve Radius tool
Was previously just using generic transform tooltip.
2019-03-04 10:26:27 +01:00
William Reynish
fd3ef61bc1 Tools: Rename Curve Shrink/Fatten to Radius
This is fundamentally different from Shrink/Fatten for meshes, because the control points are not moved, only the radius.
Issue raised by Ronan Ducluzeau, name suggested by Campbell Barton
2019-03-04 09:50:59 +01:00
William Reynish
a6c30dd91c Tools: Add Randomize to Curve Edit toolbar 2019-03-03 20:37:47 +01:00
William Reynish
a7f5de75f8 Tools: Remove parenthesis from Spin Duplicates tool name 2019-03-03 13:57:01 +01:00
William Reynish
65a3fe46b5 Tools: Add Shrink/Fatten to Curve Edit Toolbar 2019-03-03 12:37:18 +01:00
Campbell Barton
053c3bd48a Tool System: add a mode option to 3D view circle select
Support only basic operations: new/add/subtract.
2019-03-01 23:21:24 +11:00
Campbell Barton
9b20127355 Tool: Use scale keymap for scale cage tool
Needed so clicking anywhere performs uniform scale.
2019-02-21 16:42:59 +11:00
Campbell Barton
4d085c9bae Measure Tool: use x/del key to remove the active ruler
Dragging outside the view was only meant to be a temporary workaround.
2019-02-20 16:44:54 +11:00
Campbell Barton
a6f045de3f UI: clarify ruler tooltip text
See T61151
2019-02-04 10:32:34 +11:00
Campbell Barton
9c7adcfd8b Fix T60388: Warning entering text edit mode 2019-01-14 14:16:08 +11:00
Antonioya
bb9c9d0eaa GP: New Cutter, Constraints and Segment selection
This commit groups a set of new tools that were tested in grease pencil object branch before moving to master. We decide to do all the development in a separated branch because it could break master during days or weeks before the new tools were ready to deploy.

The commit includes:

- New Cutter tool to trim strokes and help cleaning up drawings.

- New set of constraints and guides to draw different types of shapes. All the credits for this development goes to Charlie Jolly (@charlie), thanks for your help!

- Segment selection mode to select strokes between intersections.

- New operator to change strokes cap mode.

- New option to display only keyframed frames. This option is very important when fill strokes with color.

- Multiple small fixes and tweaks.

Thanks to @pepeland and @mendio for their ideas, tests, reviews and support.

Note: Still pending the final icons for Cutter in Toolbar and Segment Selection in Topbar. @billreynish could help us here?
2019-01-11 19:21:56 +01:00
Campbell Barton
1e00f91760 Fix gizmo orientation w/ shear tool 2019-01-10 12:25:09 +11:00
Campbell Barton
df8e8e5b6b UI: use keymap introspection for tooltip creation
Also support non existing keymap items which gave an error, see: T60335
2019-01-09 12:27:58 +11:00
Campbell Barton
24a84c4742 Fix T60314: Missing strength w/ weight gradient 2019-01-08 23:49:58 +11:00
Jacques Lucke
f9cefc4d17 Fix T60291: Wrong tooltip in for Add Cube tool 2019-01-08 12:24:51 +01:00
Philipp Oeser
a0d456daf8 Vertex Paint: support vertex masking
Working in 2.7x, was just disabled in 2.8x.

Fixes T60256
2019-01-08 15:18:28 +11:00
Campbell Barton
63fcbfc3a7 RNA: naming, user-preferences -> preferences 2018-12-21 12:55:02 +11:00