diff --git a/direct/src/actor/Actor.py b/direct/src/actor/Actor.py index df9fcb34ac..a7dcfb5116 100644 --- a/direct/src/actor/Actor.py +++ b/direct/src/actor/Actor.py @@ -631,17 +631,17 @@ class Actor(DirectObject, NodePath): Actor.notify.warning("no lod named: %s" % (lodName)) return + # remove the part + if (partBundleDict.has_key(partName)): + partBundleDict[partName].removeNode() + del(partBundleDict[partName]) + # find the corresponding anim control dict animControlDict = self.__animControlDict.get(lodName) if not animControlDict: Actor.notify.warning("no lod named: %s" % (lodName)) return - # remove the part - if (partBundleDict.has_key(partName)): - partBundleDict[partName].removeNode() - del(partBundleDict[partName]) - # remove the animations if (animControlDict.has_key(partName)): del(animControlDict[partName])