// 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 { "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}} ] }