From 0c08976b4e4d0c3f4c79205f2518a16df2172ca8 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Sat, 6 Nov 2021 18:11:23 -0400 Subject: [PATCH] Reverse spacing control direction effect --- toonz/sources/tnztools/perspectivetool.cpp | 2 +- toonz/sources/tnztools/perspectivetool.h | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/toonz/sources/tnztools/perspectivetool.cpp b/toonz/sources/tnztools/perspectivetool.cpp index a5c2eb93..c4e52272 100644 --- a/toonz/sources/tnztools/perspectivetool.cpp +++ b/toonz/sources/tnztools/perspectivetool.cpp @@ -913,7 +913,7 @@ void PerspectiveTool::leftButtonDrag(const TPointD &pos, const TMouseEvent &e) { std::pow(centerPoint.y - m_firstPos.y, 2)); double db = std::sqrt(std::pow(centerPoint.x - pos.x, 2) + std::pow(centerPoint.y - pos.y, 2)); - dSpace = da - db; + dSpace = db - da; if (e.isAltPressed()) { m_totalSpacing += dSpace; diff --git a/toonz/sources/tnztools/perspectivetool.h b/toonz/sources/tnztools/perspectivetool.h index 7a2abb8d..665dea92 100644 --- a/toonz/sources/tnztools/perspectivetool.h +++ b/toonz/sources/tnztools/perspectivetool.h @@ -369,8 +369,9 @@ public: class VanishingPointPerspective final : public PerspectiveObject { public: VanishingPointPerspective() - : PerspectiveObject(PerspectiveType::VanishingPoint, TPointD(0, 0), 0.0, - 10, false, 30, TPixel::Magenta, false) { + : PerspectiveObject(PerspectiveType::VanishingPoint) { + setSpacing(10); + setParallel(false); setMaxSpacing(180); setRotationPos(TPointD(40, -20)); }; @@ -395,7 +396,9 @@ public: class LinePerspective final : public PerspectiveObject { public: - LinePerspective() : PerspectiveObject(PerspectiveType::Line){}; + LinePerspective() : PerspectiveObject(PerspectiveType::Line) { + setSpacing(30); + }; ~LinePerspective(){}; void draw(SceneViewer *viewer, TRectD cameraRect) override;