| 153 | } |
| 154 | |
| 155 | inline scene::INodePtr findNodeInLayer(const std::string& layerName) |
| 156 | { |
| 157 | auto worldspawn = GlobalMapModule().findOrInsertWorldspawn(); |
| 158 | auto layerId = GlobalMapModule().getRoot()->getLayerManager().getLayerID(layerName); |
| 159 | |
| 160 | return algorithm::findFirstNode(worldspawn, [&](const auto& node) |
| 161 | { |
| 162 | const auto& layers = node->getLayers(); |
| 163 | return layers.find(layerId) != layers.end(); |
| 164 | }); |
| 165 | } |
| 166 | |
| 167 | inline IPatch* findPatchInLayerWithMaterial(const std::string& layerName, const std::string& shaderName) |
| 168 | { |
no test coverage detected