Start Short Play from Live Action Frame when available

This commit is contained in:
manongjohn 2021-02-22 11:12:54 -05:00
parent 588c760e8a
commit aa26ba02cd

View file

@ -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);