diff --git a/direct/src/distributed/DoCollectionManager.py b/direct/src/distributed/DoCollectionManager.py index 5a198c9da9..d422fc0bab 100755 --- a/direct/src/distributed/DoCollectionManager.py +++ b/direct/src/distributed/DoCollectionManager.py @@ -111,6 +111,22 @@ class DoCollectionManager: r = a return r + def getOwnerViewDoList(self, classType): + assert self.hasOwnerView() + l = [] + for obj in self.doId2ownerView.values(): + if isinstance(obj, classType): + l.append(obj) + return l + + def getOwnerViewDoIdList(self, classType): + assert self.hasOwnerView() + l = [] + for doId, obj in self.doId2ownerView.items(): + if isinstance(obj, classType): + l.append(doId) + return l + def countObjects(self, classType): """ Counts the number of objects of the given type in the