fix update() some more

This commit is contained in:
David Rose 2007-01-12 18:22:00 +00:00
parent d7ec81bcea
commit 668610700d

View File

@ -649,8 +649,7 @@ class Actor(DirectObject, NodePath):
if center != None:
self.__LODNode.node().setCenter(center)
def update(self, lod=0, animName=None, partName='modelRoot',
lodName=None, force=False):
def update(self, lod=0, partName=None, lodName=None, force=False):
""" Updates all of the Actor's joints in the indicated LOD.
The LOD may be specified by name, or by number, where 0 is the
highest level of detail, 1 is the next highest, and so on.
@ -667,7 +666,15 @@ class Actor(DirectObject, NodePath):
lodNames = [lodName]
anyChanged = False
if (lod < len(lodNames)):
if lod < len(lodNames):
lodName = lodNames[lod]
if partName == None:
partBundleDict = self.__partBundleDict[lodName]
partNames = partBundleDict.keys()
else:
partNames = [partName]
for partName in partNames:
partBundle = self.getPartBundle(partName, lodNames[lod])
if force:
if partBundle.forceUpdate():