direct.distributed.DoCollectionManager

from direct.distributed.DoCollectionManager import DoCollectionManager

Inheritance diagram

Inheritance diagram of direct.distributed.DoCollectionManager

class DoCollectionManager[source]

Bases: object

__init__()[source]
addDOToTables(do, location=None, ownerView=False)[source]
callbackWithDo(doId, callback)[source]
callbackWithOwnerView(doId, callback)[source]
countObjects(classType)[source]

Counts the number of objects of the given type in the repository (for testing purposes)

deleteDistributedObjects()[source]
deleteObjectLocation(object, parentId, zoneId)[source]
doByDistance()[source]
doFind(str)[source]

Returns list of distributed objects with matching str in value.

doFindAll(str)[source]

Returns list of distributed objects with matching str in value.

doFindAllInstances(cls)[source]
doFindAllMatching(str)[source]

Returns list of distributed objects with matching str in value.

doFindAllOfType(query)[source]

Useful method for searching through the Distributed Object collection for objects of a particular type

dosByDistance()[source]
findAnyOfType(type)[source]
getAllOfType(type)[source]
getDo(doId)[source]
getDoIdList(parentId, zoneId=None, classType=None)[source]
getDoList(parentId, zoneId=None, classType=None)[source]
Parameters:
  • parentId – any distributed object id.

  • zoneId – a uint32, defaults to None (all zones). Try zone 2 if you’re not sure which zone to use (0 is a bad/null zone and 1 has had reserved use in the past as a no messages zone, while 2 has traditionally been a global, uber, misc stuff zone).

  • dclassType – a distributed class type filter, defaults to None (no filter).

If dclassName is None then all objects in the zone are returned; otherwise the list is filtered to only include objects of that type.

getDoTable(ownerView)[source]
getGameDoId()[source]
getObjectsInZone(parentId, zoneId)[source]

returns dict of doId:distObj for a zone. returned dict is safely mutable.

getObjectsOfClassInZone(parentId, zoneId, objClass)[source]

returns dict of doId:object for a zone, containing all objects that inherit from ‘class’. returned dict is safely mutable.

getOwnerView(doId)[source]
getOwnerViewDoIdList(classType)[source]
getOwnerViewDoList(classType)[source]
handleObjectLocation(di)[source]
handleSetLocation(di)[source]
hasOwnerViewDoId(doId)[source]
isInDoTables(doId)[source]
isValidLocationTuple(location)[source]
printObjectCount()[source]
printObjects()[source]
removeDOFromTables(do)[source]
storeObjectLocation(object, parentId, zoneId)[source]
webPrintObjectCount()[source]