diff options
author | Jacques Lucke <jacques@blender.org> | 2022-03-02 19:15:44 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-03-02 19:15:44 +0300 |
commit | ac45540a348ec8662e4e27002c64176c402fe549 (patch) | |
tree | 505778f4634aadd248f1c499fad72f28394b0780 /release/scripts | |
parent | 037e1ad140d5c0b57d54f64e32a00f7961b7cc17 (diff) |
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
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 7 |
1 files changed, 6 insertions, 1 deletions
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' |