small opts

This commit is contained in:
David Rose 2008-08-08 00:09:21 +00:00
parent 3cd6df210f
commit f86360a303

View File

@ -1093,12 +1093,6 @@ class Actor(DirectObject, NodePath):
It used to be necessary to call this before any animations It used to be necessary to call this before any animations
have been loaded and bound, but that is no longer so. have been loaded and bound, but that is no longer so.
""" """
# Temporary condition for old Pandas.
if not hasattr(PartBundle, 'controlJoint'):
if node == None:
node = self.attachNewNode(jointName)
return node
subpartDef = self.__subpartDict.get(partName, Actor.SubpartDef(partName)) subpartDef = self.__subpartDict.get(partName, Actor.SubpartDef(partName))
trueName = subpartDef.truePartName trueName = subpartDef.truePartName
anyGood = False anyGood = False
@ -1107,7 +1101,7 @@ class Actor(DirectObject, NodePath):
if node == None: if node == None:
node = self.attachNewNode(jointName) node = self.attachNewNode(jointName)
joint = bundle.findChild(jointName) joint = bundle.findChild(jointName)
if joint and joint.getType().isDerivedFrom(MovingPartMatrix.getClassType()): if joint and isinstance(joint, MovingPartMatrix):
node.setMat(joint.getInitialValue()) node.setMat(joint.getInitialValue())
if bundle.controlJoint(jointName, node.node()): if bundle.controlJoint(jointName, node.node()):