megaman hates panda3d, but plays fine with pview

Hi, I’m trying to get this animation to play in panda (it works fine in pview), but megaman just sits there statically, mocking me… I attached the model. Thanks for any guidance!

EDIT: I attached an AnimControl to see what it said, and the animcontrol says the actor is playing, but it is still static. Strange…

from direct.showbase.ShowBase import ShowBase
from direct.actor.Actor import Actor

class Megaman():
	def __init__(self):
		loc='graphic/megaman/'
		self.model=Actor(loc+'megaman',{
			'run':loc+'megaman-run'})
		self.model.reparentTo(render)

class testModel(ShowBase):
	def __init__(self):
		ShowBase.__init__(self)
		megaman=Megaman()
		megaman.model.loop('run')


game=testModel()
game.run()

sites.google.com/site/ambyra/all/megaman.zip

from direct.showbase.ShowBase import ShowBase 
from direct.actor.Actor import Actor 

class Megaman(): 
    def __init__(self): 
        loc='./' 
        self.model=Actor(loc+'megaman',{ 
            'run':loc+'megaman-run'}) 
        self.model.reparentTo(render) 

class testModel(ShowBase): 
    def __init__(self): 
        ShowBase.__init__(self) 
        self.megaman=Megaman() 
        self.megaman.model.loop('run') 


game=testModel() 
game.run()

megaman should be self.megaman. You need to hold a reference to the Actor for it to work. Because there was no self. the class object was local and was destroyed as soon as the program exited init. Your Actor was destroyed as well and while you still had the model displayed, it couldn’t be animated.

Awesome! Thanks a lot.