diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-04-15 11:10:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-15 13:36:38 +0300 |
commit | 8ac662c77aa59c9eea5fc85c4a40546bcb1b4557 (patch) | |
tree | 82b67353779c20e41e2f3f365baf21cc209dcbea /release | |
parent | e56e7bd1ec3081a13e44319a1b2793f4043d07dd (diff) |
New freehand curve drawing tool
- Access with Shift-LMB or from the 'Create' toolbar tab.
- Uses curve fitting for bezier curves, with error and corner angle options.
- Optional tablet pressure to curve radius mapping.
- Depth can use the cursor or optionally draw onto the surface,
for the entire stroke or using the stroke start.
- Stroke plane can optionally be perpendicular to, or aligned to the surface normal.
- Optional radius tapering and for start/end points.
- Supports operator redo and calling from Python.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index d8286c64f39..01b46eb6aed 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -136,6 +136,7 @@ class VIEW3D_PT_tools_add_object(View3DPanel, Panel): @staticmethod def draw_add_curve(layout, label=False): + if label: layout.label(text="Bezier:") layout.operator("curve.primitive_bezier_curve_add", text="Bezier", icon='CURVE_BEZCURVE') @@ -149,6 +150,10 @@ class VIEW3D_PT_tools_add_object(View3DPanel, Panel): layout.operator("curve.primitive_nurbs_circle_add", text="Nurbs Circle", icon='CURVE_NCIRCLE') layout.operator("curve.primitive_nurbs_path_add", text="Path", icon='CURVE_PATH') + layout.separator() + + layout.operator("curve.draw", icon='LINE_DATA') + @staticmethod def draw_add_surface(layout): layout.operator("surface.primitive_nurbs_surface_curve_add", text="Nurbs Curve", icon='SURFACE_NCURVE') @@ -546,8 +551,61 @@ class VIEW3D_PT_tools_add_curve_edit(View3DPanel, Panel): VIEW3D_PT_tools_add_object.draw_add_curve(col, label=True) -# ********** default tools for editmode_surface **************** +class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel): + bl_category = "Options" + bl_context = "curve_edit" + bl_label = "Curve Stroke" + + def draw(self, context): + layout = self.layout + + tool_settings = context.tool_settings + cps = tool_settings.curve_paint_settings + + col = layout.column() + + col.prop(cps, "curve_type") + + if cps.curve_type == 'BEZIER': + col.label("Bezier Options:") + col.prop(cps, "error_threshold") + col.prop(cps, "use_corners_detect") + + col = layout.column() + col.active = cps.use_corners_detect + col.prop(cps, "corner_angle") + + col.label("Pressure Radius:") + row = layout.row(align=True) + rowsub = row.row(align=True) + rowsub.prop(cps, "radius_min", text="Min") + rowsub.prop(cps, "radius_max", text="Max") + + row.prop(cps, "use_pressure_radius", text="", icon_only=True) + + col = layout.column() + col.label("Taper Radius:") + row = layout.row(align=True) + row.prop(cps, "radius_taper_start", text="Start") + row.prop(cps, "radius_taper_end", text="End") + + col = layout.column() + col.label("Projection Depth:") + row = layout.row(align=True) + row.prop(cps, "depth_mode", expand=True) + + col = layout.column() + if cps.depth_mode == 'SURFACE': + col.prop(cps, "use_stroke_endpoints") + if cps.use_stroke_endpoints: + colsub = layout.column(align=True) + colsub.prop(cps, "surface_plane", expand=True) + else: + col.prop(cps, "radius_offset") + + +# ********** default tools for editmode_surface **************** class VIEW3D_PT_tools_transform_surface(View3DPanel, Panel): bl_category = "Tools" |