diff options
author | Charlie Jolly <mistajolly@gmail.com> | 2019-02-26 19:04:27 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2019-02-26 19:04:27 +0300 |
commit | 65de468396aaf5f43fffdc6d42e304412f75fcb8 (patch) | |
tree | 0afd57b0052df8705fd4d9183c720205e7b33caa /release/scripts/startup | |
parent | cb8614e398d395180a615e7e256a25cfe6f7c9eb (diff) |
GP: Draw: Stroke Trim
New edit mode operator and post-processing brush option.
Trim works on a single GP stroke. It removes trailing points before and after the first intersection (or loop) nearest to the start of the stroke.
Diffstat (limited to 'release/scripts/startup')
4 files changed, 7 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py index 1351dbbd42e..663de209c15 100644 --- a/release/scripts/startup/bl_operators/presets.py +++ b/release/scripts/startup/bl_operators/presets.py @@ -673,6 +673,7 @@ class AddPresetGpencilBrush(AddPresetBase, Operator): "settings.uv_random", "settings.pen_jitter", "settings.use_jitter_pressure", + "settings.trim", ] preset_subdir = "gpencil_brush" diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index b5937388634..2a4c4e94b0c 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -215,6 +215,7 @@ class GreasePencilStrokeEditPanel: row = col.row(align=True) row.operator("gpencil.stroke_simplify_fixed", text="Simplify") row.operator("gpencil.stroke_simplify", text="Adaptive") + row.operator("gpencil.stroke_trim", text="Trim") col.separator() diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 6a0ba6a713d..e73b2538bee 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4007,6 +4007,7 @@ class VIEW3D_MT_edit_gpencil(Menu): layout.operator("gpencil.stroke_smooth", text="Smooth") layout.operator("gpencil.stroke_subdivide", text="Subdivide") layout.menu("VIEW3D_MT_gpencil_simplify") + layout.operator("gpencil.stroke_trim", text="Trim") layout.separator() @@ -5674,6 +5675,7 @@ class VIEW3D_MT_gpencil_edit_specials(Menu): layout.operator("gpencil.stroke_subdivide", text="Subdivide") layout.operator("gpencil.stroke_simplify_fixed", text="Simplify") layout.operator("gpencil.stroke_simplify", text="Simplify Adaptive") + layout.operator("gpencil.stroke_trim", text="Trim") layout.separator() layout.menu("GPENCIL_MT_separate", text="Separate") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 2ba84ac166e..254a893be52 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1599,6 +1599,9 @@ class VIEW3D_PT_tools_grease_pencil_brush_settings(View3DPanel, Panel): col.prop(gp_settings, "pen_subdivision_steps") col.prop(gp_settings, "random_subdiv", text="Randomness", slider=True) + col = layout.column(align=True) + col.prop(gp_settings, "trim") + class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel): bl_context = ".greasepencil_paint" |