[Bf-blender-cvs] [cbc8ffa6019] master: UI: Add brush controls to contextual menu in Weight Paint mode
William Reynish
noreply at git.blender.org
Mon Mar 11 14:34:09 CET 2019
Commit: cbc8ffa601991d51d10c512256de04206b8bd3fc
Author: William Reynish
Date: Mon Mar 11 14:34:07 2019 +0100
Branches: master
https://developer.blender.org/rBcbc8ffa601991d51d10c512256de04206b8bd3fc
UI: Add brush controls to contextual menu in Weight Paint mode
Maniphest task: T62130
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
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):
More information about the Bf-blender-cvs
mailing list