Add animation support to gltf_importer#900
Conversation
|
Currently fixing an issue with inaccurate rotations once more. |
|
I'm still trying to get things 1:1, it imports mostly right, but some animations aren't correct, or positions / rotations aren't perfect. |
|
Animations are now 1:1 for Blockbench -> Blockbench, same with groups rotation, and parts rotation. |
|
I can't do super thorough testing because I don't have a lot of files with group animations to try, but the ones I do have work great! Blender also seems to agree on how the animations should look when importing the same glTF |
|
I'm considering this feature complete, I was able to assist a user with importing a rigged and animated model into Blockbench (By baking the armatures in blender of course) and it imports perfectly. |
|
Other than that. Which I forgot about... |
|
Seems to generally work in my test as well. Please fix the validator issue (version mismatch), and clean up the code: You use patterns like |
Additions:
Example of compounding rotation on previous versions:

This specifically occurs and wasn't noticed because Blockbench fails to recognize group rotation until the parts are updated or reloaded, i.e. moving the model around, which forces it to re-read the group rotation, or saving and reloading the project.
By applying rotation to just parts, we both fix the incorrect initial rendering issue, and also fix inaccurate / compounded rotation applied (rotation both applied to group and its descendants)
Current Bugs:
Animations don't show/render properly until you move the model, or reload the project. Unsure if there's a method in Blockbench to force this kind of an update, or if its a bug with Blockbench.Fixed this, implemented Canvas.updateAll() to ensure these changes are detected.