Animation mixer / clips does not support animations separate from character
I have animations and characters in separate glb files. Its so I can load up various kaykit character models without storing the same animation collection on each character file. The problem seem to be that the clip tracks is targeted toward the skeleton in the animation glb, so when I play action the character doesn't animate. I hacked together a lil function to swop the bones in the clip with the character skeleton to make things work, but ideally it would be nice for it to work like in threejs where you can link a clip to a model when creating the action or set the the model at the mixer level so any clips will animate to it.
For reference:
- Function to fix clips https://github.com/sketchpunk/pygfx_proto/blob/main/code/lib/Util.py#L28
- Example of using animation mixer with seperate character & animations https://github.com/sketchpunk/pygfx_proto/blob/main/code/template_anim_mixer.py
Ah, yes, that's the current state. 😅
https://github.com/pygfx/pygfx/pull/892#issuecomment-2507243547
The current animation system is primarily designed to correctly present glTF models, with its data structure entirely loaded from a single glTF file.
I plan to gradually improve the animation system in the future, starting with decoupling animations from the model.