GPencil: Several Weight Paint additions #106663

Merged
Falk David merged 11 commits from SietseB/blender:gp-weight-paint-additions into main 2023-04-20 07:55:37 +02:00

11 Commits

Author SHA1 Message Date
Sietse Brouwer 0641ae21f5 Cleanup: remove unused Gpencil macro 2023-04-19 15:44:31 +02:00
Sietse Brouwer 598a6f523e Merge branch 'main' into gp-weight-paint-additions 2023-04-19 15:24:27 +02:00
Sietse Brouwer 9a4b047672 Cleanup: code style fixes in Gpencil Weight Paint after code review 2023-04-19 15:17:30 +02:00
Sietse Brouwer 4a17adf09b Cleanup: format
buildbot/vexp-code-patch-coordinator Build done. Details
2023-04-18 21:38:27 +02:00
Sietse Brouwer 5421ab5631 Fix: double falloff applied in Gpencil Weight Paint brush 2023-04-18 21:13:19 +02:00
Sietse Brouwer 6f5affb434 Cleanup: code style fixes in Gpencil Weight Paint after code review 2023-04-18 21:03:55 +02:00
Sietse Brouwer 730080c9aa Merge branch 'main' into gp-weight-paint-additions 2023-04-18 19:02:05 +02:00
Sietse Brouwer facdc6c5bb Fix: crash when weight painting in empty space and no vertex group present 2023-04-09 15:36:04 +02:00
Sietse Brouwer a55a4f3ba4 Fix: GP draw weight operator was invoked in other modes and caused a crash 2023-04-08 12:36:47 +02:00
Sietse Brouwer a2aeb52a6c Merge branch 'main' into gp-weight-paint-additions 2023-04-07 00:38:45 +02:00
Sietse Brouwer fa8feeec2d Gpencil: several weight paint additions
This patch adds several tools and options to the weight paint mode of
Grease Pencil.

More tools
- Blur tool: smooths out vertex weights, by calculating a gaussian blur
of adjacent vertices.
- Average tool: painting the average weight from all weights under the
brush.
- Smear tool: smudges weights by grabbing the weights under the brush
and 'dragging' them.

Draw tool: switch easily between 'add' and 'subtract'
With the + and - icons in the toolbar, the user can easily switch
between adding and subtracting weight while drawing weights.
With shortcut 'D' you can toggle between these two.

New option: auto-normalize
The auto-normalize options ensures that all bone-deforming vertex
groups add up to 1.0 while weight painting.

Radial control for weight
With Ctrl-F a radial control for weight is invoked (in addition
to the radial controls for brush size and strength).

Sample weight
With Ctrl-RMB the user can sample the weight. This sets the brush
Weight from the weight under the cursor.

Quick bone selection
When painting weights in vertex groups for bones, the user can
quickly switch to another vertex group by clicking on a bone with
Ctrl-LMB.
For this to work, follow these steps:
- Select the armature and switch to Pose Mode.
- Select your Grease Pencil object and switch immediately to
Weight Paint Mode.
- Select a bone in the armature with Ctrl-LMB. The corresponding
vertex group is automatically activated.

Technical note: where possible, the same logic and conventions
as in the 3D weight paint section of Blender were followed.
2023-04-07 00:33:00 +02:00