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

Method getLocalModelLibraries

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

Source from the content-addressed store, hash-verified

135}
136
137Py::List ModelManagerPy::getLocalModelLibraries() const
138{
139 auto libraries = getModelManagerPtr()->getLocalLibraries();
140 Py::List list;
141
142 for (auto it = libraries->begin(); it != libraries->end(); it++) {
143 auto lib = *it;
144 Py::Tuple libTuple(3);
145 libTuple.setItem(0, Py::String(lib->getName().toStdString()));
146 libTuple.setItem(1, Py::String(lib->getDirectoryPath().toStdString()));
147 libTuple.setItem(2, Py::Bytes(lib->getIcon().data(), lib->getIcon().size()));
148 libTuple.setItem(3, Py::Boolean(lib->isReadOnly()));
149
150 list.append(libTuple);
151 }
152
153 return list;
154}
155
156Py::Dict ModelManagerPy::getModels() const
157{

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