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.
This commit is contained in:
parent
502eadb2f7
commit
4ef0654449
Notes:
blender-bot
2023-02-13 19:51:14 +01:00
Referenced by issue #84824, Add Object Tool : When Base Origin and Height Origin Are Different, Fixed Aspect Is Uncorrect. Referenced by issue #84812, GPU Compute with OpenCL in Cycles: Crash or Freeze
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue