Add an option to only export deform bones of an armature #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A properly done rig in Blender contains many more bones than strictly those required to deform geometry. These extra bones allow for complex rigs that make animation easier but are not needed in the exported file.
This MR adds an option to filter bones (and their corresponding animation data) based on the bones' Deform flag. It's the same option available in fbx, gltf, and collada exporters.
When a bone with Deform enabled is present in the rig's hierarchy, its parents need to be exported as well. This ensures predictable exported animation result but requires users to set up their rigs properly with non-deform bones in their own branch of the rig's hierarchy. Again, its the same behaviour as with other exporters.
I tested this on OpenMW's Land racer and everything looks to perform as expected - only the deform bones and animation channels get included in the exported file. land_racer.osgt.zip
The option is exposed in the exporter's UI.