Commit Graph

281 Commits

Author SHA1 Message Date
Campbell Barton
72cf239780 Tool System: add UV transform tools 2019-06-26 01:46:01 +10:00
Brecht Van Lommel
40a8c49088 Revert new grease pencil cursor for paint modes
This reverts commit a412f49e75 and 873c756e5d. The change was only
supposed to affect grease pencil, but also changed the cursor for sculpt mode,
where it's not clearly visible. Since this has not been quickly resolved I'm
reverting the commit.

Ref D5036.
2019-06-16 20:29:22 +02:00
Campbell Barton
83da21ca4e Fix T65393: Error live editing UI scripts
Disable relative imports for UI scripts.
2019-06-11 16:08:32 +10:00
Campbell Barton
a0608340ae Fix T65699: gpencil weight paint unresponsive 2019-06-11 09:38:49 +10:00
Antonio Vazquez
a412f49e75 GPencil: Create new CURSOR for paint modes
This new cursor is used instead of the ARROW because it was too disruptive while you are drawing.

The change affects all paint modes that are used Brushes.

See D5036 for details.

Reviewers: @brecht @billreynish @mendio
Cursor designed by:  @billreynish
2019-06-07 12:59:47 +02:00
William Reynish
b290695149 Sculpt toolbar: Group new Mask Lasso tool with the Mask Border tool
Also flip Simplify and Mask, so that all the mask-related tools are next to each other.
2019-06-07 10:35:07 +02:00
William Reynish
27369c0b06 Add Lasso Mask icon for Sculpt Mode toolbar 2019-06-07 10:24:19 +02:00
Campbell Barton
9337ba7fa6 Tool System: add sculpt mask lasso tool 2019-06-07 16:08:31 +10:00
Campbell Barton
b69ed14ff7 Fix T65108: GPencil Sculpt mode select tools don't work
Move the sculpt keymap from the mode to the tool.
2019-06-06 15:53:11 +10:00
Campbell Barton
dc0c490b76 Tool System: Use circle cursor for non-3D circle select 2019-05-30 21:31:42 +10:00
Campbell Barton
1008d9c735 Cleanup: unused args/vars 2019-05-28 16:37:29 +10:00
Jacques Lucke
29a29699f7 Fix T65145: Draw curve draw tool settings in column 2019-05-27 16:55:53 +02:00
William Reynish
d8746bf45e UI: Move Transform tool to be after Move, Rotate, Scale in the toolbar 2019-05-23 18:12:14 +02:00
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