direct.distributed.ParentMgr

from direct.distributed.ParentMgr import ParentMgr

ParentMgr module: contains the ParentMgr class

Inheritance diagram

Inheritance diagram of direct.distributed.ParentMgr

class ParentMgr[source]

Bases: object

ParentMgr holds a table of nodes that avatars may be parented to in a distributed manner. All clients within a particular zone maintain identical tables of these nodes, and the nodes are referenced by ‘tokens’ which the clients can pass to each other to communicate distributed reparenting information.

The functionality of ParentMgr used to be implemented with a simple token->node dictionary. As distributed ‘parent’ objects were manifested, they would add themselves to the dictionary. Problems occured when distributed avatars were manifested before the objects to which they were parented to.

Since the order of object manifestation depends on the order of the classes in the DC file, we could maintain an ordering of DC definitions that ensures that the necessary objects are manifested before avatars. However, it’s easy enough to keep a list of pending reparents and thus support the general case without requiring any strict ordering in the DC.

__init__(self)[source]
destroy(self)[source]
notify = <direct.directnotify.Notifier.Notifier object>
privRemoveReparentRequest(self, child)[source]

this internal function removes any currently-pending reparent request for the given child nodepath

registerParent(self, token, parent)[source]
requestReparent(self, child, parentToken)[source]
unregisterParent(self, token)[source]