Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
| Context not available. | |||||
| attr, | attr, | ||||
| tooldef_keywords={}, | tooldef_keywords={}, | ||||
| ): | ): | ||||
| # Grease pencil uses a more subtle cursor | |||||
| if attr.startswith("gpencil"): | |||||
| cursor = 'PAINT_CROSSHAIR' | |||||
| else: | |||||
| cursor = 'DEFAULT' | |||||
| tool_defs = [] | tool_defs = [] | ||||
| for enum in type.bl_rna.properties[attr].enum_items_static: | for enum in type.bl_rna.properties[attr].enum_items_static: | ||||
| name = enum.name | name = enum.name | ||||
| Context not available. | |||||
| idname=idname_prefix + name, | idname=idname_prefix + name, | ||||
| label=name, | label=name, | ||||
| icon=icon_prefix + idname.lower(), | icon=icon_prefix + idname.lower(), | ||||
| cursor=cursor, | |||||
| data_block=idname, | data_block=idname, | ||||
| **tooldef_keywords, | **tooldef_keywords, | ||||
| ) | ) | ||||
| Context not available. | |||||
| idname="builtin.annotate_line", | idname="builtin.annotate_line", | ||||
| label="Annotate Line", | label="Annotate Line", | ||||
| icon="ops.gpencil.draw.line", | icon="ops.gpencil.draw.line", | ||||
| cursor='CROSSHAIR', | cursor='PAINT_CROSSHAIR', | ||||
| keymap="Generic Tool: Annotate Line", | keymap="Generic Tool: Annotate Line", | ||||
| draw_settings=draw_settings, | draw_settings=draw_settings, | ||||
| ) | ) | ||||
| Context not available. | |||||
| idname="builtin.annotate_polygon", | idname="builtin.annotate_polygon", | ||||
| label="Annotate Polygon", | label="Annotate Polygon", | ||||
| icon="ops.gpencil.draw.poly", | icon="ops.gpencil.draw.poly", | ||||
| cursor='CROSSHAIR', | cursor='PAINT_CROSSHAIR', | ||||
| keymap="Generic Tool: Annotate Polygon", | keymap="Generic Tool: Annotate Polygon", | ||||
| draw_settings=draw_settings, | draw_settings=draw_settings, | ||||
| ) | ) | ||||
| Context not available. | |||||
| idname="builtin.annotate_eraser", | idname="builtin.annotate_eraser", | ||||
| label="Annotate Eraser", | label="Annotate Eraser", | ||||
| icon="ops.gpencil.draw.eraser", | icon="ops.gpencil.draw.eraser", | ||||
| cursor='CROSSHAIR', # XXX: Always show brush circle when enabled | cursor='PAINT_CROSSHAIR', # XXX: Always show brush circle when enabled | ||||
| keymap="Generic Tool: Annotate Eraser", | keymap="Generic Tool: Annotate Eraser", | ||||
| draw_settings=draw_settings, | draw_settings=draw_settings, | ||||
| ) | ) | ||||
| Context not available. | |||||
| idname="builtin.line", | idname="builtin.line", | ||||
| label="Line", | label="Line", | ||||
| icon="ops.gpencil.primitive_line", | icon="ops.gpencil.primitive_line", | ||||
| cursor='CROSSHAIR', | cursor='PAINT_CROSSHAIR', | ||||
| widget=None, | widget=None, | ||||
| keymap=(), | keymap=(), | ||||
| ) | ) | ||||
| Context not available. | |||||
| idname="builtin.box", | idname="builtin.box", | ||||
| label="Box", | label="Box", | ||||
| icon="ops.gpencil.primitive_box", | icon="ops.gpencil.primitive_box", | ||||
| cursor='CROSSHAIR', | cursor='PAINT_CROSSHAIR', | ||||
| widget=None, | widget=None, | ||||
| keymap=(), | keymap=(), | ||||
| ) | ) | ||||
| Context not available. | |||||
| idname="builtin.circle", | idname="builtin.circle", | ||||
| label="Circle", | label="Circle", | ||||
| icon="ops.gpencil.primitive_circle", | icon="ops.gpencil.primitive_circle", | ||||
| cursor='CROSSHAIR', | cursor='PAINT_CROSSHAIR', | ||||
| widget=None, | widget=None, | ||||
| keymap=(), | keymap=(), | ||||
| ) | ) | ||||
| Context not available. | |||||
| idname="builtin.arc", | idname="builtin.arc", | ||||
| label="Arc", | label="Arc", | ||||
| icon="ops.gpencil.primitive_arc", | icon="ops.gpencil.primitive_arc", | ||||
| cursor='CROSSHAIR', | cursor='PAINT_CROSSHAIR', | ||||
| widget=None, | widget=None, | ||||
| keymap=(), | keymap=(), | ||||
| ) | ) | ||||
| Context not available. | |||||
| idname="builtin.curve", | idname="builtin.curve", | ||||
| label="Curve", | label="Curve", | ||||
| icon="ops.gpencil.primitive_curve", | icon="ops.gpencil.primitive_curve", | ||||
| cursor='CROSSHAIR', | cursor='PAINT_CROSSHAIR', | ||||
| widget=None, | widget=None, | ||||
| keymap=(), | keymap=(), | ||||
| ) | ) | ||||
| Context not available. | |||||