Merge pull request #595 from manongjohn/add_shortplay_start_option

Add start Short Play from Live View
This commit is contained in:
manongjohn 2021-02-28 23:50:08 -05:00 committed by GitHub
commit f4a70cefbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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