From 00c913586e2bf782424930efd5e22a483dedce64 Mon Sep 17 00:00:00 2001 From: Ivan Mahonin Date: Aug 16 2023 15:17:07 +0000 Subject: #assistants: fix assistants selection --- diff --git a/toonz/sources/tnztools/assistant.cpp b/toonz/sources/tnztools/assistant.cpp index daab0f6..a7d9e88 100644 --- a/toonz/sources/tnztools/assistant.cpp +++ b/toonz/sources/tnztools/assistant.cpp @@ -78,8 +78,9 @@ TGuideline::calcTrackWeight(const TTrack &track, const TAffine &toScreen, bool & double weight = length*logNormalDistribuitionUnscaled(midStepLength, snapLenght, snapScale); sumWeight += weight; - TPointD ntp = nearestPoint(mid.position); - double deviation = tdistance(toScreen*ntp, p); + double deviation = tdistance( + toScreen*mid.position, + toScreen*nearestPoint(mid.position) ); sumDeviation += weight*deviation; } prev = p;