diff --git a/addons/io_scene_gltf2/blender/exp/animation/sampled/armature/sampler.py b/addons/io_scene_gltf2/blender/exp/animation/sampled/armature/sampler.py index ef6c0851e..e98464a1a 100644 --- a/addons/io_scene_gltf2/blender/exp/animation/sampled/armature/sampler.py +++ b/addons/io_scene_gltf2/blender/exp/animation/sampled/armature/sampler.py @@ -201,20 +201,15 @@ def __convert_keyframes(armature_uuid, bone_name, channel, keyframes, action_nam component_type = gltf2_io_constants.ComponentType.Float data_type = gltf2_io_constants.DataType.vec_type_from_num(len(keyframes[0].value)) - output = gltf2_io.Accessor( - buffer_view=gltf2_io_binary_data.BinaryData.from_list(values, component_type), - byte_offset=None, - component_type=component_type, - count=len(values) // gltf2_io_constants.DataType.num_elements(data_type), - extensions=None, - extras=None, - max=None, - min=None, - name=None, - normalized=None, - sparse=None, - type=data_type - ) + + output = gather_accessor( + gltf2_io_binary_data.BinaryData.from_list(values, component_type), + component_type, + len(values) // gltf2_io_constants.DataType.num_elements(data_type), + None, + None, + data_type, + export_settings) return input, output diff --git a/addons/io_scene_gltf2/blender/exp/animation/sampled/data/sampler.py b/addons/io_scene_gltf2/blender/exp/animation/sampled/data/sampler.py index e3c2bf013..0d4ed0140 100644 --- a/addons/io_scene_gltf2/blender/exp/animation/sampled/data/sampler.py +++ b/addons/io_scene_gltf2/blender/exp/animation/sampled/data/sampler.py @@ -118,19 +118,14 @@ def __convert_keyframes(blender_type_data, blender_id, channel, keyframes, actio else: data_type = gltf2_io_constants.DataType.vec_type_from_num(1) - output = gltf2_io.Accessor( - buffer_view=gltf2_io_binary_data.BinaryData.from_list(values, component_type), - byte_offset=None, - component_type=component_type, - count=len(values) // gltf2_io_constants.DataType.num_elements(data_type), - extensions=None, - extras=None, - max=None, - min=None, - name=None, - normalized=None, - sparse=None, - type=data_type + output = gather_accessor( + gltf2_io_binary_data.BinaryData.from_list(values, component_type), + component_type, + len(values) // gltf2_io_constants.DataType.num_elements(data_type), + None, + None, + data_type, + export_settings ) return input, output diff --git a/addons/io_scene_gltf2/blender/exp/animation/sampled/object/sampler.py b/addons/io_scene_gltf2/blender/exp/animation/sampled/object/sampler.py index 25dcbe9d7..93ace277d 100644 --- a/addons/io_scene_gltf2/blender/exp/animation/sampled/object/sampler.py +++ b/addons/io_scene_gltf2/blender/exp/animation/sampled/object/sampler.py @@ -137,19 +137,15 @@ def __convert_keyframes(obj_uuid: str, channel: str, keyframes, action_name: str component_type = gltf2_io_constants.ComponentType.Float data_type = gltf2_io_constants.DataType.vec_type_from_num(len(keyframes[0].value)) - output = gltf2_io.Accessor( - buffer_view=gltf2_io_binary_data.BinaryData.from_list(values, component_type), - byte_offset=None, - component_type=component_type, - count=len(values) // gltf2_io_constants.DataType.num_elements(data_type), - extensions=None, - extras=None, - max=None, - min=None, - name=None, - normalized=None, - sparse=None, - type=data_type + + output = gather_accessor( + gltf2_io_binary_data.BinaryData.from_list(values, component_type), + component_type, + len(values) // gltf2_io_constants.DataType.num_elements(data_type), + None, + None, + data_type, + export_settings ) return input, output diff --git a/addons/io_scene_gltf2/blender/exp/animation/sampled/shapekeys/sampler.py b/addons/io_scene_gltf2/blender/exp/animation/sampled/shapekeys/sampler.py index d1691fa87..dac5223e9 100644 --- a/addons/io_scene_gltf2/blender/exp/animation/sampled/shapekeys/sampler.py +++ b/addons/io_scene_gltf2/blender/exp/animation/sampled/shapekeys/sampler.py @@ -103,19 +103,14 @@ def __convert_keyframes(obj_uuid, keyframes, action_name: str, export_settings): component_type = gltf2_io_constants.ComponentType.Float data_type = gltf2_io_constants.DataType.Scalar - output = gltf2_io.Accessor( - buffer_view=gltf2_io_binary_data.BinaryData.from_list(values, component_type), - byte_offset=None, - component_type=component_type, - count=len(values) // gltf2_io_constants.DataType.num_elements(data_type), - extensions=None, - extras=None, - max=None, - min=None, - name=None, - normalized=None, - sparse=None, - type=data_type + output = gather_accessor( + gltf2_io_binary_data.BinaryData.from_list(values, component_type), + component_type, + len(values) // gltf2_io_constants.DataType.num_elements(data_type), + None, + None, + data_type, + export_settings ) return input, output