Refactor constants to constants
This commit is contained in:
@@ -509,6 +509,14 @@ class VideoEditor:
|
||||
# Crop adjustment settings
|
||||
CROP_SIZE_STEP = 15 # pixels to expand/contract crop
|
||||
|
||||
# Motion tracking settings
|
||||
TRACKING_POINT_THRESHOLD = 10 # pixels for delete/snap radius
|
||||
|
||||
# Seek frame counts
|
||||
SEEK_FRAMES_CTRL = 60 # Ctrl modifier: 60 frames
|
||||
SEEK_FRAMES_SHIFT = 10 # Shift modifier: 10 frames
|
||||
SEEK_FRAMES_DEFAULT = 1 # Default: 1 frame
|
||||
|
||||
def __init__(self, path: str):
|
||||
self.path = Path(path)
|
||||
|
||||
@@ -996,11 +1004,11 @@ class VideoEditor:
|
||||
):
|
||||
"""Seek video with different frame counts based on modifiers and seek multiplier"""
|
||||
if ctrl_pressed:
|
||||
base_frames = 60 # Ctrl: 60 frames
|
||||
base_frames = self.SEEK_FRAMES_CTRL
|
||||
elif shift_pressed:
|
||||
base_frames = 10 # Shift: 10 frames
|
||||
base_frames = self.SEEK_FRAMES_SHIFT
|
||||
else:
|
||||
base_frames = 1 # Default: 1 frame
|
||||
base_frames = self.SEEK_FRAMES_DEFAULT
|
||||
|
||||
# Apply seek multiplier to the base frame count
|
||||
frames = direction * int(base_frames * self.seek_multiplier)
|
||||
@@ -2129,7 +2137,7 @@ class VideoEditor:
|
||||
if not self.is_image_mode:
|
||||
# Store tracking points in ROTATED frame coordinates (pre-crop)
|
||||
rx, ry = self._map_screen_to_rotated(x, y)
|
||||
threshold = 50
|
||||
threshold = self.TRACKING_POINT_THRESHOLD
|
||||
removed = False
|
||||
|
||||
# First check for removal of existing points on current frame
|
||||
|
Reference in New Issue
Block a user