From 052d1d0927fae3a479fb341d4af25879cc67bd98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= <108685187+electron-rare@users.noreply.github.com> Date: Wed, 13 May 2026 12:18:59 +0200 Subject: [PATCH] feat(layout): single-window mode + headless py User wants a single visible window. data_only_viz now skips NSWindow / Metal / HUD entirely when --multi-hmr is set, keeping only the OSC listener and the Multi-HMR worker that streams vertices to AV-Live-Body. AV-Live-Body keeps the camera preview behind the SMPL-X mesh and stays the sole UI surface. Tradeoff: the generative Metal scenes (storm, tunnel, plasma...) and the multi-person skeleton overlay drawn by data_only_viz are not visible in multi-hmr mode. They remain available by running the launcher without the Multi-HMR toggle. --- data_only_viz/main.py | 12 ++++++++++++ .../Sources/AVLiveBody/AVLiveBodyApp.swift | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/data_only_viz/main.py b/data_only_viz/main.py index dff7080..b1c171c 100644 --- a/data_only_viz/main.py +++ b/data_only_viz/main.py @@ -74,6 +74,18 @@ class AppDelegate(NSObject): def applicationDidFinishLaunching_(self, notification): # noqa: N802 LOG.info("applicationDidFinishLaunching: start") + # Mode headless : --multi-hmr cede l'affichage a AV-Live-Body + # (Swift RealityKit). On garde seulement le worker pose + le + # sender TCP, donc pas de NSWindow / Metal renderer / HUD. + if getattr(self._opts, "multi_hmr", False): + LOG.info("multi-hmr mode: headless (no NSWindow)") + self._headless = True + self._listener.start() + self._start_pose_worker() + LOG.info("headless ready — OSC :%d, TCP sender :57130", + self._opts.port) + return + self._headless = False # 1) Fenetre screen = NSScreen.mainScreen().frame() w, h = self._opts.width, self._opts.height diff --git a/launcher/AV-Live-Body/Sources/AVLiveBody/AVLiveBodyApp.swift b/launcher/AV-Live-Body/Sources/AVLiveBody/AVLiveBodyApp.swift index b6e544e..8229d67 100644 --- a/launcher/AV-Live-Body/Sources/AVLiveBody/AVLiveBodyApp.swift +++ b/launcher/AV-Live-Body/Sources/AVLiveBody/AVLiveBodyApp.swift @@ -20,4 +20,3 @@ struct ContentView: View { } } } -