From 1900e24dc185ba2053d7a08b154ee99d4a30fc3b Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 2 Aug 2008 00:46:48 +0000 Subject: [PATCH] don't use isinstance(AnimControl) --- direct/src/actor/Actor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direct/src/actor/Actor.py b/direct/src/actor/Actor.py index 31ed9cd4b3..970212bfcf 100644 --- a/direct/src/actor/Actor.py +++ b/direct/src/actor/Actor.py @@ -831,7 +831,7 @@ class Actor(DirectObject, NodePath): # loop through all anims for named part and find if any are playing for animName, anim in animDict.items(): - if isinstance(anim.animControl, AnimControl) and anim.animControl.isPlaying(): + if anim.animControl and anim.animControl.isPlaying(): return animName # we must have found none, or gotten an error @@ -856,7 +856,7 @@ class Actor(DirectObject, NodePath): # loop through all anims for named part and find if any are playing for animName, anim in animDict.items(): - if isinstance(anim.animControl, AnimControl) and anim.animControl.isPlaying(): + if anim.animControl and anim.animControl.isPlaying(): return anim.animControl.getFrame() # we must have found none, or gotten an error @@ -1572,7 +1572,7 @@ class Actor(DirectObject, NodePath): pass else: # bind the animation first if we need to - if not isinstance(anim.animControl, AnimControl): + if not anim.animControl: self.__bindAnimToPart(animName, partName, lodName) return anim.animControl @@ -1648,7 +1648,7 @@ class Actor(DirectObject, NodePath): # get all playing animations for thisPart, animDict in animDictItems: for anim in animDict.values(): - if isinstance(anim.animControl, AnimControl) and anim.animControl.isPlaying(): + if anim.animControl and anim.animControl.isPlaying(): controls.append(anim.animControl) else: # get the named animation only.