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

Method renameObjectIdentifiers

src/App/Document.cpp:2831–2848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2829 */
2830
2831void Document::renameObjectIdentifiers(
2832 const std::map<ObjectIdentifier, ObjectIdentifier>& paths,
2833 const std::function<bool(const DocumentObject*)>& selector) // NOLINT
2834{
2835 std::map<ObjectIdentifier, ObjectIdentifier> extendedPaths;
2836
2837 auto it = paths.begin();
2838 while (it != paths.end()) {
2839 extendedPaths[it->first.canonicalPath()] = it->second.canonicalPath();
2840 ++it;
2841 }
2842
2843 for (const auto object : d->objectArray) {
2844 if (selector(object)) {
2845 object->renameObjectIdentifiers(extendedPaths);
2846 }
2847 }
2848}
2849
2850int Document::recompute(const std::vector<DocumentObject*>& objs,
2851 bool force,

Callers 1

createBindingVarSetMethod · 0.45

Calls 3

beginMethod · 0.45
endMethod · 0.45
canonicalPathMethod · 0.45

Tested by

no test coverage detected