mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
*** empty log message ***
This commit is contained in:
parent
6209e4e6f3
commit
62d20a5099
@ -28,7 +28,9 @@ class ClientRepository(DirectObject.DirectObject):
|
||||
|
||||
def parseDcFile(self, dcFileName):
|
||||
self.dcFile = DCFile()
|
||||
assert(self.dcFile.read(dcFileName))
|
||||
readResult = self.dcFile.read(dcFileName)
|
||||
if not readResult:
|
||||
self.notify.error("Could not read dcfile: " + str(dcFileName.cStr()))
|
||||
return self.parseDcClasses(self.dcFile)
|
||||
|
||||
def parseDcClasses(self, dcFile):
|
||||
|
@ -26,6 +26,8 @@ class DirectObject:
|
||||
messenger.accept(event, self, method, extraArgs, 0)
|
||||
def ignore(self, event):
|
||||
messenger.ignore(event, self)
|
||||
def ignoreAll(self):
|
||||
messenger.ignoreAll(self)
|
||||
def isAccepting(self, event):
|
||||
return messenger.isAccepting(event, self)
|
||||
def isIgnoring(self, event):
|
||||
|
@ -65,6 +65,26 @@ class Messenger:
|
||||
if (len(acceptorDict) == 0):
|
||||
del self.dict[event]
|
||||
|
||||
|
||||
def ignoreAll(self, object):
|
||||
""" ignoreAll(self, DirectObject)
|
||||
Make this object no longer respond to any events it was accepting
|
||||
"""
|
||||
|
||||
Messenger.notify.debug(`object` + '\n now ignoring all events')
|
||||
|
||||
for event in self.dict.keys():
|
||||
# Find the dictionary of all the objects accepting this event
|
||||
acceptorDict = self.dict[event]
|
||||
# If this object is there, delete it from the dictionary
|
||||
if acceptorDict.has_key(object):
|
||||
del acceptorDict[object]
|
||||
# If this dictionary is now empty, remove the event
|
||||
# entry from the Messenger alltogether
|
||||
if (len(acceptorDict) == 0):
|
||||
del self.dict[event]
|
||||
|
||||
|
||||
def isAccepting(self, event, object):
|
||||
""" isAccepting(self, string, DirectOject)
|
||||
Is this object accepting this event?
|
||||
|
Loading…
x
Reference in New Issue
Block a user