diff --git a/direct/src/distributed/DistributedNode.py b/direct/src/distributed/DistributedNode.py index 14c440bcc4..436be49a70 100644 --- a/direct/src/distributed/DistributedNode.py +++ b/direct/src/distributed/DistributedNode.py @@ -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 diff --git a/direct/src/interval/FunctionInterval.py b/direct/src/interval/FunctionInterval.py index 93be721e83..31f36f3564 100644 --- a/direct/src/interval/FunctionInterval.py +++ b/direct/src/interval/FunctionInterval.py @@ -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