GPencil: New Simplify modifier mode Sample and operator

This mode simplify the stroke doing a resampling of the points and generate new geometry at the distance defined.

Sample function developed by @NicksBest

New Resample Stroke operator

This operator recreates the stroke geometry with a predefined length between points.

The operator uses the same code used in Simplify modifier.

Reviewers: @mendio
This commit is contained in:
Antonioya
2019-08-08 16:12:13 +02:00
parent 5ca3bc7a14
commit 179e886ab3
10 changed files with 412 additions and 17 deletions

View File

@@ -1785,13 +1785,13 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.label(text="Settings:")
row = col.row(align=True)
row.enabled = md.mode == 'FIXED'
row.prop(md, "step")
row = col.row(align=True)
row.enabled = not md.mode == 'FIXED'
row.prop(md, "factor")
if md.mode == 'FIXED':
col.prop(md, "step")
elif md.mode == 'ADAPTIVE':
col.prop(md, "factor")
elif md.mode == 'SAMPLE':
col.prop(md, "length")
col = layout.column()
col.separator()