question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blend animation cannot be exported

See original GitHub issue

Describe the bug I have a test model that appears to be a valid blend file but cannot be exported to gltf.

To Reproduce

  1. Open the Blend file.
  2. Click on export glb.
Python: Traceback (most recent call last):
  File "C:\Users\ernest.lee\scoop\apps\blender\current\2.91\scripts\addons\io_scene_gltf2\__init__.py", line 559, in execute
    return gltf2_blender_export.save(context, export_settings)
  File "C:\Users\ernest.lee\scoop\apps\blender\current\2.91\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 46, in save
    json, buffer = __export(export_settings)
  File "C:\Users\ernest.lee\scoop\apps\blender\current\2.91\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 66, in __export
    json = __fix_json(exporter.glTF.to_dict())
  File "C:\Users\ernest.lee\scoop\apps\blender\current\2.91\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 110, in __fix_json
    fixed[key] = __fix_json(value)
  File "C:\Users\ernest.lee\scoop\apps\blender\current\2.91\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 114, in __fix_json
    fixed.append(__fix_json(value))
  File "C:\Users\ernest.lee\scoop\apps\blender\current\2.91\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 110, in __fix_json
    fixed[key] = __fix_json(value)
  File "C:\Users\ernest.lee\scoop\apps\blender\current\2.91\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 114, in __fix_json
    fixed.append(__fix_json(value))
  File "C:\Users\ernest.lee\scoop\apps\blender\current\2.91\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 117, in __fix_json
    if int(obj) == obj:
ValueError: cannot convert float NaN to integer

location: <unknown location>:-1

Expected behavior Not fail.

Screenshots

.blend file/ .gltf

assimp-mdb-sphere_rig_advanced.zip

Version

  • OS: win 10
  • Blender Version 2.91.0

Additional context https://github.com/assimp/assimp-mdb/tree/master/model-db/fbx/sphere_rig_advanced

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
juliendurourecommented, Jan 6, 2021

Maybe we can:

  • open a ticket in blender repo to share import issue that generate the problem ?
  • add some check to have an error message instead of a crash when there are some NaN ?
0reactions
firecommented, Sep 27, 2021

The blend shape being nan problem hasn’t blocked me some time. So create a new issue for your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix animations not exporting from blender to unity
In this video I go over how to fix animations not exporting with your model from Blender into Unity. The project I'm using...
Read more >
animation is not exporting to glb/gltf - Blender Stack Exchange
In the export window, tick "Always Sample Animation", seems to solve this. enter image description here.
Read more >
T93704 gltf2 not exporting animations in 3.0
cannot export animated meshes in 3.0 using gltf2 export, throwing a python error unknow location etc. Exact steps for others to reproduce the...
Read more >
Cant export animation coming from blender - three.js forum
I've downloaded the blend file and try to export the keyframe animations to glTF, however without success. @munrocket AFAICS this issue not about...
Read more >
Solved: Blend shapes won't export - Maya - Autodesk Forums
Works perfectly good in Maya, but when I export fbx. ... Share your knowledge, ask questions, and explore popular Maya animation topics.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found