clips: use AugmentedRoadView instead of MainLayout (#37053)

Render only the road view in clips rather than the full main layout,
matching the updated UI module structure.
This commit is contained in:
Trey Moen
2026-02-01 14:21:00 -07:00
committed by GitHub
parent cd70e23dc3
commit e76e1e500c
+5 -5
View File
@@ -265,9 +265,9 @@ def clip(route: Route, output: str, start: int, end: int, headless: bool = True,
import pyray as rl
if big:
from openpilot.selfdrive.ui.layouts.main import MainLayout
from openpilot.selfdrive.ui.onroad.augmented_road_view import AugmentedRoadView
else:
from openpilot.selfdrive.ui.mici.layouts.main import MiciMainLayout as MainLayout # type: ignore[assignment]
from openpilot.selfdrive.ui.mici.onroad.augmented_road_view import AugmentedRoadView # type: ignore[assignment]
from openpilot.selfdrive.ui.ui_state import ui_state
from openpilot.system.ui.lib.application import gui_app, FontWeight, FONT_SCALE
timer.lap("import")
@@ -298,8 +298,8 @@ def clip(route: Route, output: str, start: int, end: int, headless: bool = True,
patch_submaster(message_chunks, ui_state)
gui_app.init_window("clip", fps=FRAMERATE)
main_layout = MainLayout()
main_layout.set_rect(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
road_view = AugmentedRoadView()
road_view.set_rect(rl.Rectangle(0, 0, gui_app.width, gui_app.height))
font = gui_app.font(FontWeight.NORMAL)
timer.lap("setup")
@@ -312,7 +312,7 @@ def clip(route: Route, output: str, start: int, end: int, headless: bool = True,
vipc.send(VisionStreamType.VISION_STREAM_ROAD, frame_bytes, frame_idx, int(frame_idx * 5e7), int(frame_idx * 5e7))
ui_state.update()
if should_render:
main_layout.render()
road_view.render()
render_overlays(rl, gui_app, font, FONT_SCALE, metadata, title, start, frame_idx, show_metadata, show_time)
frame_idx += 1
pbar.update(1)