-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blender exporter exports non-existent animations, crashing the ObjectLoader #8723
Comments
I created a node script to fix morph targets and also delete the top level animation key for any exported file. Use at your own risk https://gist.github.com/AndrewRayCode/15340499495afea654e45d9ace113d28 |
This was actually part of my issue ( #8677 ), I had
being generated at the top level. The geometry key also holds the correct animations. |
If you turn on to export animation, the exporter just seems to set up animation on everything in the scene. Thus creating these empty key sets. Though you might want to double check which animation types you actually check on in the export, it is rather specific. If you ask me it would be best if the loader doesn't stop when it finds an empty key set. But instead just note that it is empty and move on. |
The JSON Blender exporter has been removed with Also see: https://threejs.org/docs/#manual/introduction/Loading-3D-models |
Description of the problem
Even though my Blender file has no keyframe animation, an invalid "animations" key is exported to the JSON file, something like:
When this is loaded into Three, it throws the error
Uncaught Error: no keyframes in track named Cylinder.position
As mentioned in this comment by @phfatmonkey, one solution to this is to delete "unused" tracks from Blender's mysterious NLA editor. I don't think this is a great solution because Blender frequently creates those random tracks as some sort of warped backup mechanism. It would be better if only "valid" animations were exported. If that's not possible for some reason, as in if it's not possible using the Blender API to determine which named animations are real and which are fake, then I guess this ticket can be closed.
A fast workaround if you find yourself in this state is to manually delete the animations key from the exported JSON file. For any rigged animation I've ever exported, the real animation data is nested inside the geometry key. I don't know why an empty, invalid top level animations key would ever be exported.
You can download the .blend file in question to try this out: eye-test.blend.zip
Three.js version
The text was updated successfully, but these errors were encountered: