From 9daef39bce9753517842c047d1e97b9733808037 Mon Sep 17 00:00:00 2001 From: "Aglan (Paperclip CEO via Claude)" Date: Sun, 19 Jul 2026 00:48:52 -0300 Subject: [PATCH] fix(cli): honor --pose when --glb/--colmap present cmd_depth_export computed the camera pose (ext/intr) for the glb/colmap writers but never persisted --pose , silently dropping it. The pose json only got written in the depth-only path. Write it here too, reusing the already-computed ext/intr. Co-Authored-By: Claude Opus 4.8 --- examples/cli/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp index d47111e..2ee5b0e 100644 --- a/examples/cli/main.cpp +++ b/examples/cli/main.cpp @@ -141,6 +141,13 @@ static int cmd_depth_export(const da::cli::Parsed& p, da::Engine& eng){ std::fprintf(stderr, "error: write_colmap failed\n"); return 1; } std::printf("wrote COLMAP model (%s) to %s\n", p.colmap_binary ? "bin" : "txt", p.output_colmap.c_str()); } + // Pose is already computed for the glb/colmap export above; honor --pose here + // too (previously silently dropped when --glb/--colmap were present). + if (!p.output_pose.empty()){ + if (!da::write_pose_json(p.output_pose, ext, intr)){ + std::fprintf(stderr, "error: write pose json failed\n"); return 1; } + std::printf("wrote %s\n", p.output_pose.c_str()); + } if (!p.output_pfm.empty()) da::write_pfm(p.output_pfm, depth, H, W); if (!p.output_png.empty()) da::write_depth_png(p.output_png, depth, H, W, p.invert); return 0;