mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
moved some code to base class, asserted some debugs
This commit is contained in:
parent
4fc2782a32
commit
593c0836b6
@ -131,9 +131,6 @@ class DistributedObject(DistributedObjectBase, EnforcesCalldowns):
|
|||||||
_getAutoInterests = None
|
_getAutoInterests = None
|
||||||
return list(autoInterests)
|
return list(autoInterests)
|
||||||
|
|
||||||
def hasParentingRules(self):
|
|
||||||
return self.dclass.getFieldByName('setParentingRules') != None
|
|
||||||
|
|
||||||
def setNeverDisable(self, bool):
|
def setNeverDisable(self, bool):
|
||||||
assert bool == 1 or bool == 0
|
assert bool == 1 or bool == 0
|
||||||
self.neverDisable = bool
|
self.neverDisable = bool
|
||||||
|
@ -43,7 +43,7 @@ class DistributedObjectBase(DirectObject):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def handleChildArrive(self, childObj, zoneId):
|
def handleChildArrive(self, childObj, zoneId):
|
||||||
self.notify.debugCall()
|
assert self.notify.debugCall()
|
||||||
# A new child has just setLocation beneath us. Give us a
|
# A new child has just setLocation beneath us. Give us a
|
||||||
# chance to run code when a new child sets location to us. For
|
# chance to run code when a new child sets location to us. For
|
||||||
# example, we may want to scene graph reparent the child to
|
# example, we may want to scene graph reparent the child to
|
||||||
@ -55,7 +55,7 @@ class DistributedObjectBase(DirectObject):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def handleChildLeave(self, childObj, zoneId):
|
def handleChildLeave(self, childObj, zoneId):
|
||||||
self.notify.debugCall()
|
assert self.notify.debugCall()
|
||||||
# A child is about to setLocation away from us. Give us a
|
# A child is about to setLocation away from us. Give us a
|
||||||
# chance to run code just before a child sets location away from us.
|
# chance to run code just before a child sets location away from us.
|
||||||
## zone=self.children[zoneId]
|
## zone=self.children[zoneId]
|
||||||
@ -66,7 +66,15 @@ class DistributedObjectBase(DirectObject):
|
|||||||
# Inheritors should override
|
# Inheritors should override
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def handleQueryObjectChildrenLocalDone(self, context):
|
||||||
|
assert self.notify.debugCall()
|
||||||
|
# Inheritors should override
|
||||||
|
pass
|
||||||
|
|
||||||
def getParentObj(self):
|
def getParentObj(self):
|
||||||
if self.parentId is None:
|
if self.parentId is None:
|
||||||
return None
|
return None
|
||||||
return self.cr.doId2do.get(self.parentId)
|
return self.cr.doId2do.get(self.parentId)
|
||||||
|
|
||||||
|
def hasParentingRules(self):
|
||||||
|
return self.dclass.getFieldByName('setParentingRules') != None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user