Skip to content

Commit

Permalink
reverted mistake from PyBrxCvDbObjectManager
Browse files Browse the repository at this point in the history
  • Loading branch information
CEXT-Dan committed Nov 18, 2024
1 parent e29ed3e commit 62a7a22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
20 changes: 2 additions & 18 deletions PyRxCore/PyBrxCvDbObjectManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ void makePyBrxCvDbObjectManagerWrapper()
.def(init<const PyDbObjectId&, AcDb::OpenMode>())
.def(init<const PyDbObjectId&, AcDb::OpenMode, bool>(DS.ARGS({ "id: ObjectId", "mode: PyDb.OpenMode=PyDb.OpenMode.kForRead", "erased: bool=False" })))
.def("elementCount", &PyBrxCvDbObjectManager::elementCount, DS.ARGS())
.def("ids", &PyBrxCvDbObjectManager::ids1)
.def("ids", &PyBrxCvDbObjectManager::ids2, DS.ARGS({ "classType: PyRx.RxObject = None" }))
.def("objectIds", &PyBrxCvDbObjectManager::ids1)//to be consistent to other containters
.def("objectIds", &PyBrxCvDbObjectManager::ids2, DS.ARGS({ "classType: PyRx.RxObject = None" }))
.def("ids", &PyBrxCvDbObjectManager::ids)
.def("names", &PyBrxCvDbObjectManager::names, DS.ARGS())
.def("idAt", &PyBrxCvDbObjectManager::idAt1)
.def("idAt", &PyBrxCvDbObjectManager::idAt2, DS.ARGS({ "val : int|str" }))
Expand Down Expand Up @@ -63,24 +60,11 @@ Adesk::UInt32 PyBrxCvDbObjectManager::elementCount()
return impObj()->elementCount();
}

boost::python::list PyBrxCvDbObjectManager::ids1()
boost::python::list PyBrxCvDbObjectManager::ids()
{
return ObjectIdArrayToPyList(impObj()->ids());
}

boost::python::list PyBrxCvDbObjectManager::ids2(const PyRxClass& filter)
{
PyAutoLockGIL lock;
boost::python::list pyList;
const auto _filter = filter.impObj();
for (const AcDbObjectId& id : impObj()->ids())
{
if (id.objectClass()->isDerivedFrom(_filter));
pyList.append(PyDbObjectId(id));
}
return pyList;
}

boost::python::list PyBrxCvDbObjectManager::names()
{
return AcStringArrayToPyList(impObj()->names());
Expand Down
3 changes: 1 addition & 2 deletions PyRxCore/PyBrxCvDbObjectManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class PyBrxCvDbObjectManager : public PyBrxCvDbObject
virtual ~PyBrxCvDbObjectManager() override = default;

Adesk::UInt32 elementCount();
boost::python::list ids1();
boost::python::list ids2(const PyRxClass &filter);
boost::python::list ids();
boost::python::list names();
PyDbObjectId idAt1(const Adesk::UInt32 index);
PyDbObjectId idAt2(const std::string& szName);
Expand Down

0 comments on commit 62a7a22

Please sign in to comment.