i exported a crate to .egg from 3dmax with both model and animation in one single file.
in pview i can see everything is fine and neat, if i press ‘a’ i can see an animation called ‘character’ is playing.
looking at the egg i can see ‘character’ is a ‘group’ tag.
wich is the way to get/refer/play this animation that is already merged with the model (?)
I know how to load and play a separate animation, but no how to get the merged ones.
thanks for any reply!
c
it looks that even if i export model and anim separate something is wrong.
the chest doesn’t play the animation at all with the classic code:
node= Actor.Actor("data/models/chest/chest_anim.egg")
node.reparentTo(parent)
node.loadAnims({'anim':"data/models/chest/chest_anim.egg"})
node.setPlayRate(3.0,'anim')
node.play('anim')
here is the zip file with both model and animation files:
http://www.handeozerden.com/snaptothegrid/panda/minirogue/chest.zip
and this is the animation file:
<CoordinateSystem> { Z-Up }
<Table> {
<Bundle> character {
<Table> "<skeleton>" {
<Table> Bone01 {
<Xfm$Anim_S$> xform {
<Scalar> fps { 30 }
<Char*> order { srpht }
<S$Anim> p { <V> { -44.5692 } }
<S$Anim> r { <V> { -90 } }
<S$Anim> y { <V> { -4.10478 } }
<S$Anim> z { <V> { 1.87421 } }
}
<Table> Bone02 {
<Xfm$Anim_S$> xform {
<Scalar> fps { 30 }
<Char*> order { srpht }
<S$Anim> h {
<V> {
-133.259 -132.462 -130.179 -126.577 -121.819 -116.072
-109.499 -102.267 -94.5393 -86.4818 -78.2593 -70.0368
-61.9793 -54.2518 -47.0193 -40.4468 -34.6993 -29.9418
-26.3393 -24.0568 -23.2593 -23.2593 -23.2593 -23.2593
-23.2593 -23.2593 -23.2593 -23.2593 -23.2593 -23.2593
-23.2593 -23.2593 -23.2593 -23.2593 -23.2593 -23.2593
-23.2593 -23.2593 -23.2593 -23.2593 -23.2593 -24.0568
-26.3393 -29.9418 -34.6993 -40.4468 -47.0193 -54.2518
-61.9793 -70.0368 -78.2593 -86.4818 -94.5393 -102.267
-109.499 -116.072 -121.819 -126.577 -130.179 -132.462
-133.259 -133.259 -133.259 -133.259 -133.259 -133.259
-133.259 -133.259 -133.259 -133.259 -133.259 -133.259
-133.259 -133.259 -133.259 -133.259 -133.259 -133.259
-133.259 -133.259 -133.259 -133.259 -133.259 -133.259
-133.259 -133.259 -133.259 -133.259 -133.259 -133.259
-133.259
}
}
<S$Anim> x { <V> { 50.6996 } }
}
<Table> Bone03 {
<Xfm$Anim_S$> xform {
<Scalar> fps { 30 }
<Char*> order { srpht }
<S$Anim> x { <V> { 61.8479 } }
}
}
}
}
}
}
}
if anyone could have a quick look at it and tell me what’s wrong on this export would be so appreciated
tks.
Ausir
October 15, 2009, 3:50pm
3
I don’t see any problem, maybe you’re playing its animation too early to see.
Try out this snippet:
import direct.directbase.DirectStart
from pandac.PandaModules import *
from direct.actor.Actor import Actor
chest=Actor("chest.egg", {"open":"chest_anim.egg"})
chest.reparentTo(render)
chest.setScale(.3)
chest.setPos(0, 80, -15)
base.accept("o", chest.play, ["open"])
run()
It runs without fault to me.
wow, true, it works perfect with the snippet!
i must have had wrong some little something on my app code,
thanks a lot for your reply, now i feel more easy cause i see the exporter is working fine.
yes, i was applying a flatten to the parent node of the animation, that’s why it wasn’t working