MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / getMaterialByPath

Method getMaterialByPath

src/Mod/Material/App/MaterialLibrary.cpp:348–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348std::shared_ptr<Material> MaterialLibraryLocal::getMaterialByPath(const QString& path) const
349{
350 QString filePath = getRelativePath(path);
351
352 auto search = _materialPathMap->find(filePath);
353 if (search != _materialPathMap->end()) {
354 return search->second;
355 }
356
357 throw MaterialNotFound();
358}
359
360QString MaterialLibraryLocal::getUUIDFromPath(const QString& path) const
361{

Callers 5

testMaterialByPathMethod · 0.45
tearDownMethod · 0.45
testCreateMaterialMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 3

MaterialNotFoundClass · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by 5

testMaterialByPathMethod · 0.36
tearDownMethod · 0.36
testCreateMaterialMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36