Skip to content

Commit 334bad5

Browse files
author
arch
committed
stop at next action point
1 parent d751960 commit 334bad5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

funscript_editor/algorithms/funscriptgenerator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,15 +474,11 @@ def get_perspective_roi(self, image :np.ndarray) -> None:
474474
elif pressed_key == "'s'":
475475
perspective['PHI'] = max((-80, perspective['PHI'] - 5))
476476
parameter_changed = True
477-
# elif pressed_key == "'a'":
478-
# perspective['THETA'] -= 5
479-
# elif pressed_key == "'d'":
480-
# perspective['THETA'] += 5
481477

482478
if cv2.waitKey(1) in [ord('q')]: break
483479

484480
try:
485-
background = np.full(preview.shape, 255, dtype=np.uint8)
481+
background = np.full(preview.shape, 0, dtype=np.uint8)
486482
loading_screen = self.drawText(background, "Please wait ...")
487483
cv2.imshow(self.window_name, loading_screen)
488484
except: pass
@@ -602,6 +598,10 @@ def tracking(self) -> str:
602598
if self.params.skip_frames > 0 and frame_num % (self.params.skip_frames + 1) != 1:
603599
continue
604600

601+
if self.params.end_frame > 0 and frame_num + self.params.start_frame >= self.params.end_frame:
602+
status = "Tracking stop at existing action point"
603+
break
604+
605605
trackerWoman.update(frame)
606606
if self.params.track_men: trackerMen.update(frame)
607607
self.processStatus.emit(frame_num)

funscript_editor/ui/minimal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self,
6969
trackMen = True if reply == QtWidgets.QMessageBox.Yes else False
7070

7171
start_frame = int(round(float(start_time)/(float(1000)/float(fps)))) if start_time > 0.0 else 0
72-
end_frame = int(round(float(end_time)/(float(1000)/float(fps)))) if end_time > 0.0 else -1
72+
end_frame = int(round(float(end_time)/(float(1000)/float(fps)))) if end_time > 0.0 and start_time < end_time else -1
7373

7474
self.funscript_generator = FunscriptGenerator(
7575
FunscriptGeneratorParameter(

0 commit comments

Comments
 (0)