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.
50 lines
3.3 KiB
JSON
50 lines
3.3 KiB
JSON
// Records what the model 3MF export, project_export with format 3mf and a path, does: with no objects and with
|
|
// one, each case exported once, to a file named for it. After each it reads whether the file is there (an stl
|
|
// export to the same path with a plate the project lacks refuses with "exists" when it is, with the plate when
|
|
// not; for the file written with no objects, once a cube is added), the project's name, file and unsaved state,
|
|
// the recent projects and the undo snapshots taken since the last read (fixtures/ops_undo.py), and last imports
|
|
// each file into an empty project to show what it holds. Every call it records is optional. Run it into a fresh
|
|
// --out directory (an export without overwrite refuses the file of an earlier run):
|
|
// tools/mcp/orca_mcp.py run-replay tools/mcp/tests/ops_export_model_3mf.json --out <new dir>
|
|
{
|
|
"orca_replay_version": "0.2.0",
|
|
"name": "ops export_model_3mf",
|
|
"vars": {"undo": "${replay_dir}/fixtures/ops_undo.py"},
|
|
"steps": [
|
|
{"tool": "app_wait", "args": {"for": "ready"}},
|
|
{"tool": "project_new", "args": {"discard_changes": true, "preset_changes": "discard"}},
|
|
{"tool": "view_set", "args": {"tab": "prepare"}},
|
|
{"tool": "app_wait", "args": {"for": "idle"}},
|
|
{"tool": "script_run", "args": {"filename": "${vars.undo}", "code": "import ops_undo\nresult = ops_undo.taken()"}},
|
|
|
|
// ---- No objects ----
|
|
{"tool": "project_export", "args": {"format": "3mf", "path": "${out_dir}/empty.3mf"}, "optional": true},
|
|
{"tool": "app_state"},
|
|
{"tool": "action_search", "args": {"group": "Recent Projects"}},
|
|
{"tool": "script_run", "args": {"filename": "${vars.undo}", "code": "import ops_undo\nresult = ops_undo.taken()"}},
|
|
|
|
// ---- With an object ----
|
|
{"tool": "object_add_primitive", "args": {"shape": "cube", "size": [20, 20, 20]}},
|
|
{"tool": "app_wait", "args": {"for": "idle"}},
|
|
{"tool": "project_export", "args": {"format": "stl", "path": "${out_dir}/empty.3mf", "plates": 999}, "optional": true},
|
|
{"tool": "script_run", "args": {"filename": "${vars.undo}", "code": "import ops_undo\nresult = ops_undo.taken()"}},
|
|
{"tool": "project_export", "args": {"format": "3mf", "path": "${out_dir}/one_object.3mf"}, "optional": true},
|
|
{"tool": "project_export", "args": {"format": "stl", "path": "${out_dir}/one_object.3mf", "plates": 999}, "optional": true},
|
|
{"tool": "app_state"},
|
|
{"tool": "action_search", "args": {"group": "Recent Projects"}},
|
|
{"tool": "script_run", "args": {"filename": "${vars.undo}", "code": "import ops_undo\nresult = ops_undo.taken()"}},
|
|
|
|
// ---- What the files hold: each imported as geometry into an empty project ----
|
|
{"tool": "project_new", "args": {"discard_changes": true}},
|
|
{"tool": "project_import", "args": {"paths": ["${out_dir}/empty.3mf"]}, "await": false, "save_as": "import_empty", "optional": true},
|
|
{"tool": "app_state"},
|
|
{"tool": "dialog_answer", "args": {"button": "ok"}, "optional": true},
|
|
{"tool": "dialog_answer", "args": {"button": "ok"}, "optional": true},
|
|
{"tool": "app_wait", "args": {"for": "job", "job": "${jobs.import_empty}"}, "optional": true},
|
|
{"tool": "project_import", "args": {"paths": ["${out_dir}/one_object.3mf"]}, "optional": true},
|
|
{"tool": "object_list"},
|
|
|
|
{"tool": "project_new", "args": {"discard_changes": true}}
|
|
]
|
|
}
|