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

Method getModelLibraries

src/Mod/Material/App/ModelManagerPyImp.cpp:118–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118Py::List ModelManagerPy::getModelLibraries() const
119{
120 auto libraries = getModelManagerPtr()->getLibraries();
121 Py::List list;
122
123 for (auto it = libraries->begin(); it != libraries->end(); it++) {
124 auto lib = *it;
125 Py::Tuple libTuple(3);
126 libTuple.setItem(0, Py::String(lib->getName().toStdString()));
127 libTuple.setItem(1, Py::String(lib->getDirectoryPath().toStdString()));
128 libTuple.setItem(2, Py::Bytes(lib->getIcon().data(), lib->getIcon().size()));
129 libTuple.setItem(3, Py::Boolean(lib->isReadOnly()));
130
131 list.append(libTuple);
132 }
133
134 return list;
135}
136
137Py::List ModelManagerPy::getLocalModelLibraries() const
138{

Callers

nothing calls this directly

Calls 11

toStdStringMethod · 0.80
getDirectoryPathMethod · 0.80
StringClass · 0.50
beginMethod · 0.45
endMethod · 0.45
getNameMethod · 0.45
dataMethod · 0.45
getIconMethod · 0.45
sizeMethod · 0.45
isReadOnlyMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected