Jump to content

.babylon animations array


mandim
 Share

Recommended Posts

Hello,

I have a .babylon file exported from blender with a rotation animation but when I try to load it (I have tried both addMeshTask() and ImportMesh()) I get a "position animation" with zero values and "scaling animation" with fixed values. This cause me a problem when I call beginAnimation() because I'm not able to scale and position the model in my scene. Moreover when I edit the file and remove the "position animation" and "scaling animation" the engine somehow loads them again (even with cleaning cache).

https://www.dropbox.com/s/789lx8gm3v7zrsc/container_ship_sinking.babylon?dl=0

https://www.dropbox.com/s/5odj9orv9cwcshp/container_ship_sinking.blend?dl=0

Why there are these animations added? Is it something wrong with my export in blender?

Link to comment
Share on other sites

Yes,  all three of these have always been written, before I was working on the exporter.  For Mesh actions, the exporter can tell which frames are actually in the action & only export those frames. If you can live with linear actions, you can pull out all but the first - last frames, or some other removal combination.

The exporter does not directly read the the animation keys, but rather sort of "plays" the animation & pulls the values off the mesh.  This is easier than reading the keys, but does not make it easy to know what type of keys are involved.

I now know how to read (& write) animation keys.  I'll think about looping thru the keys to determine what is actually being used in the future, but not now.  I thought you could delete those out of the file.  @Deltakosh, that is possible, right?

Link to comment
Share on other sites

1 hour ago, JCPalmer said:

Do an sanity check by changing the name of the file, or switching to a browser you have not loaded this on before.

Yes, this is working but how is this explained? I mean why efter cleaning the cache there are still remainings? And why do I need to rename the file each time? Is there any workaround to this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...