fixed commetn from songxiao

This commit is contained in:
ykcheungab
2026-09-25 17:46:37 +08:00
parent 6effe74172
commit 12781854ca
56 changed files with 4935 additions and 419 deletions
+17 -5
View File
@@ -527,18 +527,30 @@ def _tool(name: str):
def _shipped_asset_dirs() -> tuple[Path, Path] | None:
"""The Blender export and its unroll map, when the repository carries them."""
base = (
"""The Blender export and its unroll map, when the repository carries them.
The map's name follows ``camera.source_scale`` (the SDK's ``scaled_map_cache_path``), so it is
derived from the bundle's own ``sensor.json`` rather than pinned: a scale change renames the
file, and a hard-coded name turns this acceptance test into a silent skip.
"""
bundle = (
Path(__file__).resolve().parents[2]
/ "apps"
/ "studio"
/ "config"
/ "sensors"
/ "finger"
/ "assets"
/ "30fps-0703"
)
mapping = base / "unroll_map_uv_s0.4.npz"
base = bundle / "assets" / "30fps-0703"
config_path = bundle / "sensor.json"
if not config_path.is_file():
return None
from orisys_app_shared.acquisition.geometry import map_path_for
scale = (json.loads(config_path.read_text(encoding="utf-8")).get("camera") or {}).get(
"source_scale"
)
mapping = map_path_for(base, scale)
if (base / "mesh.npz").is_file() and mapping.is_file():
return base, mapping
return None