Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d_toolbar.py
| Show First 20 Lines • Show All 327 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| settings = context.tool_settings.particle_edit | settings = context.tool_settings.particle_edit | ||||
| brush = settings.brush | brush = settings.brush | ||||
| tool = settings.tool | tool = settings.tool | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| layout.use_property_decorate = False # No animation. | layout.use_property_decorate = False # No animation. | ||||
| from bl_ui.space_toolsystem_common import ToolSelectPanelHelper | |||||
| tool_context = ToolSelectPanelHelper.tool_active_from_context(context) | |||||
| if not tool_context: | |||||
| # If there is no active tool, then there can't be an active brush. | |||||
| tool = None | |||||
| if not tool_context.has_datablock: | |||||
| # tool.has_datablock is always true for tools that use brushes. | |||||
| tool = None | |||||
| if tool is not None: | if tool is not None: | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(brush, "size", slider=True) | col.prop(brush, "size", slider=True) | ||||
| if tool == 'ADD': | if tool == 'ADD': | ||||
| col.prop(brush, "count") | col.prop(brush, "count") | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(settings, "use_default_interpolate") | col.prop(settings, "use_default_interpolate") | ||||
| ▲ Show 20 Lines • Show All 1,888 Lines • Show Last 20 Lines | |||||