Hi everyone! I’m new to this and just recently started playing around with this.
Ok so I created a scene and imported my model which I made in maya which is just a box with a texture.
What I am trying to do is figure out how to animate the object.
Here is what I have tried:
I made one of the vertices in the box go up and down a few times using keyframes. The animation works in maya. Ok all good here. Then I export it as a .mb. Next I tried the command “maya2egg2008 -a chan -o mybox.egg mybox.mb” to make an egg file with just the animation. I then attached it to my object… here is my code
import direct.directbase.DirectStart
from pandac.PandaModules import *
from direct.task import Task
from direct.actor import Actor
from direct.interval.IntervalGlobal import *
import math
#Load the first environment model
myImport = Actor.Actor("models/yura/box", {"morphbox" : "models/yura/boxanim2"})
myImport.reparentTo(render)
myImport.setScale(2, 2, 2)
myImport.setPos(-8, 42, 0)
#myImport.setColor(0.5, 0.3, 0.1)
myImport.loop("morphbox")
print myImport.getActorInfo()
#Run the tutorial
run()
No luck… I run it and the box loads but the animation itself is nowere to be found. Its just a still box.
I also tried the convert command line “maya2egg2008 -a both -o mybox.egg mybox.mb” to get an egg file with a combination of the model and animation
here was my code for that:
import direct.directbase.DirectStart
from pandac.PandaModules import *
from direct.task import Task
from direct.actor import Actor
from direct.interval.IntervalGlobal import *
import math
#Load the first environment model
myImport = Actor.Actor("models/yura/boxwanim")
myImport.reparentTo(render)
myImport.setScale(2, 2, 2)
myImport.setPos(-8, 42, 0)
#myImport.setColor(0.5, 0.3, 0.1)
myImport.loop("morphbox")
print myImport.getActorInfo()
#Run the tutorial
run()
Still no luck with that either!
Please help! I really want to get past this so I can move on! Thanks