Pullusb / GP_refine_strokes

Blender addon - Grease pencil options to refine strokes
GNU General Public License v3.0
18 stars 2 forks source link

GP refine strokes

Blender addon - Bunch of functions for Grease Pencil post-drawing strokes adjustment

Download latest


Where ?

Panel in sidebar : 3D view > sidebar 'N' > Gpencil > Strokes refine (need to be in a GP mode to appear)

Description

The addon offer various tools to affect strokes.
Use F9 key to use the redo options when available.

The important things. Almost all the tools respect the filter you define at the top of the panel:

target_filter

This is based on three level : Layer > Frame > Stroke. Be careful with the targets.

Use selection : Restrict target scope to selected strokes only

Target last in paint mode : In draw mode, restrict target scope to last stroke.

Selectors

Select backward/forward
Select strokes from the start or end of the stack in active frame
backward select

Select by length
Select stroke in active frame that are shorter than given length.
Hint: you can discard single points (considered 0 length strokes) in the redo panel
backward select

Select by angle
F9 to access angle tolerance tweaking via redo panel
angle based selection

Select hatching
Select lines with specific angle. Reference angle can be set with a selected stroke
angle based selection

Select attribute threshold
Select strokes or points if attribute (pressure, opacity) is below or above a given threshold
All the tweaking and options are available in the F9 redo panel
select by attribute

Stroke refine

Strokes Delete
Delete strokes from the start or end of the stack in active frame
backward select

Trim start/end (only work on last stroke)
each call erase starting/ending point. usefull to adjust when stroke has gone too far
Stroke trim

straighten
Two buttons
One keep only first and last point so in-between point information like thickness are lost
The other straighten the point and you can affect influence.
Shift + Click to reset infuence to 100%
Ctrl + Click for homogen pressure
straighten

to Circle Tranform into average circle
Shift + Click to reset infuence to 100%
Ctrl + Click for homogen pressure

polygonize
Like the straighten above but by splitting on angles between point, user can manage angle tolerance.
polygonize

Thickness and opacity

Modify the following strokes attributes:

Modify following points attributes:

On all those attributes you can either add/substract, set or multiply a value
point attribute

There is also a solution to equalize stroke thickness / pressure

Equalize stroke thickness
Equalize stroke thickness

Equalize point pressure
Equalize point pressure

Resampling presets

Those are juste shortcuts to native Blender operators (on selection only)
The resampling operator can be called with some pre-defined value.
Allow for quick adjustement of stroke's definition.

Infos

Print stroke/points infos: Display informations in console (according to filter)

Experimental features

You can enable experimental features in addon preferences Those are not stable and can easily return errors

Refine stroke by progressively fade pressure from middle to tip.
/!\ Works sometimes, percentage is not accurate, can raise errors. thin tips

Auto join (only on last stroke) /!\ experimental
Merge the start of last stroke with the nearest stroke tail found
head cutter tolerance : number (as points) from stroke boundary that are evaluated for the lines merge
Detection radius : Proximity tolerance to detect surrounding strokes boundaries, relative to screen space, increase if no result
auto join

Further notes

Filter management can be tricky at first.

Examples:
Layer: Active, Frame: Active, stroke: Selected -> You can select strokes that are on different layer, but here your restricted to 'active layer'.

Layer: All, Frame: Active, stroke: Last -> Here last stroke is not necessarily the one on the active layer (since All layer are targeted)

Keep that in mind when defining your targets

keymaps

Alt + X
Bind Strokes Delete (see upper) to shortcut Alt + X
Allow to delete quickly the last bunch of strokes in active layer > frame
Like an infinite Ctrl + Z !


Consult changelog here