fix: 'pull out' / 'push in' as a body action no longer counts as an existing camera move

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
digital-garbage
2026-09-30 18:15:20 +03:00
co-authored by Claude Sonnet 5.5
parent ccaf04bd70
commit efc5757950
2 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -34,11 +34,11 @@ _CAMERA_VERBS = (r"(?:moves?|pushes|pulls|pans|tilts|zooms|tracks|follows|drifts
CAMERA = re.compile(
r"\b(?:zoom(?:s|ed|ing)?\s+(?:in|out)|zoom-(?:in|out)|dolly|rack(?:s|ing)? focus|close-?up|"
r"handheld|wide shot|wide-angle shot|tracking shot|crane shot|static shot|whip pan|"
r"push[- ]in|pull[- ]out|camera shake)\b"
r"camera shake)\b"
r"|\bcamera(?:'s)?\s+(?:\w+ly\s+)?" + _CAMERA_VERBS + r"\b"
r"|\bcamera(?:'s)? (?:movement|motion|move)\b"
r"|(?:^|[.!?]\s+)(?:slowly |quickly |smoothly )?(?:pan|tilt|truck|pedestal|arc|orbit|roll|"
r"push in|pull out|pull back|zoom|track|dolly|crane)\b",
r"zoom|track|dolly|crane)\b",
re.I)
GENERIC = {"camera", "video", "scene", "shot", "frame", "background", "foreground", "view",
"image", "screen", "moment", "time", "way", "side", "front", "middle", "one",
+6 -1
View File
@@ -170,6 +170,8 @@ def test_a_shot_that_opens_with_a_cut_is_not_taken_for_having_a_camera_move():
"<Subject 1> rolls onto <Subject 1>'s side and pulls out a knife.",
"<Subject 1> looks at the camera and smiles, pushes in the last piece.",
"<Subject 1>'s back arcs, then <Subject 2> focuses on the screen.",
"<Subject 1> starts to pull out slowly and pushes in again, then will push in once more.",
"Pull out slowly. Push in deeper.",
"<Subject 1> moves up and down, then pans <Subject 1>'s gaze across the room.",
])
def test_body_movement_and_looking_at_the_camera_are_not_camera_moves(text):
@@ -184,6 +186,8 @@ def test_body_movement_and_looking_at_the_camera_are_not_camera_moves(text):
"A tracking shot follows <Subject 1>.",
"Rack focus to the window.",
"The camera slowly drifts upward.",
"The camera pulls back to a wider view.",
"The camera pushes in toward <Subject 1>.",
])
def test_real_camera_moves_are_still_found(text):
assert sc.CAMERA.search(sc.CUT.sub("", text))
@@ -362,6 +366,7 @@ def test_cut_times_split_the_scene_evenly_with_no_tiny_shots():
assert sc.add_shot_cuts(P, 4)[1]["times"] == ["00:01.000", "00:02.000", "00:03.000"]
def test_no_phrase_reads_as_the_camera_pulling_something_out():
def test_the_phrases_we_write_never_say_the_camera_pulls_out():
"""Only what the rewriter writes; a shortcut may say it as an action."""
for group in (sc.MOVES_DETAIL, sc.MOVES_OTHER, sc.MOVES_TRAVEL, sc.MOVES_THEN, sc.MOVES_FINISH):
assert not any("pulls out" in m for m in group), group