-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple actions in Blender exporter broken #7631
Comments
/ping @bhouston |
/ping @jackcaron |
@daniel-nth But if you can provide me with a simpler Blender file that can reproduce this bug, I would like to look at it and see how I could fix this. |
we've used this model to test blender -> three.js exports, including multiple skeleton animations: that file has multiple actions / animations for the same armature / skeleton -- just mentioning in case if is helpful for you. we exported it succesfully with the old r6* era three.js and the old exporter and got it pretty much figured for current too with the help of nice people in the other issues about the blender exporter. IIRC in that file they are as actions normally but also put to the sequencer timeline as those blends were originally authored for Ogre 3D and for an exporter with which you had put the actions you wanna export to the sequencer timeline one after another .. it also stepped through the anims as part of the export, perhaps to bake modifiers or something? This old exporter: https://code.google.com/p/blender2ogre/ . Interestingly enough the last commit it says "Extended the node animation script to support action user retrieval by NLA." i don't remember exactly how it goes with multiple anims and the blender export now, should check more still too. |
@antont Thanks! With the current exporter I get zero animations in the exported JSON. When reverting 7812b25, I get three. When I link an animation in the action editor, that one action gets exported. @jackcaron Thanks for looking into it! |
I am fairly certain that Blender actions are completely decoupled from armatures they may act apon. I have 'solved' this in a blender script by checking each actions' group names against armature deform bone name. I deem an action as applicable to an armature object if the action does not contain any groups which don't correspond to armature bones. Something like this It's not bullet-proof but it works well enough if your armature bone names are descriptive and not simply 'Bone, Bone.001, ...'. Unfortunately, I don't know enough about the current exporter addon code to know if/how/where this could be applied. |
So just to clarify, the reason we did this was because if you had multiple rigged characters in a scene, like a dog, a person and a robot, the exporter would export every animation for every character. Thus if there was 3 dogs animations, 1 person animation and 2 robot animation, the export would give the dog 6 animations, 3 of which were not his, the person 6 animations, 5 of which were not his, and the robot 6 animations, 4 of which were not his. The current solution though clearly is exporting not enough, but the previous solution exported too many improper duplicates. I guess one can undo our change until we get proper filtering. |
@daniel-nth if you wanted to make a PR with your fix, I think that would be a good idea. Sorry for the trouble. |
@bhouston Thanks! PR is on the way. |
Blender exporter: work around #7631, export all actions
7812b25 broke the export of multiple actions for me. Instead, only the currently active animation of an armature will be exported.
Isn't looping over
data.actions
and then checking for each action if it is identical toarmature.animation_data.action
the same as just exportingarmature.animation_data.action
in the first place?The text was updated successfully, but these errors were encountered: