I'm trying to export data for only those bones actually animated in a particular animation. How do I track these down?
Thanks for any help and apologies if this is a totally dumb question - I spent some time searching for the info but came up with nowt (obviously!).
What bones are animated in an action?
Moderators: jesterKing, stiv
What bones are animated in an action? More info
I've done some more digging around into this problem (and it is a problem that needs solving to export flexible animations). Looking through the python API I could find no way to see which bones are active during an action, through in the UI they are clearly highlighted so the information is obviously available somewhere!
Looking through the C code (at the HEAD revision) it looks like the information may be available in the pose channel information. How do we make feature requests to the C coders to get this exposed to python (it would map to a flag in the PoseBone I think, something similar to the new .sel flag)?
In the meantime, incase others hit the same problem, I simply removed bones with no real variation in their pose during an animation. This is not ideal but gets me moving while I track down a real solution.
Looking through the C code (at the HEAD revision) it looks like the information may be available in the pose channel information. How do we make feature requests to the C coders to get this exposed to python (it would map to a flag in the PoseBone I think, something similar to the new .sel flag)?
In the meantime, incase others hit the same problem, I simply removed bones with no real variation in their pose during an animation. This is not ideal but gets me moving while I track down a real solution.
The only bones animated in an Action can be obtained by looking at the Actionchannels in the Action.
Only those bones with actionchannels in the Action are animated.
Once we go back to b-con1 i have some code that will allow you to get the actionchannels from the Actions. Then you can loop them by name...
for animated_bone in Action.channels.keys():
....print animated_bone
Only those bones with actionchannels in the Action are animated.
Once we go back to b-con1 i have some code that will allow you to get the actionchannels from the Actions. Then you can loop them by name...
for animated_bone in Action.channels.keys():
....print animated_bone