mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
cleanup setParent, ensure toons appear in correct place after transition
This commit is contained in:
parent
64bb9dc4c0
commit
72c5e011dd
@ -45,19 +45,18 @@ class DistributedNode(DistributedObject.DistributedObject, NodePath.NodePath):
|
||||
|
||||
### setParent ###
|
||||
|
||||
def b_setParent(self, parentString):
|
||||
self.setParent(parentString)
|
||||
self.d_setParent(parentString)
|
||||
def b_setParent(self, parentToken):
|
||||
self.setParent(parentToken)
|
||||
self.d_setParent(parentToken)
|
||||
return None
|
||||
|
||||
def d_setParent(self, parentString):
|
||||
self.sendUpdate("setParent", [parentString])
|
||||
def d_setParent(self, parentToken):
|
||||
self.sendUpdate("setParent", [parentToken])
|
||||
return None
|
||||
|
||||
def setParent(self, parentString):
|
||||
# print "setting parent of %s to %s" % (self.getName(), parentString)
|
||||
assert(self.cr.name2nodePath.has_key(parentString))
|
||||
parent = self.cr.name2nodePath[parentString]
|
||||
def setParent(self, parentToken):
|
||||
assert(self.cr.token2nodePath.has_key(parentToken))
|
||||
parent = self.cr.token2nodePath[parentToken]
|
||||
self.wrtReparentTo(parent)
|
||||
return None
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
from PandaModules import *
|
||||
from Interval import *
|
||||
from MessengerGlobal import *
|
||||
import types
|
||||
|
||||
#############################################################
|
||||
### ###
|
||||
@ -27,6 +28,7 @@ class FunctionInterval(Interval):
|
||||
if (name == None):
|
||||
name = 'FunctionInterval-%d' % FunctionInterval.functionIntervalNum
|
||||
FunctionInterval.functionIntervalNum += 1
|
||||
assert(isinstance(name, types.StringType))
|
||||
# Record any arguments
|
||||
self.extraArgs = extraArgs
|
||||
# Initialize superclass
|
||||
|
Loading…
x
Reference in New Issue
Block a user