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:
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_paint_common.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py88
1 files changed, 75 insertions, 13 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 1612cce3c51..8cadad7e0d7 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -192,6 +192,10 @@ class ColorPalettePanel(BrushPanel):
elif context.vertex_paint_object:
capabilities = brush.vertex_paint_capabilities
return capabilities.has_color
+
+ elif context.sculpt_object:
+ capabilities = brush.sculpt_capabilities
+ return capabilities.has_color
return False
def draw(self, context):
@@ -537,10 +541,15 @@ def brush_settings(layout, context, brush, popover=False):
# Sculpt Mode #
if mode == 'SCULPT':
capabilities = brush.sculpt_capabilities
+ sculpt_tool = brush.sculpt_tool
# 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:
@@ -567,7 +576,7 @@ def brush_settings(layout, context, brush, popover=False):
# crease_pinch_factor
if capabilities.has_pinch_factor:
text = "Pinch"
- if brush.sculpt_tool in {'BLOB', 'SNAKE_HOOK'}:
+ if sculpt_tool in {'BLOB', 'SNAKE_HOOK'}:
text = "Magnify"
layout.prop(brush, "crease_pinch_factor", slider=True, text=text)
@@ -607,28 +616,43 @@ def brush_settings(layout, context, brush, popover=False):
layout.operator("sculpt.set_persistent_base")
layout.separator()
- if brush.sculpt_tool == 'CLAY_STRIPS':
+ if capabilities.has_color:
+ ups = context.scene.tool_settings.unified_paint_settings
+ row = layout.row(align=True)
+ UnifiedPaintPanel.prop_unified_color(row, context, brush, "color", text="")
+ UnifiedPaintPanel.prop_unified_color(row, context, brush, "secondary_color", text="")
+ row.separator()
+ row.operator("paint.brush_colors_flip", icon='FILE_REFRESH', text="", emboss=False)
+ row.prop(ups, "use_unified_color", text="", icon='BRUSHES_ALL')
+ layout.prop(brush, "blend", text="Blend Mode")
+
+ # Per sculpt tool options.
+
+ if sculpt_tool == 'CLAY_STRIPS':
row = layout.row()
row.prop(brush, "tip_roundness")
- if brush.sculpt_tool == 'ELASTIC_DEFORM':
+ elif sculpt_tool == 'ELASTIC_DEFORM':
layout.separator()
layout.prop(brush, "elastic_deform_type")
layout.prop(brush, "elastic_deform_volume_preservation", slider=True)
layout.separator()
- if brush.sculpt_tool == 'POSE':
+ elif sculpt_tool == 'POSE':
layout.separator()
layout.prop(brush, "pose_deform_type")
layout.prop(brush, "pose_origin_type")
layout.prop(brush, "pose_offset")
layout.prop(brush, "pose_smooth_iterations")
- if brush.pose_deform_type == 'ROTATE_TWIST' and brush.pose_origin_type in ('TOPOLOGY','FACE_SETS'):
+ if brush.pose_deform_type == 'ROTATE_TWIST' and brush.pose_origin_type in {'TOPOLOGY', 'FACE_SETS'}:
layout.prop(brush, "pose_ik_segments")
layout.prop(brush, "use_pose_ik_anchored")
+ layout.prop(brush, "use_connected_only")
+ layout.prop(brush, "disconnected_distance_max")
+
layout.separator()
- if brush.sculpt_tool == 'CLOTH':
+ elif sculpt_tool == 'CLOTH':
layout.separator()
layout.prop(brush, "cloth_sim_limit")
layout.prop(brush, "cloth_sim_falloff")
@@ -638,30 +662,66 @@ def brush_settings(layout, context, brush, popover=False):
layout.separator()
layout.prop(brush, "cloth_mass")
layout.prop(brush, "cloth_damping")
+ layout.prop(brush, "cloth_constraint_softbody_strength")
layout.separator()
- if brush.sculpt_tool == 'SCRAPE':
+ elif sculpt_tool == 'SCRAPE':
row = layout.row()
row.prop(brush, "area_radius_factor", slider=True)
row = layout.row()
row.prop(brush, "invert_to_scrape_fill", text="Invert to Fill")
- if brush.sculpt_tool == 'FILL':
+ elif sculpt_tool == 'FILL':
row = layout.row()
row.prop(brush, "area_radius_factor", slider=True)
row = layout.row()
row.prop(brush, "invert_to_scrape_fill", text="Invert to Scrape")
- if brush.sculpt_tool == 'GRAB':
+ elif sculpt_tool == 'GRAB':
layout.prop(brush, "use_grab_active_vertex")
- if brush.sculpt_tool == 'MULTIPLANE_SCRAPE':
+ elif sculpt_tool == 'PAINT':
+ 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")
+
+ elif sculpt_tool == 'SMEAR':
+ col = layout.column()
+ col.prop(brush, "smear_deform_type")
+
+ elif sculpt_tool == 'TOPOLOGY':
+ col = layout.column()
+ col.prop(brush, "slide_deform_type")
+
+ elif sculpt_tool == 'MULTIPLANE_SCRAPE':
col = layout.column()
col.prop(brush, "multiplane_scrape_angle")
col.prop(brush, "use_multiplane_scrape_dynamic")
col.prop(brush, "show_multiplane_scrape_planes_preview")
- if brush.sculpt_tool == 'SMOOTH':
+ elif sculpt_tool == 'SMOOTH':
col = layout.column()
col.prop(brush, "smooth_deform_type")
if brush.smooth_deform_type == 'SURFACE':
@@ -669,9 +729,11 @@ def brush_settings(layout, context, brush, popover=False):
col.prop(brush, "surface_smooth_current_vertex")
col.prop(brush, "surface_smooth_iterations")
- if brush.sculpt_tool == 'MASK':
+ elif sculpt_tool == 'MASK':
layout.row().prop(brush, "mask_tool", expand=True)
+ # End sculpt_tool interface.
+
# 3D and 2D Texture Paint Mode.
elif mode in {'PAINT_TEXTURE', 'PAINT_2D'}:
capabilities = brush.image_paint_capabilities