Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-10-25 13:05:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-25 13:05:47 +0300
commit869b1a8d6e9867a50168a7451b8a9084ba513cd7 (patch)
tree22e85b79b20ac43e235b7fc25058ea083f962453 /release
parent9a6d8f809d0a02169dcaca24da24d29a0c47c772 (diff)
Tool System: draw circle-select brush outline
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 6376d4b05c4..9c8d3c8eb9a 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -417,6 +417,13 @@ class _defs_view3d_select:
def draw_settings(context, layout, tool):
props = tool.operator_properties("view3d.select_circle")
layout.prop(props, "radius")
+
+ def draw_cursor(context, tool, xy):
+ from gpu_extras.presets import draw_circle_2d
+ props = tool.operator_properties("view3d.select_circle")
+ radius = props.radius
+ draw_circle_2d(xy, (1.0,) * 4, radius, 32)
+
return dict(
text="Select Circle",
icon="ops.generic.select_circle",
@@ -430,6 +437,7 @@ class _defs_view3d_select:
dict(type='ACTIONMOUSE', value='PRESS', ctrl=True)),
),
draw_settings=draw_settings,
+ draw_cursor=draw_cursor,
)
@ToolDef.from_fn