@@ -14,6 +14,7 @@ multiaxis = false
1414tmpFileName = " funscript_actions.json"
1515tmpFileExists = false
1616enableLogs = false
17+ stopAtNextActionPoint = true
1718filterSimilarTimestamps = true
1819scriptNames = {}
1920scriptNamesCount = 0
@@ -54,17 +55,19 @@ function binding.start_funscript_generator()
5455 local currentTime = player .CurrentTime ()
5556 local fps = player .FPS ()
5657
58+ local next_action = nil
59+ if stopAtNextActionPoint then
60+ next_action , _ = script :closestActionAfter (currentTime )
61+ if next_action and next_action .at < (currentTime + 0.5 ) then
62+ next_action , _ = script :closestActionAfter (next_action .at )
63+ end
64+ end
65+
5766 print (" tmpFile: " , tmpFile )
5867 print (" video: " , video )
5968 print (" fps" , fps )
6069 print (" currentScriptIdx: " , scriptIdx )
6170 print (" currentTime: " , currentTime )
62-
63- local next_action , _ = script :closestActionAfter (currentTime )
64- if next_action and next_action .at < (currentTime + 0.5 ) then
65- next_action , _ = script :closestActionAfter (next_action .at )
66- end
67-
6871 print (" nextAction: " , next_action and tostring (next_action .at ) or " nil" )
6972
7073 local cmd = " "
@@ -430,6 +433,7 @@ function gui()
430433
431434 ofs .Separator ()
432435 ofs .Text (" Options:" )
436+ stopAtNextActionPoint , _ = ofs .Checkbox (" Stop tracking at next existing point" , stopAtNextActionPoint )
433437 enableLogs , _ = ofs .Checkbox (" Enable logging" , enableLogs )
434438 multiaxis , _ = ofs .Checkbox (" Enable multiaxis" , multiaxis )
435439
0 commit comments