mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-24 19:32:18 +00:00
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:
@@ -162,15 +162,6 @@ TEST_CASE("screenshot.window returns base64 + dims", "[automation][rpc]") {
|
||||
CHECK_FALSE(resp.at("result").at("png_base64").get<std::string>().empty());
|
||||
}
|
||||
|
||||
TEST_CASE("screenshot.viewport3d returns base64 + dims", "[automation][rpc]") {
|
||||
MockUiBackend mock;
|
||||
JsonRpcDispatcher d(mock);
|
||||
const json resp = d.dispatch({{"jsonrpc","2.0"},{"id",3},{"method","screenshot.viewport3d"},
|
||||
{"params",{{"width",256},{"height",256}}}});
|
||||
CHECK(mock.screenshot_viewport_count == 1);
|
||||
CHECK(resp.at("result").at("png_base64").is_string());
|
||||
}
|
||||
|
||||
TEST_CASE("sync.wait_for succeeds once the condition holds", "[automation][rpc]") {
|
||||
MockUiBackend mock;
|
||||
// First 2 polls: btn disabled. 3rd poll: enabled.
|
||||
|
||||
Reference in New Issue
Block a user