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.

Blender throws keyframe error when exporting as gltf with animations - Key.path_resolve could not be resolved

See original GitHub issue

Blender fails to export my 3d model with animations. This error is most probably my fault as I am inexperienced with blender and animations. Still can’t find any way to fix the issue. The issue might also be related to the sample blender file that I am using.

Python: Traceback (most recent call last):
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\__init__.py", line 575, in execute
    return gltf2_blender_export.save(context, export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 46, in save
    json, buffer = __export(export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 63, in __export
    __gather_gltf(exporter, export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 72, in __gather_gltf
    active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 39, in gather_gltf2
    animations += __gather_animations(blender_scene, export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 83, in __gather_animations
    animations_, merged_tracks = gltf2_blender_gather_animations.gather_animations(_blender_object, merged_tracks, len(animations), export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animations.py", line 76, in gather_animations
    animation = __gather_animation(blender_action, blender_object, export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animations.py", line 114, in __gather_animation
    channels=__gather_channels(blender_action, blender_object, export_settings),
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animations.py", line 150, in __gather_channels
    blender_action, blender_object, export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 65, in wrapper_cached
    result = func(*args)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animation_channels.py", line 83, in gather_animation_channels
    None)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animation_channels.py", line 202, in __gather_animation_channel
    sampler=__gather_sampler(channels, blender_object, export_settings, bake_bone, bake_channel, bake_range_start, bake_range_end, action_name, driver_obj),
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animation_channels.py", line 263, in __gather_sampler
    export_settings
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 65, in wrapper_cached
    result = func(*args)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animation_samplers.py", line 65, in gather_animation_sampler
    bake_bone, bake_channel, bake_range_start, bake_range_end, action_name, driver_obj, export_settings),
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 65, in wrapper_cached
    result = func(*args)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animation_samplers.py", line 240, in __gather_input
    export_settings)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 65, in wrapper_cached
    result = func(*args)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animation_sampler_keyframes.py", line 240, in gather_keyframes
    step
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 90, in wrapper_bonecache
    result = func(*args)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_animation_sampler_keyframes.py", line 177, in get_bone_matrix
    drivers_to_manage = get_sk_drivers(obj_driver)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 117, in wrapper_skdriverdiscover
    result = func(*args)
  File "E:\Applications\Blender\2.92\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_drivers.py", line 54, in get_sk_drivers
    sk_name = child.data.shape_keys.path_resolve(get_target_object_path(sk_c.data_path)).name
ValueError: Key.path_resolve("key_blocks["Key 1"]") could not be resolved

location: <unknown location>:-1

To Reproduce Steps to reproduce the behavior:

  1. Open my model in Blender 2.92.0
  2. Export as gltf with animation export turned on

.blend file/ .gltf model.zip

Version

  • OS: Windows 10
  • Blender 2.92.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
juliendurourecommented, Jun 12, 2021

OK, got it. Any driver on shape key with a dot in name of shape key will crash. Let’s open another issue to manage that.

0reactions
juliendurourecommented, Sep 15, 2022

@cuijie77 Please open a new ticket, with all requirement needed to analyse:

  • Test with official Blender 3.3
  • Provide your .blend file
Read more comments on GitHub >

github_iconTop Results From Across the Web

Blender throws keyframe error when exporting as gltf (glb) file ...
I have submitted a bug report for the gltf exporter. You can look at it here: https://github.com/KhronosGroup/glTF-Blender-IO/issues/1401 ...
Read more >
Error exporting animation as GLTF file - Blender Stack Exchange
Here's how I got it to work: 1) Upgrade to the latest Blender 2.8.1. 2) Go to export panel: Export -> glTF ->...
Read more >
GLTF Export Sometimes Modifies Animation (not export bug)
Describe the bug When exporting my animated mesh, my character's right leg is rotated in both the exported file and in the editor...
Read more >
Export GLTF/GLB with animation fails in Blender 3.3 and below
I import your file (without any change in import option), then export with all default export option -> No crash, glb file is...
Read more >
Blender export limit or user error? - Babylon.js Forum
Adding a new object, with a new animation, to big (fully working) rig causes all previous animation key-frames to be mis-aligned in timeline ......
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