collada-exporter icon indicating copy to clipboard operation
collada-exporter copied to clipboard

Add support for animations using f-curves

Open chuckhacker opened this issue 8 years ago • 9 comments

Seems like this only supports one animation

chuckhacker avatar Jun 18 '17 01:06 chuckhacker

No. Use the Dope Sheet editor of Blender to create your multiple animations per model. After that you can export all animations which you have.

set-killer avatar Jun 18 '17 20:06 set-killer

No, have to use actions instead of f-curves for any animations to get exported in the XML. Dope Sheet is just UI, not sure how it is relevant.

chuckhacker avatar Jun 19 '17 04:06 chuckhacker

Dope sheet supports action animations... Almost the same as NLA editor...

set-killer avatar Jun 19 '17 09:06 set-killer

Basically when you open the dope sheet editor, then from the 'dope sheet' drop down select 'Action Editor'. Then to the right of the 'Action editor' a 'New' button will appear. Clicking it will create new action animation where you can set the name of the animation like 'walking', 'jumping'... After you may create more animations with the '+' button.

untitled

set-killer avatar Jun 19 '17 14:06 set-killer

Right, and the issue is that if we use f-curves, nothing gets exported. Sorry for not being clear enough in my original post.

chuckhacker avatar Jun 19 '17 17:06 chuckhacker

Maybe I am wrong ... but it seems to me that nothing is exported from the blender action editor if no bones are used for the animation.

For simple scale/move/rotation there is only (ONE) default animation exported

From the exporter code:

if (self.config["use_anim_action_all"] and len(self.skeletons)):

https://github.com/godotengine/collada-exporter/blob/836241ad09a96b4e12226c4f1592d25d997ad118/io_scene_dae/export_dae.py#L1769

then if len(self.skeletons) is zero... no animation clips are exported/created

But multiple animations without necessarily using bones should be also possible to export... ?

markoi avatar Feb 20 '18 14:02 markoi

Godot supports animation for non-bones so it should.

It's just like you say, the code looks as if it has only been designed to export all actions for skeletons.

I'm going to see if there is an easy fix, but it looks like that part of the code relies on there being bones quite heavily.

spongeboburu avatar Oct 07 '18 10:10 spongeboburu

+1 if this can happen, hope it's not too hard to export multiple actions that are not skeletally based.

minifigmaster125 avatar Nov 05 '18 02:11 minifigmaster125

Is there any solution to this problem? I was able to export all the animations once, but I do not even know what I did, because now only one animation (usually the one selected in the NLA) can be imported

rvenson avatar Mar 18 '19 14:03 rvenson