mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
Useful function to search through Distributed Object collection by class type
This commit is contained in:
parent
ba606bd283
commit
a36f345131
@ -79,7 +79,17 @@ class DoCollectionManager:
|
||||
if re.search(str,`value`):
|
||||
matches.append(value)
|
||||
return matches
|
||||
|
||||
|
||||
def doFindAllOfType(self, query):
|
||||
"""
|
||||
Useful method for searching through the Distributed Object collection
|
||||
for objects of a particular type
|
||||
"""
|
||||
matches = []
|
||||
for value in self.doId2do.values():
|
||||
if query in str(value.__class__):
|
||||
matches.append(value)
|
||||
return matches, len(matches)
|
||||
|
||||
def _getDistanceFromLA(self, do):
|
||||
if hasattr(do, 'getPos'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user