MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / findNodeInLayer

Function findNodeInLayer

test/Patch.cpp:155–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155inline 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
167inline IPatch* findPatchInLayerWithMaterial(const std::string& layerName, const std::string& shaderName)
168{

Callers 1

TEST_FFunction · 0.85

Calls 5

findFirstNodeFunction · 0.85
getLayerIDMethod · 0.45
getRootMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected