I'm still having a hard time understanding the animation system in
this engine. When I get the 'default' skinAnim in the line that
everyone seems to use:

skinAnim = target.animationLibrary.getAnimation("default").animation
as SkinAnimation

I'm sort of confused about the animationLibrary as well. I'm testing
with the cat demo found here: 
http://sleepydesign.blogspot.com/2008/07/away3d-collada-animation.html
and in the dae file for the cat, there are many animations
specifically named. None of the specific animations (strings) ever get
added to the animationLibrary though! I only see that "default" gets
added to the library and that's it. Am I missing something here? Is it
my job to specify start and end times and always play "default" for
everything? Thanks for any help!



On Nov 25, 1:38 pm, martin <shadowin...@hotmail.com> wrote:
> ok you write works... but where i get the name of my animation if i
> have more then one, with one i can get the default-name way.
> debug:
>                         trace(" ==> " + 
> Array(model.animationLibrary._channels).length);
>                         trace(" ==> " + skinAnimation._channels.length);
>                         trace(" ==> " + skinAnimation._channels[0]);
>                         trace(" ==> " + skinAnimation._channels[1]);
>                         trace(" ==> " + skinAnimation._channels[2]);
>                         trace(" ==> " + skinAnimation._channels[3]);
> trace:
>  ==> 1
>  ==> 5
>  ==> [object Channel]
>  ==> [object Channel]
>  ==> [object Channel]
>  ==> [object Channel]
> yes, i want to use more then one animation in one .dae.
> thx
>
> On Nov 25, 4:56 am, Revalis <reva...@gmail.com> wrote:
>
> > Oh. Also note that the _channels Array is a private var. If you want
> > to be able to access it from outside the SkinAnimation Class, you'll
> > need to edit the SkinAnimation.as and change the definition from
> > private var to public var.
>
> > Alternatively, if you don't feel comfortable doing that, you can trace
> > for .start, .loop, .length on your skinAnimation to see if a value is
> > returned. But those are references to the animation exported as a
> > whole, not individual clips.
>
> > > On Nov 24, 10:54 pm, Revalis <reva...@gmail.com> wrote:
> > > _channels is an Array that is stored in the SkinAnimation Class, not
> > > the AnimationLibrary. Change your
>
> > >  trace(" ==> " + Array(model.animationLibrary._channels).length);
>
> > > to
>
> > >  trace(" ==> " + skinAnimation._channels.length);
>
> > > Also, in trying to understand the larger scope of what you're
> > > building, are you trying to include multiple animation sequences in a
> > > single C4D file that you are exporting out as DAE?
>
> > > > On Nov 24, 5:58 pm, martin <shadowin...@hotmail.com> wrote:
> > > > mmh so i try this:
> > > >                         //debug
> > > >                         trace(" ! Model : " + model);
> > > >                         trace(" ==> " + model.animationLibrary);
> > > >                         trace(" ==> " + 
> > > > model.animationLibrary.getAnimation("default"));
> > > >                         trace(" ! Skin Animation : " + skinAnimation);
> > > >                         trace(" ! Skin Animation My : " + 
> > > > model.animationLibrary);
>
> > > >                         if (model.animationLibrary == undefined)
> > > >                                 trace("=::=> undefined");
>
> > > >                         trace(" ==> " + 
> > > > model.animationLibrary._channels);
> > > >                         trace(" ==> " + 
> > > > Array(model.animationLibrary._channels).length);
>
> > > >                         var paramName:String;
> > > >                         for (paramName in 
> > > > Array(model.animationLibrary._channels)) {
> > > >                                 trace("sch:"+paramName);
> > > >                                 
> > > > trace("sch:"+Array(model.animationLibrary._channels)[paramName]);
> > > >                         }
> > > > and get this log:
>
> > > >  ! Model : $: x:0 y:0 z:0
> > > >  ==> [object AnimationLibrary]
> > > >  ==> [object AnimationData]
> > > >  ! Skin Animation : [object SkinAnimation]
> > > >  ! Skin Animation My : [object AnimationLibrary]
> > > >  ==> undefined
> > > >  ==> 1
> > > > sch:0
> > > > sch:undefined
>
> > > > when i try the default method i see my animation in the engine, but i
> > > > want to create more then one and i want rename this hole for a better
> > > > structure...
> > > > martin
>
> > > > On Nov 23, 4:09 pm, Revalis <reva...@gmail.com> wrote:
>
> > > > > Hey martin, the animationLibrary is a little tricky. It itself is not
> > > > > an Array, but it carries an Array of the animation Channels in it.
>
> > > > > Try tracing: trace(" ==> " + model.animationLibrary._channels);   //
> > > > > _channels being an Array, you should be able to get .length, or [0],
> > > > > [1], etc...
>
> > > > > Do you see animation when you .update() your skinAnimation ?
>
> > > > > On Nov 19, 5:45 pm, martin <shadowin...@hotmail.com> wrote:
>
> > > > > > hello everyone,
> > > > > > i have a problem to read out the names from my animation in the
> > > > > > animationLibrary.
> > > > > > i create a animation in maxon cinema 4d and export a collada file 
> > > > > > with
> > > > > > an animation sequence...
> > > > > > how can i access to this animation, because maxon creates other 
> > > > > > names
> > > > > > in the collada file as in the cinema editor scene... so i must read
> > > > > > out the names like this...
> > > > > > skinAnimation = (model.animationLibrary["default"] as
> > > > > > AnimationData).animation as SkinAnimation;
> > > > > > but without naming my animation i cannot ceate my animation in away 
> > > > > > ;-
> > > > > > (
> > > > > > how it works, when i try this
> > > > > > trace(" ==> " + model.animationLibrary); i get an trace like this 
> > > > > > ==>
> > > > > > [object AnimationLibrary]
> > > > > > trace(" ==> " + model.animationLibrary[0]); i get a undefined trace
> > > > > > any solutions!?
> > > > > > in my example i use the cat from katopz with bones, import the dae 
> > > > > > in
> > > > > > maxon, make my animation an export it to my collada...
> > > > > > greets
> > > > > > martin- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -

Reply via email to