Page MenuHome

GPencil: Automerge last drawn stroke with previous strokes
ClosedPublic

Authored by Antonio Vazquez (antoniov) on Nov 3 2020, 5:57 PM.

Details

Summary

This option joins any stroke with an end near the actual stroke. Now it is not limited to the last stroke, any stroke in the same layer for the actual frame can be joined. The join can join two strokes drawing a third stroke.

If the end and the start of the result stroke are very small, the stroke is changed to be cyclic automatically.

There is a limit distance to join the stroke, if the distance is greater than this value, the strokes are not joined. Actually, a constant, threshold distance is used, but we could expose as a parameter in the UI.

The tool can be used with freehand drawing (Note: UI in the videos is outdated, but the functionality is the same) :

or Primitives:

Diff Detail

Repository
rB Blender
Branch
R292-temp-autojoin
Build Status
Buildable 11178
Build 11178: arc lint + arc unit

Event Timeline

Antonio Vazquez (antoniov) requested review of this revision.Nov 3 2020, 5:57 PM
Antonio Vazquez (antoniov) created this revision.
Antonio Vazquez (antoniov) retitled this revision from GPencil: First part of the new join by distance to GPencil: Autojoin last stroke.Nov 3 2020, 5:59 PM
Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
  • Set as cyclic for single stroke
  • Merge branch 'master' into R292-temp-autojoin
  • Fix crash with single points
  • Fix trim for join
  • Join several strokes at time
Antonio Vazquez (antoniov) retitled this revision from GPencil: Autojoin last stroke to GPencil: Autojoin with previous strokes.Nov 11 2020, 4:39 PM
Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Nov 11 2020, 4:39 PM
Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)

After the merge of the GSoC Bezier editing project, a lot of the internal code has changed, so this patch has been to be redo it. The funtionality is the same, but need a full test again.

@Matias Mendiola (mendio) @Daniel Martinez Lara (pepeland) @Falk David (filedescriptor) Could you retest this patch? After the merge of the Bezier GSoC, a lot of changes were done in the code and I had to redo a lot of things, so it's better to test again to be sure nothing crash. Also, we need to test if the Bezier editing is working fine also.

  • Fix typo in vector size
  • Fix crash in corner case using a point as join
  • Fix typo in vector size
  • Fix crash in corner case using a point as join
  • Keep thickness of the strokes when join them
  • Fix problem with first stroke and reduce autoclose distance
Antonio Vazquez (antoniov) retitled this revision from GPencil: Autojoin with previous strokes to GPencil: Automerge last drawn stroke with previous strokes.Nov 16 2020, 3:47 PM