mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-26 23:29:38 -05:00
Outside the Design tab an agent had 175 commands, 50 of them in the tool list. There are now 118, named by what they act on (`object_`, `plate_`, `preset_`, `filament_`, `plugin_` and so on), and 115 are listed. Each takes its target and values in the call, acts on the selection when it names no target and says what it acted on; an old name is refused. Printers and system filaments install and uninstall, preferences read and write, plugins enable, reload, uninstall and refresh, and objects reorder, with no dialog to drive. The Speed Dial keeps its 129 tiles under the same ids. Eight defects in the rows these commands share with the menus are fixed. For a person: an object row that cannot run says why instead of "Select an object first.", rows that failed no longer claim success, Duplicate Plate can be undone, and Refresh Plugins picked while a refresh runs now runs after it instead of beside it.
48 lines
3.1 KiB
JSON
48 lines
3.1 KiB
JSON
// object_order with order: three objects on a plate put in the order [2, 0, 1], as dragging them in the object list
|
|
// does. Its reply and object_list give the new order, which is the print order of a plate that prints by object
|
|
// (plate_set_settings print_sequence); the order they have already changes nothing, and one undo restores the order
|
|
// before. Run it with
|
|
// tools/mcp/orca_mcp.py run-replay tools/mcp/tests/objects_order.json --out <dir>
|
|
{
|
|
"orca_replay_version": "0.2.0",
|
|
"name": "objects in a given order",
|
|
"steps": [
|
|
{"tool": "app_wait", "args": {"for": "ready"}},
|
|
{"tool": "project_new", "args": {"discard_changes": true, "preset_changes": "discard"}},
|
|
{"tool": "view_set", "args": {"tab": "prepare"}},
|
|
{"tool": "object_add_primitive", "args": {"shape": "cube", "size": [20, 20, 20]}},
|
|
{"tool": "object_select", "args": {"none": true}},
|
|
{"tool": "object_add_primitive", "args": {"shape": "cube", "size": [20, 20, 20]}},
|
|
{"tool": "object_select", "args": {"none": true}},
|
|
{"tool": "object_add_primitive", "args": {"shape": "cube", "size": [20, 20, 20]}},
|
|
{"tool": "object_select", "args": {"none": true}},
|
|
{"tool": "object_rename", "args": {"object": 0, "name": "first"}},
|
|
{"tool": "object_rename", "args": {"object": 1, "name": "second"}},
|
|
{"tool": "object_rename", "args": {"object": 2, "name": "third"}},
|
|
{"tool": "plate_set_settings", "args": {"plate": 0, "values": {"print_sequence": "by object"}},
|
|
"expect": {"/applied/print_sequence": {"eq": "by object"}}},
|
|
{"tool": "object_list", "expect": {"/total": {"eq": 3}, "/plates/0/objects/0/name": {"eq": "first"},
|
|
"/plates/0/objects/1/name": {"eq": "second"}, "/plates/0/objects/2/name": {"eq": "third"}}},
|
|
|
|
// ---- The order [2, 0, 1]: the reply and the object list name them in it, by their indices afterwards ----
|
|
{"tool": "object_order", "args": {"plate": 0, "order": [2, 0, 1]},
|
|
"expect": {"/order/0/name": {"eq": "third"}, "/order/0/object": {"eq": 0}, "/order/1/name": {"eq": "first"},
|
|
"/order/1/object": {"eq": 1}, "/order/2/name": {"eq": "second"}, "/order/2/object": {"eq": 2},
|
|
"/order/3": {"exists": false}}},
|
|
{"tool": "object_list", "expect": {"/plates/0/objects/0/name": {"eq": "third"}, "/plates/0/objects/1/name": {"eq": "first"},
|
|
"/plates/0/objects/2/name": {"eq": "second"}}},
|
|
{"tool": "plate_list", "expect": {"/items/0/print_sequence": {"eq": "by object"}, "/items/0/objects": {"eq": 3}}},
|
|
|
|
// ---- The order they have changes nothing ----
|
|
{"tool": "object_order", "args": {"order": [0, 1, 2]},
|
|
"expect": {"/order/0/name": {"eq": "third"}, "/order/1/name": {"eq": "first"}, "/order/2/name": {"eq": "second"}}},
|
|
|
|
// ---- One undo step restores the order before ----
|
|
{"tool": "undo", "args": {}},
|
|
{"tool": "object_list", "expect": {"/plates/0/objects/0/name": {"eq": "first"}, "/plates/0/objects/1/name": {"eq": "second"},
|
|
"/plates/0/objects/2/name": {"eq": "third"}}},
|
|
|
|
{"tool": "project_new", "args": {"discard_changes": true}}
|
|
]
|
|
}
|