[Bf-blender-cvs] [dc0c490b760] master: Tool System: Use circle cursor for non-3D circle select
Campbell Barton
noreply at git.blender.org
Thu May 30 13:34:35 CEST 2019
Commit: dc0c490b7601b4dced13be6a9877f68ee9712736
Author: Campbell Barton
Date: Thu May 30 21:28:04 2019 +1000
Branches: master
https://developer.blender.org/rBdc0c490b7601b4dced13be6a9877f68ee9712736
Tool System: Use circle cursor for non-3D circle select
===================================================================
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 20bba30bb08..240d17b4816 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1192,6 +1192,13 @@ class _defs_image_uv_select:
row.use_property_split = False
row.prop(props, "mode", text="", expand=True, icon_only=True)
layout.prop(props, "radius")
+
+ def draw_cursor(_context, tool, xy):
+ from gpu_extras.presets import draw_circle_2d
+ props = tool.operator_properties("uv.select_circle")
+ radius = props.radius
+ draw_circle_2d(xy, (1.0,) * 4, radius, 32)
+
return dict(
idname="builtin.select_circle",
label="Select Circle",
@@ -1199,6 +1206,7 @@ class _defs_image_uv_select:
widget=None,
keymap=(),
draw_settings=draw_settings,
+ draw_cursor=draw_cursor,
)
@@ -1385,6 +1393,13 @@ class _defs_gpencil_edit:
row.prop(props, "mode", text="", expand=True, icon_only=True)
layout.prop(props, "radius")
layout.prop(context.tool_settings.gpencil_sculpt, "intersection_threshold")
+
+ def draw_cursor(_context, tool, xy):
+ from gpu_extras.presets import draw_circle_2d
+ props = tool.operator_properties("gpencil.select_circle")
+ radius = props.radius
+ draw_circle_2d(xy, (1.0,) * 4, radius, 32)
+
return dict(
idname="builtin.select_circle",
label="Select Circle",
@@ -1392,6 +1407,7 @@ class _defs_gpencil_edit:
widget=None,
keymap=(),
draw_settings=draw_settings,
+ draw_cursor=draw_cursor,
)
@ToolDef.from_fn
@@ -1522,6 +1538,13 @@ class _defs_node_select:
row.use_property_split = False
row.prop(props, "mode", text="", expand=True, icon_only=True)
layout.prop(props, "radius")
+
+ def draw_cursor(_context, tool, xy):
+ from gpu_extras.presets import draw_circle_2d
+ props = tool.operator_properties("node.select_circle")
+ radius = props.radius
+ draw_circle_2d(xy, (1.0,) * 4, radius, 32)
+
return dict(
idname="builtin.select_circle",
label="Select Circle",
@@ -1529,6 +1552,7 @@ class _defs_node_select:
widget=None,
keymap="Node Tool: Select Circle",
draw_settings=draw_settings,
+ draw_cursor=draw_cursor,
)
More information about the Bf-blender-cvs
mailing list