| 648 | } |
| 649 | |
| 650 | std::optional<PySceneNode> PyScene::get_node(const std::string& name) { |
| 651 | // Use the const lookup + const_cast so we don't blow the combined-model |
| 652 | // cache on every read. Actual mutations go through SceneNode property |
| 653 | // setters whose callbacks trigger Scene::notifyMutation, which still |
| 654 | // invalidates the cache — same pattern as get_nodes/get_visible_nodes. |
| 655 | const auto* node = scene_->getNode(name); |
| 656 | if (!node) |
| 657 | return std::nullopt; |
| 658 | return PySceneNode(const_cast<core::SceneNode*>(node), scene_); |
| 659 | } |
| 660 | |
| 661 | std::vector<PySceneNode> PyScene::get_nodes() { |
| 662 | std::vector<PySceneNode> result; |
no test coverage detected