Files
grass-cutters/Tools/Trailer/edl_demo.py
NiemandKG 9f6b749bad Store media shot again on the current build: screenshots, showcase, trailers
The trailer rolls lived in a folder that is gone, so everything was shot again
(-demotrailer, -stills) from today's build: new tools, deck props, console, T logo.
- 14 store screenshots from the -stills takes
- showcase WEBMs and banners rebuilt (Tools/Steam/showcase.py)
- the demo trailer is now an edl for cut.py (Tools/Trailer/edl_demo.py)
- tools find the project from their own location instead of the old path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:46:36 +06:00

51 lines
1.7 KiB
Python

"""The demo's trailer: the main trailer's cold open, its first and last choruses and its ending, about 55 seconds, with
an end card for the free demo. Same takes, same song, same grades, only less of it.
py -I cut.py edl_demo.py ../../Builds/Trailer/GrassCuttersTogether_Demo_Trailer.mp4
"""
import importlib.util
import os
from cut import Logo, Type
# cut.py loads whichever edl it is given under the name "edl", so the main one is loaded here under its own name
_spec = importlib.util.spec_from_file_location("edl_main", os.path.join(os.path.dirname(os.path.abspath(__file__)), "edl.py"))
_main = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(_main)
ROLLS, SHOTS, PUNCH, SHAKE, ABERRATE, LOGO = _main.ROLLS, _main.SHOTS, _main.PUNCH, _main.SHAKE, _main.ABERRATE, _main.LOGO
SFX, _TYPE = _main.SFX, _main.TYPE
# cold open (the planet), the first chorus, the last chorus, the ending
KEEP = [(2.2, 13.4), (22.9, 38.23), (116.1, 131.03), (147.72, 170.0)]
FLASH = [(22.9, 0.5), (116.1, 0.6), (159.0, 0.7)]
def REACT(t):
if t < 22.9:
return 0.25
if t < 38.3:
return 0.6
if t < 147.7:
return 0.7
if t < 159:
return 0.0
return 0.4
def BLACK(t):
if t < 2.7:
return 1 - (t - 2.2) / 0.5
if t > 168.6:
return min(1.0, (t - 168.6) / 1.2)
return 0.0
TYPE = [ty for ty in _TYPE if not isinstance(ty, Logo) and ty.text not in ("WISHLIST NOW ON STEAM", "CO-OP FOR 1 TO 16 PLAYERS")]
TYPE += [
Type("PLAY THE FREE DEMO", 160.6, 170.0, 84, y=0.74, how="rise"),
Type("WISHLIST NOW ON STEAM", 162.0, 170.0, 54, y=0.84, how="rise", colour=(226, 240, 200)),
Logo(LOGO, 159.0, 170.0, 1180, 0.38),
]
SFX = [s for s in SFX if any(a <= s[0] < b for a, b in KEEP)]