diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2021-11-12 11:35:07 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2021-11-12 11:35:07 +0300 |
commit | a0d1647839180388805be150794a812c44e59053 (patch) | |
tree | 004744b6b42db442edd8474611453bf303c99a21 /io_scene_gltf2/blender/exp | |
parent | face67c72595e2939c43f05c5e9887a15a353685 (diff) |
glTF exporter: avoid issue with setting frame with python v >= 3.10
Diffstat (limited to 'io_scene_gltf2/blender/exp')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_export.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_export.py b/io_scene_gltf2/blender/exp/gltf2_blender_export.py index 522f13de..fc78e9b5 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_export.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_export.py @@ -54,7 +54,7 @@ def save(context, export_settings): __notify_end(context, end_time - start_time) if not export_settings['gltf_current_frame']: - bpy.context.scene.frame_set(original_frame) + bpy.context.scene.frame_set(int(original_frame)) return {'FINISHED'} diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py index d70f4de2..f1e94d9e 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py @@ -157,7 +157,7 @@ def get_bone_matrix(blender_object_if_armature: typing.Optional[bpy.types.Object while frame <= end_frame: data[frame] = {} # we need to bake in the constraints - bpy.context.scene.frame_set(frame) + bpy.context.scene.frame_set(int(frame)) for pbone in blender_object_if_armature.pose.bones: if bake_bone is None: matrix = pbone.matrix_basis.copy() |