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

Method getLibraryIcon

src/Mod/Material/App/MaterialPyImp.cpp:91–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91Py::Object MaterialPy::getLibraryIcon() const
92{
93 auto library = getMaterialPtr()->getLibrary();
94 if (library->isLocal()) {
95 auto materialLibrary =
96 std::dynamic_pointer_cast<Materials::MaterialLibraryLocal>(library);
97 if (!materialLibrary) {
98 return Py::Bytes();
99 }
100 auto icon = materialLibrary->getIcon();
101 if (icon.isNull()) {
102 return Py::Bytes();
103 }
104 return Py::Bytes(icon.data(), icon.size());
105 }
106 return Py::Bytes();
107}
108
109Py::String MaterialPy::getName() const
110{

Callers

nothing calls this directly

Calls 6

isLocalMethod · 0.80
getLibraryMethod · 0.45
getIconMethod · 0.45
isNullMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected