diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-07-20 01:37:41 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-07-21 23:43:39 +0300 |
commit | 69afdf69702c8f1d4d43f7369a94bb36a4a349f2 (patch) | |
tree | 5f66807e13a31774a4a287250c45d8fc91b518e5 /release/scripts/startup/bl_ui/properties_paint_common.py | |
parent | 4aa2a5481cec4edc4694ee1edbde4ed3f3986313 (diff) |
Sculpt: Support pen pressure modulation in Paint Brush properties
This allows to use pen pressure modulation in hardness, wet mix, wet
persistence, flow and density, as well as inverting the modulation (more
pressure, less density...). With this, it is possible to create brushes
that mix paint or apply a new color based on the pressure.
Reviewed By: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D8267
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_paint_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 004bcaf819b..5044d1be34c 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -544,7 +544,11 @@ def brush_settings(layout, context, brush, popover=False): # normal_radius_factor layout.prop(brush, "normal_radius_factor", slider=True) - layout.prop(brush, "hardness", slider=True) + + row = layout.row(align=True) + row.prop(brush, "hardness", slider=True) + row.prop(brush, "invert_hardness_pressure", text = "") + row.prop(brush, "use_hardness_pressure", text = "") # auto_smooth_factor and use_inverse_smooth_pressure if capabilities.has_auto_smooth: @@ -674,13 +678,31 @@ def brush_settings(layout, context, brush, popover=False): layout.prop(brush, "use_grab_active_vertex") if brush.sculpt_tool == 'PAINT': - col = layout.column() - col.prop(brush, "flow") - col.prop(brush, "wet_mix") - col.prop(brush, "wet_persistence") - col.prop(brush, "density") - col.prop(brush, "tip_roundness") - col.prop(brush, "tip_scale_x") + row = layout.row(align=True) + row.prop(brush, "flow") + row.prop(brush, "invert_flow_pressure", text = "") + row.prop(brush, "use_flow_pressure", text= "") + + row = layout.row(align=True) + row.prop(brush, "wet_mix") + row.prop(brush, "invert_wet_mix_pressure", text = "") + row.prop(brush, "use_wet_mix_pressure", text = "") + + row = layout.row(align=True) + row.prop(brush, "wet_persistence") + row.prop(brush, "invert_wet_persistence_pressure", text ="") + row.prop(brush, "use_wet_persistence_pressure", text= "") + + row = layout.row(align=True) + row.prop(brush, "density") + row.prop(brush, "invert_density_pressure", text = "") + row.prop(brush, "use_density_pressure", text = "") + + row = layout.row() + row.prop(brush, "tip_roundness") + + row = layout.row() + row.prop(brush, "tip_scale_x") if brush.sculpt_tool == 'SMEAR': col = layout.column() |