Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d_toolbar.py
| Context not available. | |||||
| 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) | ||||
| Context not available. | |||||