diff --git a/direct/src/distributed/DistributedCartesianGrid.py b/direct/src/distributed/DistributedCartesianGrid.py index ee7ed53d5e..66c2795dcb 100755 --- a/direct/src/distributed/DistributedCartesianGrid.py +++ b/direct/src/distributed/DistributedCartesianGrid.py @@ -33,6 +33,7 @@ class DistributedCartesianGrid(DistributedNode, CartesianGridBase): self.visAvatar = None self.gridVisContext = None # Do we have grid lines visualized? + self._onOffState = False if __debug__: self.haveGridLines = 0 @@ -77,6 +78,11 @@ class DistributedCartesianGrid(DistributedNode, CartesianGridBase): @report(types = ['frameCount', 'avLocation'], dConfigParam = 'want-connector-report') def startProcessVisibility(self, avatar): + if not self._onOffState: + # if we've been told that we're OFF, don't try + # to process visibilty + return + assert not self.cr._noNewInterests if self.cr.noNewInterests(): self.notify.warning( @@ -223,9 +229,11 @@ class DistributedCartesianGrid(DistributedNode, CartesianGridBase): def turnOff(self): + self._onOffState = False self.stopProcessVisibility() def turnOn(self, av = None): + self._onOffState = True if av: self.startProcessVisibility(av) @@ -363,3 +371,9 @@ class DistributedCartesianGrid(DistributedNode, CartesianGridBase): if not self.haveGridLines: self.initializeGridLines() self.updateGrid() + + def setWorldContext(self, worldContext): + pass + + def clearWorldContext(self, event = None): + pass diff --git a/direct/src/distributed/DoInterestManager.py b/direct/src/distributed/DoInterestManager.py index 412ced47b6..69bbf6dcb2 100755 --- a/direct/src/distributed/DoInterestManager.py +++ b/direct/src/distributed/DoInterestManager.py @@ -49,6 +49,8 @@ class InterestState: for event in self.events: messenger.send(event) self.clearEvents() + def setDesc(self, desc): + self.desc = desc def isPendingDelete(self): return self.state == InterestState.StatePendingDel def __repr__(self): @@ -149,6 +151,11 @@ class DoInterestManager(DirectObject.DirectObject): return False return DoInterestManager._interests.has_key(handle.asInt()) + def updateInterestDescription(self, handle, desc): + iState = DoInterestManager._interests.get(handle.asInt()) + if iState: + iState.setDesc(desc) + def addInterest(self, parentId, zoneIdList, description, event=None, auto=False): """ Look into a (set of) zone(s).