| 496 | } |
| 497 | |
| 498 | std::expected<void, std::string> selectNode(SceneManager& scene_manager, |
| 499 | const std::string& name, |
| 500 | const std::string_view mode) { |
| 501 | if (!scene_manager.getScene().getNode(name)) |
| 502 | return std::unexpected("Node not found: " + name); |
| 503 | |
| 504 | if (mode == "add") { |
| 505 | scene_manager.addToSelection(name); |
| 506 | return {}; |
| 507 | } |
| 508 | if (mode != "replace") |
| 509 | return std::unexpected("Unsupported node selection mode: " + std::string(mode)); |
| 510 | |
| 511 | scene_manager.selectNode(name); |
| 512 | return {}; |
| 513 | } |
| 514 | |
| 515 | std::expected<void, std::string> selectNodes(SceneManager& scene_manager, |
| 516 | const std::vector<std::string>& names, |
no test coverage detected