Actions FBX export ALL should not discard any action not fully compatible
Right now when blender exports actions (bake All actions) to fbx, it prunes Actions that have missing channels/bones in the exported armature.
In my opinion this creates a lot of confusion and it is not necessary.
Blender is infact able to include default actions with missing channels / bones, thus this is a choise and not a tecnical limitation.
I.E. Two human like armatures with a Run action - first has a pinky second doesn't. The second doesn't receive at all the action just because of the missing pinky (but blender includes it if it is selected as default action).
16 Comments
how are you checking the result? Importing back in two characters?
Checked before in Unity then reimporting in Blender.
I also removed the i.e. pinky channel from the anim and blender pruning for compatibility allowed the export of all the actions for both armatures.
reimporting into Blender has known limitations, in that if you have more than one armature it will not know where to load the action. You will have to manually assign the right action to the armatures. Meaning if it is correct on export and in unity, I would expect it to be broken on import into blender. That said, did you create a bug report so that we can get attention on it? If you did, please link it here.
The issue is in the exporting to FBX (include ALL actions), as per the title of the post.
Actions don't get exported at all if the exported armature has unmatching channels/bones. I guess this is the standard behaviour by design, but shouldn't be this way.
Deleting the missing channels from the actions solves the proble.
okay, I get that it is the title of the post but how you are checking it matters.
If you want to work to get it fixed or if it is a bug then lets work on it.
Sample file that shows the issue and a bug report is the starting point with exact settings and reproduction steps.
To get this to work where you have actions that are on shared skeletons (but the skeletons are missing limbs or changed) but you still want them to export together you can use the NLA to store the actions for each armature and then turn off ALL actions and turn on NLA in the FBX export and then you will get an Export file that has 2 skeletons, each animated on each matching FBX take and one TAKE per action that is shared and stored in the NLA
Hi brad, first of all thank you for the answers.
The way I checked is by opening the FBX in unity and the animations are missing.
I tried reimporting the fbx in blender and the animations where missing too, but this could be due to the way fbx import works.
Since by deleting the missing animated channels/bones from the actions solved the problem it must be related to the export ALL Actions script.
My guess is that it must be few lines in the python used to check for compatibility and by design, not a bug, the export prunes the not compatible actions from the associated armature.
I think this would work better by pruning the missing channels/bones from the actions and still exporting them. This is already implemented in the script that associates with the armature the single default action since it exports correctly no matter if there are missing channels.
So it would be a matter of copying the few lines that do the pruning from the export single default action to the code that does the export for the ALL actions mode in the fbx export.
My feeling is that this single thing is creating a lot of confusion in the unity/unreal community and would be kind of easy to solve.
Yes I thought this could be a work around, for some reasons people say it would create downstream many problems for various reason.
It would anyway add complexity to the process having to add to the NLA multiple actions per multiple armatures and when the library grows and editing occurs problems could happen.
As I mentioned in the other answer changing the behavior by avoiding pruning in the export ALL actions would be a no brainer and I guess very easy to correct/implement.
I did some further testing, I can reimport the fbx in blender. The single armature (I always export single armatures) has all the actions (compatible duting the export), thus the reimport works correctly.
The problem is in the export of the fbx where the "not compatible" actions are discarder.
Well it doesn't cause problems for editing because you still only have 2 or 3 or how ever many actions you need... the NLA just points to them so for export control, it just makes sure that the right action gets used by the armatures you need.
NLA use for export is common and the only way to have any control over the default FBX exporter and does so with out creating duplicate actions. A strip is just pointing at the action like an instance.
you have a source file with several armatures but you are exporting selected armatures so you only get ONE, but it drops the actions, is what I am understanding.
Yes it is correct, my blend file has multiple armatures(collections) that I export to different fbx files, they all receive all the actions present in the blend file, except that for the compatibility check of the "Export ALL actions" option, blender discards some of this (i.e. the one with a pinky channel missing on the armature).
Hi brad, any news about fixing this?
Thank you.
No, and without out a clear proposal or bug report and a simple test file to reproduce/test with it, when a developer has time, it won't get worked on.
Just also keep in mind FBX is not a priority for the developers and there is a workaround to use the NLA to control the export to map what actions should go to what mesh, I would not expect any fixes. If you can prep all that stuff and also make sure other cases when that behavior isn't desired are handled and write up and test it etc.. then it at least has a chance of someone acting on it.
I thought this isn't a bug but a raw implementation of the feature, that's why I wrote here (suggestion/improvement).
But if you think I should report it as a bug I can.
I can also provide a a test file, but it should be a couple of python lines to change. And the same feature is already implemented for the default action (that doesn't get discarded, or the compatibility check).
I don't have the stats at hand, but fbx is what the world wide videogame developer industry uses, and it is supposes to be a pretty large part of the Blender users base.
Forums are pretty full of people having trouble with this, the NLA workaround seems to create various problems down stream and isn't recommended by many people.
If you got 1 min to report this to the devs (guess you are a moderator?), maybe it would take 5 min to a dev to change that line of python and this would be solved for thousands of peoples.
There should be also no other cases when the feature isn't desired, since selecting the produced actions after the export is a process everyone does anyway (the problem is not having the actions at all).
Otherwise the option could just be called differently, like export compatible actions (not export ALL actions), it's hard to think of a scenario where this is wanted.
Thank you.
" but it should be a couple of python lines to change"
You don't have to convince me...there are a lot of ideas here and without doing the work they won't go anywhere, just the truth of it.
It is okay if you don't or can't but set your expectations accordingly. A post here should be clear and actionable.. if it is a feature request and not a bug... it still needs all the details and more.
I am just another blender user and someone who is working to get fixes of my own in and I am trying to help you get it fixed or changed.
But I can tell you if you think it is 5 min for a dev to change the reality is a week or more worth of work that goes around it and that change won't start without a clear step by step proposal and considering all the reasons why it is the way it is right now and what it could break for people who are used to what it does now and it takes time and work.
As you can see even from my first question, it wasn't clear how you were exporting and what you were trying to do.
Feel free to link me to any issues you are looking at about the NLA and I look forward to seeing this fleshed out to the point that a DEV with 5 minutes could read it , test it without knowing anything about the FBX exporter with your file and the steps you provide and what you expect (lot of this is here in the thread it just has to be formalized)