Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
| Show First 20 Lines • Show All 1,086 Lines • ▼ Show 20 Lines | def sample_weight_group(): | ||||
| keymap=(), | keymap=(), | ||||
| ) | ) | ||||
| @ToolDef.from_fn | @ToolDef.from_fn | ||||
| def gradient(): | def gradient(): | ||||
| def draw_settings(context, layout, tool): | def draw_settings(context, layout, tool): | ||||
| brush = context.tool_settings.weight_paint.brush | brush = context.tool_settings.weight_paint.brush | ||||
| if brush is not None: | if brush is not None: | ||||
| from bl_ui.properties_paint_common import UnifiedPaintPanel | layout.prop(brush, "weight", slider=True) | ||||
| UnifiedPaintPanel.prop_unified_weight(layout, context, brush, "weight", slider=True) | layout.prop(brush, "strength", slider=True) | ||||
| UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True) | |||||
| props = tool.operator_properties("paint.weight_gradient") | props = tool.operator_properties("paint.weight_gradient") | ||||
| layout.prop(props, "type") | layout.prop(props, "type", expand=True) | ||||
| return dict( | return dict( | ||||
| idname="builtin.gradient", | idname="builtin.gradient", | ||||
| label="Gradient", | label="Gradient", | ||||
| icon="ops.paint.weight_gradient", | icon="ops.paint.weight_gradient", | ||||
| widget=None, | widget=None, | ||||
| keymap=(), | keymap=(), | ||||
| draw_settings=draw_settings, | draw_settings=draw_settings, | ||||
| ▲ Show 20 Lines • Show All 982 Lines • Show Last 20 Lines | |||||