From ac45540a348ec8662e4e27002c64176c402fe549 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Wed, 2 Mar 2022 17:15:44 +0100 Subject: Curves: add brush to add curves on surface This adds a prototype for the first brush that can add new curves by painting on a surface. Note that this can only be used when the curves object has a surface object set in the properties panel. The brush can take minimum distance into account. This allows distributing curves with a somewhat consistent density. Differential Revision: https://developer.blender.org/D14207 --- release/scripts/startup/bl_ui/space_view3d.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index cd0306d31fd..d6aea8e2d89 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -473,7 +473,8 @@ class _draw_tool_settings_context_mode: if (tool is None) or (not tool.has_datablock): return False - paint = context.tool_settings.curves_sculpt + tool_settings = context.tool_settings + paint = tool_settings.curves_sculpt layout.template_ID_preview(paint, "brush", rows=3, cols=8, hide_buttons=True) brush = paint.brush @@ -500,6 +501,10 @@ class _draw_tool_settings_context_mode: header=True ) + if brush.curves_sculpt_tool == "TEST3": + layout.prop(tool_settings.curves_sculpt, "distance") + + class VIEW3D_HT_header(Header): bl_space_type = 'VIEW_3D' -- cgit v1.2.3