refactor(automation): drop screenshot.viewport3d, keep only screenshot.window

The on-screen window capture is composited from the desktop framebuffer, so it
already includes the GL 3D viewport as currently shown (model in the editor,
toolpaths in Preview). The offscreen render_thumbnail path only ever drew the
model GLVolumeCollection — never the gcode toolpaths — and produced a blank image
after slicing because the app switches to the Preview panel. Rather than maintain a
second, more limited capture method, remove it entirely.

Removes the JSON-RPC method, IUiBackend/WxUiBackend implementation, dispatcher
route + capability entry, the now-dead opt_int/thumbnail_to_wximage helpers and
ThumbnailData include, the mock override + unit test, and the Python
screenshot_3d client method. Docs updated accordingly.
This commit is contained in:
SoftFever
2026-06-03 18:05:23 +08:00
parent 952696fd1f
commit 892b33bac5
10 changed files with 25 additions and 129 deletions

View File

@@ -18,7 +18,6 @@ public:
std::vector<std::string> typed_text;
std::vector<std::vector<KeyChord>> sent_keys;
int screenshot_window_count = 0;
int screenshot_viewport_count = 0;
// Canned outputs (set by tests).
UiNode tree; // default tree for dump_tree
@@ -50,10 +49,6 @@ public:
PngImage screenshot_window(const UiNode*) override {
++screenshot_window_count; return canned_png;
}
PngImage screenshot_viewport3d(std::optional<int>, std::optional<int>,
std::optional<int>) override {
++screenshot_viewport_count; return canned_png;
}
};
}}} // namespace