[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-12-11 Thread Revalis
I have multiple animations working from a single DAE.

I have an example of it working on my blog here: http://revalis.blogspot.com/
And I posted the .as for the Class here on Googlecode some weeks ago.
Posted explaining how to use it here:
http://groups.google.com/group/away3d-dev/browse_thread/thread/b9bfab1467641610?hl=en

Try that out and see if it works for you.



> On Dec 11, 8:26 am, Peter Kapelyan  wrote:
> I don't think multiple animations work in DAE (yet), however you may be able
> to seperate the whole animation timeline with percentages and animate just
> those bits, according to time. I might be wrong there too, but it could be a
> workaround.
>
> -Pete
>
> On Fri, Dec 11, 2009 at 8:39 AM, mkupper  wrote:
> > So has *anyone* gotten multiple animations working with a exported DAE
> > file? Should I be using MD2 instead? It's really hard to find out what
> > works and what doesn't, and the samples seems to scattered all over
> > the place. I have yet to find any examples that load in multiple
> > separate animations in a single dae file and play them correctly. If
> > anyone has an example of this, it would really help me out. I just
> > want to know if it's even possible. We've tried exporting some dae
> > files with multiple animations and the only animation that ever gets
> > added to the animationLibrary is "default". And that doesn't even seem
> > to play correctly. Thanks for any help!
>
> --
> ___
>
> Actionscript 3.0 Flash 3D Graphics Engine
>
> HTTP://AWAY3D.COM


Re: [away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-12-11 Thread Peter Kapelyan
I don't think multiple animations work in DAE (yet), however you may be able
to seperate the whole animation timeline with percentages and animate just
those bits, according to time. I might be wrong there too, but it could be a
workaround.

-Pete

On Fri, Dec 11, 2009 at 8:39 AM, mkupper  wrote:

> So has *anyone* gotten multiple animations working with a exported DAE
> file? Should I be using MD2 instead? It's really hard to find out what
> works and what doesn't, and the samples seems to scattered all over
> the place. I have yet to find any examples that load in multiple
> separate animations in a single dae file and play them correctly. If
> anyone has an example of this, it would really help me out. I just
> want to know if it's even possible. We've tried exporting some dae
> files with multiple animations and the only animation that ever gets
> added to the animationLibrary is "default". And that doesn't even seem
> to play correctly. Thanks for any help!
>



-- 
___

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM


[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-12-11 Thread mkupper
So has *anyone* gotten multiple animations working with a exported DAE
file? Should I be using MD2 instead? It's really hard to find out what
works and what doesn't, and the samples seems to scattered all over
the place. I have yet to find any examples that load in multiple
separate animations in a single dae file and play them correctly. If
anyone has an example of this, it would really help me out. I just
want to know if it's even possible. We've tried exporting some dae
files with multiple animations and the only animation that ever gets
added to the animationLibrary is "default". And that doesn't even seem
to play correctly. Thanks for any help!


[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-12-10 Thread mkupper
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  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  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  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  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  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  wrote:
>
> > > > > > hello everyone,
> > > > > > i have a problem to read out the names f

[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-12-10 Thread mkupper
I'd like to know the answer to this as well. I think most people are
going to want to export multiple animations and would like to get the
animation name by the index. GetAnimName(index). I'm curious as to why
there aren't some simple tools/samples out there yet that will load an
animated model and populate a comboBox with the animation list to view
each animation. Should be simple to write a samples like that (for
people who are more familiar with Away3D).

On Nov 25, 1:38 pm, martin  wrote:
> ok you write works... but where i get the name of myanimationif 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 oneanimationin one .dae.
> thx
>
> On Nov 25, 4:56 am, Revalis  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 theanimationexported as a
> > whole, not individual clips.
>
> > > On Nov 24, 10:54 pm, Revalis  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 multipleanimationsequences in a
> > > single C4D file that you are exporting out as DAE?
>
> > > > On Nov 24, 5:58 pm, martin  wrote:
> > > > mmh so i try this:
> > > >                         //debug
> > > >                         trace(" ! Model : " + model);
> > > >                         trace(" ==> " + model.animationLibrary);
> > > >                         trace(" ==> " + 
> > > > model.animationLibrary.getAnimation("default"));
> > > >                         trace(" ! SkinAnimation: " + skinAnimation);
> > > >                         trace(" ! SkinAnimationMy : " + 
> > > > 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]
> > > >  ! SkinAnimation: [object SkinAnimation]
> > > >  ! SkinAnimationMy : [object AnimationLibrary]
> > > >  ==> undefined
> > > >  ==> 1
> > > > sch:0
> > > > sch:undefined
>
> > > > when i try the default method i see myanimationin 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  wrote:
>
> > > > > Hey martin, the animationLibrary is a little tricky. It itself is not
> > > > > an Array, but it carries an Array of theanimationChannels 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 seeanimationwhen you .update() your skinAnimation ?
>
> > > > > On Nov 19, 5:45 pm, martin  wrote:
>
> > > > > > hello everyone,
> > > > > > i have a problem to read out the names from myanimationin the
> > > > > > animationLibrary.
> > > > > > i create aanimationin maxon cinema 4d and export acolladafile with
> > > > > > ananimationsequence...
> > > > > > how can i access to thisanimation, because maxon creates other names
> > > > > > in thecolladafile as in the cinema editor scene... so i must read
> > > > > > out the n

[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-11-25 Thread martin
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  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  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  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  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  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
> > >

[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-11-24 Thread Revalis
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  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  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  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  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 -


[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-11-24 Thread Revalis
_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  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  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  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 -


[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-11-24 Thread martin
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  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  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


[away3d] Re: problem with animationLibrary to get the animationLibraryNames

2009-11-23 Thread Revalis
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  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