Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
| Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | def draw_settings_common(context, layout, tool): | ||||
| row.ui_units_x = 15 | row.ui_units_x = 15 | ||||
| row.prop(props, "arrowstyle_start", text="Start") | row.prop(props, "arrowstyle_start", text="Start") | ||||
| row.separator() | row.separator() | ||||
| row.prop(props, "arrowstyle_end", text="End") | row.prop(props, "arrowstyle_end", text="End") | ||||
| else: | else: | ||||
| col = layout.row().column(align=True) | col = layout.row().column(align=True) | ||||
| col.prop(props, "arrowstyle_start", text="Style Start") | col.prop(props, "arrowstyle_start", text="Style Start") | ||||
| col.prop(props, "arrowstyle_end", text="End") | col.prop(props, "arrowstyle_end", text="End") | ||||
| elif tool.idname == "builtin.annotate" and region_type != 'TOOL_HEADER': | |||||
| layout.separator() | |||||
| props = tool.operator_properties("gpencil.annotate") | |||||
| layout.prop(props, "use_stabilizer", text="Stabilize Stroke") | |||||
| col = layout.column(align=False) | |||||
| col.active = props.use_stabilizer | |||||
| col.prop(props, "stabilizer_radius", text="Radius", slider=True) | |||||
| col.prop(props, "stabilizer_factor", text="Factor", slider=True) | |||||
| @ToolDef.from_fn.with_args(draw_settings=draw_settings_common) | @ToolDef.from_fn.with_args(draw_settings=draw_settings_common) | ||||
| def scribble(*, draw_settings): | def scribble(*, draw_settings): | ||||
| return dict( | return dict( | ||||
| idname="builtin.annotate", | idname="builtin.annotate", | ||||
| label="Annotate", | label="Annotate", | ||||
| icon="ops.gpencil.draw", | icon="ops.gpencil.draw", | ||||
| cursor='PAINT_BRUSH', | cursor='PAINT_BRUSH', | ||||
| ▲ Show 20 Lines • Show All 2,219 Lines • Show Last 20 Lines | |||||