Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
| Show First 20 Lines • Show All 3,056 Lines • ▼ Show 20 Lines | class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel): | ||||
| # Default group to use as a fallback. | # Default group to use as a fallback. | ||||
| tool_fallback_id = "builtin.select" | tool_fallback_id = "builtin.select" | ||||
| @classmethod | @classmethod | ||||
| def tools_from_context(cls, context, mode=None): | def tools_from_context(cls, context, mode=None): | ||||
| if mode is None: | if mode is None: | ||||
| if context.space_data: | if context.space_data: | ||||
| if context.space_data.display_mode == 'IMAGE': | |||||
| mode = context.space_data.view_type | mode = context.space_data.view_type | ||||
| for tools in (cls._tools[None], cls._tools.get(mode, ())): | for tools in (cls._tools[None], cls._tools.get(mode, ())): | ||||
| for item in tools: | for item in tools: | ||||
| if not (type(item) is ToolDef) and callable(item): | if not (type(item) is ToolDef) and callable(item): | ||||
| yield from item(context) | yield from item(context) | ||||
| else: | else: | ||||
| yield item | yield item | ||||
| @classmethod | @classmethod | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||