[Bf-blender-cvs] [869b1a8d6e9] blender2.8: Tool System: draw circle-select brush outline
Campbell Barton
noreply at git.blender.org
Thu Oct 25 12:06:09 CEST 2018
Commit: 869b1a8d6e9867a50168a7451b8a9084ba513cd7
Author: Campbell Barton
Date: Thu Oct 25 21:05:29 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB869b1a8d6e9867a50168a7451b8a9084ba513cd7
Tool System: draw circle-select brush outline
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
===================================================================
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
More information about the Bf-blender-cvs
mailing list