If the cursor on the Keyframe Timeline is at or near the last keyframe, play from the beginning
This commit is contained in:
@@ -82,6 +82,13 @@ public class ReplayProcess {
|
|||||||
//default camera path, no rendering
|
//default camera path, no rendering
|
||||||
if (renderOptions == null) {
|
if (renderOptions == null) {
|
||||||
initialTimestamp = fromStart ? 0 : ReplayHandler.getRealTimelineCursor();
|
initialTimestamp = fromStart ? 0 : ReplayHandler.getRealTimelineCursor();
|
||||||
|
|
||||||
|
//if the cursor is at (or very near) the end, play from the beginning as well
|
||||||
|
if(initialTimestamp + 50 >= Math.max(ReplayHandler.getTimeKeyframes().last().getRealTimestamp(),
|
||||||
|
ReplayHandler.getPositionKeyframes().last().getRealTimestamp())) {
|
||||||
|
initialTimestamp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
lastRealReplayTime = initialTimestamp;
|
lastRealReplayTime = initialTimestamp;
|
||||||
|
|
||||||
int ts = ReplayHandler.getTimeKeyframes().getInterpolatedValueForTimestamp(initialTimestamp, true).asInt();
|
int ts = ReplayHandler.getTimeKeyframes().getInterpolatedValueForTimestamp(initialTimestamp, true).asInt();
|
||||||
|
|||||||
Reference in New Issue
Block a user