diff options
author | William Reynish <billrey@me.com> | 2019-03-11 16:34:07 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2019-03-11 16:34:07 +0300 |
commit | cbc8ffa601991d51d10c512256de04206b8bd3fc (patch) | |
tree | 4aebcdc3c25f1e823da80ccb9e53f2c5b1b02949 | |
parent | 9f4ec02bb4060c915bd407a3372d1240e4ed85f5 (diff) |
UI: Add brush controls to contextual menu in Weight Paint mode
Maniphest task: T62130
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 9fcc8b9e251..292884b0ae5 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5728,23 +5728,16 @@ class VIEW3D_PT_paint_weight_specials(Panel): bl_label = "Weights Context Menu" def draw(self, context): - layout = self.layout - # TODO: populate with useful items. - layout.operator("paint.weight_set") - layout.separator() - layout.operator("object.vertex_group_normalize", text="Normalize") - layout.operator("object.vertex_group_clean", text="Clean") + brush = context.tool_settings.weight_paint.brush + capabilities = brush.weight_paint_capabilities + ups = context.tool_settings.unified_paint_settings - layout.separator() - layout.operator("object.vertex_group_quantize", text="Quantize") - layout.operator("object.vertex_group_levels", text="Levels") - layout.operator("object.vertex_group_smooth", text="Smooth") - - layout.separator() - - layout.operator("object.vertex_group_limit_total", text="Limit Total") - layout.operator("object.vertex_group_fix", text="Fix Deforms") + layout = self.layout + if capabilities.has_weight or brush.use_gradient: + layout.prop(ups, "weight") + layout.prop(ups, "size", slider=True) + layout.prop(ups, "strength") class VIEW3D_PT_sculpt_specials(Panel): |