From aa26ba02cd38021d9e836d8466d03ec3cfa37e62 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Mon, 22 Feb 2021 11:12:54 -0500 Subject: [PATCH] Start Short Play from Live Action Frame when available --- toonz/sources/toonz/vcrcommand.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toonz/sources/toonz/vcrcommand.cpp b/toonz/sources/toonz/vcrcommand.cpp index 2cabc2fd..47a2258f 100644 --- a/toonz/sources/toonz/vcrcommand.cpp +++ b/toonz/sources/toonz/vcrcommand.cpp @@ -4,6 +4,7 @@ #include "menubarcommandids.h" #include "tapp.h" #include "sceneviewer.h" +#include "stopmotion.h" // TnzQt includes #include "toonzqt/menubarcommand.h" @@ -144,6 +145,10 @@ public: int stopFrame = std::min(currentFrame, maxFrame); + StopMotion *stopMotion = StopMotion::instance(); + if (stopMotion->getPlaceOnXSheet() && stopMotion->m_liveViewStatus > 0) + stopFrame = StopMotion::instance()->getXSheetFrameNumber() - 1; + int startFrame = std::max(0, stopFrame - shortPlayFrameCount); TApp::instance()->getCurrentFrame()->setFrame(startFrame);