Mod: Use new addObject<T>(...) using regex

This commit is contained in:
Benjamin Nauck
2025-01-19 01:49:04 +01:00
parent 0712b481e9
commit a1c5767643
57 changed files with 125 additions and 159 deletions

View File

@@ -414,8 +414,7 @@ private:
pcDoc = App::GetApplication().newDocument();
}
PointsPy* pPoints = static_cast<PointsPy*>(pcObj);
Points::Feature* pcFeature =
static_cast<Points::Feature*>(pcDoc->addObject("Points::Feature", name));
Points::Feature* pcFeature = pcDoc->addObject<Points::Feature>(name);
// copy the data
pcFeature->Points.setValue(*(pPoints->getPointKernelPtr()));
return Py::asObject(pcFeature->getPyObject());