Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
# This example adds an object mode tool to the toolbar.
# This is just the circle-select tool.
import bpy
from bpy.utils.toolsystem import ToolDef
@ToolDef.from_fn
def my_tool():
def draw_settings(context, layout, tool):
props = tool.operator_properties("view3d.select_circle")
layout.prop(props, "radius")
return dict(
text="My Circle Select",
description=(
"This is a tooltip\n"
"with multiple lines"
),
icon="ops.generic.select_circle",
widget=None,
keymap=(
("view3d.select_circle", dict(deselect=False), dict(type='LEFTMOUSE', value='PRESS')),
("view3d.select_circle", dict(deselect=True), dict(type='LEFTMOUSE', value='PRESS', ctrl=True)),
draw_settings=draw_settings,
)
def register():
bpy.utils.register_tool('VIEW_3D', 'OBJECT', my_tool)
def unregister():
bpy.utils.unregister_tool('VIEW_3D', 'OBJECT', my_tool)
if __name__ == "__main__":
register()