Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Reynish <billrey@me.com>2019-03-20 19:04:57 +0300
committerWilliam Reynish <billrey@me.com>2019-03-20 19:04:57 +0300
commitafd9e87f8d65c49c2b07a8ad72d755e33640e589 (patch)
tree70a92b0a21a3c139966e0dfa7bb7571b9e847aec /release
parent2f4bd632396c215d6398a0b4e16d03f2fd00b17f (diff)
UI: Make paint context menus more contextual
- Only show Radius for tools with radius - Add more sliders here depending on active tool
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index ef0e71f4251..cf2eefb0804 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -5795,9 +5795,11 @@ class VIEW3D_PT_paint_texture_context_menu(Panel):
def draw(self, context):
layout = self.layout
-
brush = context.tool_settings.image_paint.brush
- UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True)
+ capabilities = brush.image_paint_capabilities
+
+ if capabilities.has_radius:
+ UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True)
UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength")
@@ -5826,10 +5828,29 @@ class VIEW3D_PT_sculpt_context_menu(Panel):
layout = self.layout
brush = context.tool_settings.sculpt.brush
+ capabilities = brush.sculpt_capabilities
UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True)
UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength")
+ if capabilities.has_auto_smooth:
+ layout.prop(brush, "auto_smooth_factor", slider=True)
+
+ if capabilities.has_normal_weight:
+ layout.prop(brush, "normal_weight", slider=True)
+
+ if capabilities.has_pinch_factor:
+ layout.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
+
+ if capabilities.has_rake_factor:
+ layout.prop(brush, "rake_factor", slider=True)
+
+ if capabilities.has_plane_offset:
+ layout.prop(brush, "plane_offset", slider=True)
+ layout.prop(brush, "plane_trim", slider=True, text="Distance")
+
+ if capabilities.has_height:
+ layout.prop(brush, "height", slider=True, text="Height")
class TOPBAR_PT_gpencil_materials(GreasePencilMaterialsPanel, Panel):
bl_space_type = 'VIEW_3D'