diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-01-17 14:35:16 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-01-17 14:35:27 +0300 |
commit | 4ef0654449e9cf9d033b9902e1c45e36f2b99c3c (patch) | |
tree | 59cd79ef9a3ab671bb0ead7d1a4f3878809c451b /source/blender | |
parent | 502eadb2f7a5a974ade880e4a89402f5c271cca5 (diff) |
GPencil: Fix Autojoin error using layer transform
The target stroke bounding box was not checked properly and when using layer transform the error was noticeable, but really the error was before the layer transform commit.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 9acedb97a80..42e3055ef65 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -3178,10 +3178,8 @@ bGPDstroke *ED_gpencil_stroke_nearest_to_ends(bContext *C, } /* Check if one of the ends is inside target stroke bounding box. */ - if (!ED_gpencil_stroke_check_collision(gsc, gps, pt2d_start, radius, diff_mat)) { - continue; - } - if (!ED_gpencil_stroke_check_collision(gsc, gps, pt2d_end, radius, diff_mat)) { + if ((!ED_gpencil_stroke_check_collision(gsc, gps_target, pt2d_start, radius, diff_mat)) && + (!ED_gpencil_stroke_check_collision(gsc, gps_target, pt2d_end, radius, diff_mat))) { continue; } /* Check the distance of the ends with the ends of target stroke to avoid middle contact. |