one model with several animations doesn't work

hi there,

i have created a model in maya with several animtions which all of them i saved as a different maya file.
i exported the model as an “Actor” and then every animation as “Animation”.
I loaded my model into Panda and depending on the button I press a different animaion should play.
Unfortunatelly it does’t work, the animtion doesn’t play. I don’t know if my code is wrong or my exported files.

Here is my code:

# -*- coding: utf-8 -*-
import direct.directbase.DirectStart
from pandac.PandaModules import CollisionTraverser,CollisionNode
from pandac.PandaModules import CollisionHandlerQueue,CollisionRay
from pandac.PandaModules import Filename
from pandac.PandaModules import PandaNode,NodePath,Camera,TextNode
from pandac.PandaModules import Vec3,Vec4,BitMask32
from direct.gui.OnscreenText import OnscreenText
from import Actor
from direct.task.Task import Task
from direct.showbase.DirectObject import DirectObject
import random, sys, os, math

class World(DirectObject):

    def __init__(self):


        #light1 = render.attachNewNode (PointLight("light1"))

        self.machine = Actor ("models/count_model", {

        #self.accept("escape", sys.exit)#exit on esc
        self.accept("0",, ["0"])
        self.accept("1",, ["1"])
        self.accept("2",, ["2"])
        self.accept("3",, ["3"])
        self.accept("4",, ["4"])
        self.accept("5",, ["5"])
        self.accept("6",, ["6"])
        self.accept("7",, ["7"])
        self.accept("a",, ["8"])
        self.accept("9",, ["9"])


I bet this line:

self.accept("a",, ["8"]) 

is supposed to read:

self.accept("8",, ["8"]) 


yes you are right. i was just trying out sth.
But unfortunately this is not the source of the problem.

Well, the first thing to try is to verify that you can view the animation in pview:

pview models/count_model.egg models/count_00_anim.egg

Try that for a working animation, and also for the broken anim. If it works for the working anim but not for the broken anim, then it must be the egg file, and not your code.

Also, look for error messages on the console when you run pview. Common error messages are things about joint hierarchy not matching up between model and animation.

If it is your egg file, examine the anim egg file and look for tables of numbers. Compare it to a working anim egg file for reference. If you don’t see big tables of numbers, then something about your animation didn’t export correctly.


I figured it out.

the animations were fine but my “Actor” export was wrong. I exported my model as “Actor” without any keyframes in maya.

Now that I exported as “Actor” it with the actual animation it is working.

thanks for your help :smiley: